diff --git a/luciexpress/Gruntfile.js b/luciexpress/Gruntfile.js index 121db88a2..6cb275038 100644 --- a/luciexpress/Gruntfile.js +++ b/luciexpress/Gruntfile.js @@ -97,6 +97,7 @@ module.exports = function(grunt){ console.log(files); }); grunt.registerTask("compile", "Compile all files into a single file", function(){ + var OUTDIR = "bin/"; var libfiles = [ "htdocs/lib/js/async.js", "htdocs/lib/js/js-schema.min.js", @@ -161,9 +162,10 @@ module.exports = function(grunt){ pluginfiles.map(function(name){ plugins[name.replace(/^htdocs\//, "")] = JSON.parse(String(fs.readFileSync(name))); }); - fs.writeFileSync("htdocs/__all.css", css); + if(!fs.existsSync(OUTDIR)) fs.mkdirSync(OUTDIR); + fs.writeFileSync(OUTDIR+"__all.css", css); // TODO: really do not do it in memory! - fs.writeFileSync("htdocs/__all.js", + fs.writeFileSync(OUTDIR+"__all.js", //uglifyjs.minify( "var JUCI_COMPILED = 1; var JUCI_TEMPLATES = "+ JSON.stringify(templates)+";"+ diff --git a/luciexpress/Makefile b/luciexpress/Makefile index b75217fe2..0d572438f 100644 --- a/luciexpress/Makefile +++ b/luciexpress/Makefile @@ -43,7 +43,12 @@ define Package/luciexpress/install npm install grunt compile $(INSTALL_DIR) $(1)/www - $(CP) ./htdocs/* $(1)/www/ + $(CP) ./bin/* $(1)/www/ + $(CP) ./htdocs/index.html $(1)/www/ + $(CP) ./htdocs/config.json $(1)/www/ + $(INSTALL_DIR) $(1)/www/themes/vodafone/ + $(CP) ./htdocs/themes/vodafone/img $(1)/www/themes/vodafone/ + $(CP) ./htdocs/themes/vodafone/fonts $(1)/www/themes/vodafone/ $(INSTALL_DIR) $(1)/usr/share/rpcd $(CP) ./share/* $(1)/usr/share/rpcd/ ./install_menus.sh $(1) diff --git a/luciexpress/htdocs/plugins/core/widgets/luci.select.js b/luciexpress/htdocs/plugins/core/widgets/luci.select.js new file mode 100644 index 000000000..410e54196 --- /dev/null +++ b/luciexpress/htdocs/plugins/core/widgets/luci.select.js @@ -0,0 +1,93 @@ +$juci.module("core") +.directive('luciSelect', function ($compile) { + return { + restrict: 'E', + scope: { + selectedItem: '=ngModel', + items: '=ngItems', + onChange: '&onChange', + placeholder: '@placeholder', + prefix: "@", + size: '=size' + }, + link: function (scope, element, attrs) { + var html = ''; + switch (attrs.type) { + case "dropdown": + html += '