diff --git a/luciexpress/htdocs/plugins/core/widgets/luci.input.timespan.html b/luciexpress/htdocs/plugins/core/widgets/luci.input.timespan.html new file mode 100644 index 000000000..dfa097a38 --- /dev/null +++ b/luciexpress/htdocs/plugins/core/widgets/luci.input.timespan.html @@ -0,0 +1,6 @@ +
+
+
+
+
+
diff --git a/luciexpress/htdocs/plugins/core/widgets/luci.input.timespan.js b/luciexpress/htdocs/plugins/core/widgets/luci.input.timespan.js new file mode 100644 index 000000000..2accf6f14 --- /dev/null +++ b/luciexpress/htdocs/plugins/core/widgets/luci.input.timespan.js @@ -0,0 +1,34 @@ +$juci.app.directive("luciInputTimespan", function () { + var plugin_root = $juci.module("core").plugin_root; + return { + templateUrl: plugin_root + "/widgets/luci.input.timespan.html", + restrict: 'E', + replace: true, + scope: { + model: "=ngModel" + }, + controller: "luciInputTimespan" + }; +}).controller("luciInputTimespan", function($scope){ + $scope.data = { + from: "", to: "" + }; + $scope.$watch("model", function(model){ + if(!model) return; + var value = model.value; + if(!value || !value.split) return; + var parts = value.split("-"); + if(parts.length != 2){ + $scope.data.from = $scope.data.to = ""; + } else { + $scope.data.from = parts[0]; + $scope.data.to = parts[1]; + } + }); + $scope.$watch("data.from", function(value){ + if($scope.model) $scope.model.value = $scope.data.from + "-"+$scope.data.to; + }); + $scope.$watch("data.to", function(value){ + if($scope.model) $scope.model.value = $scope.data.from + "-"+$scope.data.to; + }); +}); diff --git a/luciexpress/htdocs/plugins/juci-mod-dropbear/menu.json b/luciexpress/htdocs/plugins/juci-mod-dropbear/menu.json new file mode 100644 index 000000000..101233830 --- /dev/null +++ b/luciexpress/htdocs/plugins/juci-mod-dropbear/menu.json @@ -0,0 +1,6 @@ +{ + "settings/dropbear": { + "title": "Dropbear", + "index": 20 + } +} diff --git a/luciexpress/htdocs/plugins/juci-mod-dropbear/pages/services.dropbear.html b/luciexpress/htdocs/plugins/juci-mod-dropbear/pages/services.dropbear.html new file mode 100644 index 000000000..6f17e5b4e --- /dev/null +++ b/luciexpress/htdocs/plugins/juci-mod-dropbear/pages/services.dropbear.html @@ -0,0 +1,9 @@ + +
+ + {{ 'Dropbear' | translate }} + {{ 'settings.dropbear.info' | translate }} + + +
+
diff --git a/luciexpress/htdocs/plugins/juci-mod-dropbear/pages/services.dropbear.js b/luciexpress/htdocs/plugins/juci-mod-dropbear/pages/services.dropbear.js new file mode 100644 index 000000000..43f93ffe6 --- /dev/null +++ b/luciexpress/htdocs/plugins/juci-mod-dropbear/pages/services.dropbear.js @@ -0,0 +1,5 @@ +//! Author: Martin K. Schröder + +$juci.app.controller("DropbearSettings", function($scope){ + +}); diff --git a/luciexpress/htdocs/plugins/juci-mod-dropbear/plugin.json b/luciexpress/htdocs/plugins/juci-mod-dropbear/plugin.json new file mode 100644 index 000000000..75ef4b86c --- /dev/null +++ b/luciexpress/htdocs/plugins/juci-mod-dropbear/plugin.json @@ -0,0 +1,9 @@ +{ + "scripts": [ + ], + "pages": { + "settings/dropbear": { + "view": "pages/services.dropbear" + } + } +}