PATH:
home
/
letacommog
/
letaweb
/
scripts
/
editor
/
modules
define(['module/base'],function(base) { return createModuleDefinition([base], function($file_manager,$dialog) { var getDay = function(elaps) { var tomorrow = new Date(); tomorrow.setDate(tomorrow.getDate()+elaps); return tomorrow; }; this.initializeData = { end_now:0, start_now:1, end:{ date:getDay(1).getDate(), month:getDay(1).getMonth() + 1, year:getDay(1).getFullYear(), hour:getDay(1).getHours(), minute:getDay(1).getMinutes(), second:getDay(1).getSeconds(), }, units:{'8':'1','4':'1','2':'1'} }; this.getCountdownInstance = function() { } this.controller = function($scope, $moduleInstance) { $scope.units = { millenia:$scope.data.units[1024], centuries:$scope.data.units[512], decade:$scope.data.units[256], year:$scope.data.units[128], month:$scope.data.units[64], week:$scope.data.units[32], day:$scope.data.units[16], hour:$scope.data.units[8], minute:$scope.data.units[4], second:$scope.data.units[2], milisecond:$scope.data.units[1], } $scope.enddate = new Date($scope.data.end.year,$scope.data.end.month - 1,$scope.data.end.date,$scope.data.end.hour,$scope.data.end.minute,$scope.data.end.second,0); $scope.changeDate = function(newDate) { $scope.enddate = newDate; $scope.data.end = { date:$scope.enddate.getDate(), month:$scope.enddate.getMonth() + 1, year:$scope.enddate.getFullYear(), hour:$scope.enddate.getHours(), minute:$scope.enddate.getMinutes(), second:$scope.enddate.getSeconds(), }; $scope.changeSettings(); } //$scope.$digests(); console.log($scope.units); $scope.changeSettings = function() { $scope.data.units = { '1024':$scope.units.millenia, '512':$scope.units.centuries, '256':$scope.units.decade, '128':$scope.units.year, '64':$scope.units.month, '32':$scope.units.week, '16':$scope.units.day, '8':$scope.units.hour, '4':$scope.units.minute, '2':$scope.units.second, '1':$scope.units.milisecond, } var units =[]; for(var i in $scope.data.units) { if($scope.data.units.hasOwnProperty(i)) { if($scope.data.units[i] == '1' || $scope.data.units[i] == 1) { units.push(parseInt(i)); } } } jQuery('#' + $moduleInstance.page_id + '_countdown').countdown( { start:$scope.data.start, end:$scope.data.end, empty_label:$scope.data.empty_label, max_value:$scope.data.max, digits:$scope.data.digits, units:units, suffix_message:$scope.data.suffix_message, post_message:$scope.data.post_message }); } }; this.changeLabel = function() { var t = this.getElement(); var button_text = jQuery('.button_text', t); button_text.html(this.module_data.text); }; this.changeLink = function() { var t = this.getElement(); var button = jQuery('a.button',t); button.attr('href', this.module_data.link); }; }); });
[+]
..
[-] productlist.js
[edit]
[-] facebookvideo.js
[edit]
[-] newslist.js
[edit]
[-] image.js
[edit]
[-] video.js
[edit]
[-] button.js
[edit]
[-] zone.js
[edit]
[-] text.js
[edit]
[-] newscategory.js
[edit]
[-] googlemap.js
[edit]
[-] base_structure.js
[edit]
[-] contactform.js
[edit]
[-] spacer.js
[edit]
[-] infobox.js
[edit]
[-] html.js
[edit]
[-] testmodule.js
[edit]
[-] facebookcomment.js
[edit]
[-] iframe.js
[edit]
[-] twitterfeed.js
[edit]
[-] recentnews.js
[edit]
[-] audio_player.js
[edit]
[-] slick.js
[edit]
[-] newsdetail.js
[edit]
[-] facebookpost.js
[edit]
[-] pagezone.js
[edit]
[-] panigation.js
[edit]
[-] row.js
[edit]
[-] __custom_module_template.js
[edit]
[-] carousel.js
[edit]
[-] icon.js
[edit]
[-] typedtext.js
[edit]
[-] newscomment.js
[edit]
[-] box.js
[edit]
[-] base_custom.js
[edit]
[-] wordpress.js
[edit]
[-] base.js
[edit]
[-] column.js
[edit]
[-] fancytext.js
[edit]
[-] recentproduct.js
[edit]
[-] statcounter.js
[edit]
[-] tab.js
[edit]
[-] bootstrap_slider.js
[edit]
[-] ihover.js
[edit]
[-] line.js
[edit]
[-] blogger.js
[edit]
[-] slideshow.js
[edit]
[-] title.js
[edit]
[-] facebookpage.js
[edit]
[-] share_buttons.js
[edit]
[-] facebooklike.js
[edit]
[-] infobanner.js
[edit]
[-] rssfeed.js
[edit]
[-] flash.js
[edit]
[-] countdown.js
[edit]
[-] facebooksend.js
[edit]
[-] mailchimp.js
[edit]
[-] infotable.js
[edit]
[-] navbar.js
[edit]
[-] cycleslider.js
[edit]
[-] modal.js
[edit]
[-] embed.js
[edit]
[-] alert.js
[edit]
[-] progress_bar.js
[edit]
[-] accordion.js
[edit]
[-] youtube.js
[edit]
[-] social_buttons.js
[edit]
[-] productcategory.js
[edit]
[-] menu.js
[edit]
[-] pricetable.js
[edit]
[-] productdetail.js
[edit]
[-] gallery.js
[edit]