PATH:
home
/
letacommog
/
letaweb
/
admin
/
modules
/
progress_bar
define(['module/base'],function(base) { return createModuleDefinition([base], function($window) { this.initializeData = { progresses:[ {value:50,label:'50%'}, {value:30,label:'30%'} ] }; this.controller = function($scope, $moduleInstance) { $scope.editProgress = function(index) { $scope.data.progresses[index].edit_mode = true; } $scope.changeValue = function(index) { var value = $scope.data.progresses[index].value; $moduleInstance.getElement().children().children(':eq('+index+')').children().attr('style','width:'+value+'%'); } $scope.changeLabel = function(index) { var label = $scope.data.progresses[index].label; $moduleInstance.getElement().children().children(':eq('+index+')').children().children().html(label); } $scope.deleteProgress = function(index) { $scope.data.progresses.splice(index,1); $moduleInstance.getElement().children().children(':eq('+index+')').remove(); } $scope.addProgress = function() { var p = {value:50,label:'50%'}; $scope.data.progresses.push(p); var pb = jQuery('<div class="progress"/>'); var pbb = jQuery('<div class="progress-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100"/>'); pbb.attr('aria-valuenow',p.value).attr('style','width:'+p.value+'%'); var sp = jQuery('<span/>').html(p.label); pbb.append(sp); pb.append(pbb); $moduleInstance.getElement().children().append(pb); } }; }) });
[+]
..
[-] backend.js
[edit]
[-] frontend_class.php
[edit]
[-] frontend_view.php
[edit]
[-] backend.php
[edit]