mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2026-03-03 07:54:28 +01:00
Added own dropbear plugin to main tree
This commit is contained in:
parent
a5cecb9fa8
commit
d26e3cedd3
6 changed files with 69 additions and 0 deletions
|
|
@ -0,0 +1,6 @@
|
|||
<div class="row" ng-class="{'field-error': model.error}" data-toggle="tooltip" data-placement="top" title="{{model.error}}">
|
||||
<div class="col-xs-2"><label translate>from</label></div>
|
||||
<div class="col-xs-4"><input class="form-control" type="text" ng-model="data.from" placeholder="09:00"/></div>
|
||||
<div class="col-xs-2"><label translate>to</label></div>
|
||||
<div class="col-xs-4"><input class="form-control" type="text" ng-model="data.to" placeholder="09:00"/></div>
|
||||
</div>
|
||||
|
|
@ -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;
|
||||
});
|
||||
});
|
||||
6
luciexpress/htdocs/plugins/juci-mod-dropbear/menu.json
Normal file
6
luciexpress/htdocs/plugins/juci-mod-dropbear/menu.json
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"settings/dropbear": {
|
||||
"title": "Dropbear",
|
||||
"index": 20
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<luci-layout-with-sidebar>
|
||||
<div ng-controller="DropbearSettings">
|
||||
<luci-config-section>
|
||||
<luci-config-heading>{{ 'Dropbear' | translate }}</luci-config-heading>
|
||||
<luci-config-info>{{ 'settings.dropbear.info' | translate }}</luci-config-info>
|
||||
|
||||
</luci-config-section>
|
||||
</div>
|
||||
</luci-layout-with-sidebar>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
//! Author: Martin K. Schröder <mkschreder.uk@gmail.com>
|
||||
|
||||
$juci.app.controller("DropbearSettings", function($scope){
|
||||
|
||||
});
|
||||
9
luciexpress/htdocs/plugins/juci-mod-dropbear/plugin.json
Normal file
9
luciexpress/htdocs/plugins/juci-mod-dropbear/plugin.json
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"scripts": [
|
||||
],
|
||||
"pages": {
|
||||
"settings/dropbear": {
|
||||
"view": "pages/services.dropbear"
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue