diff options
Diffstat (limited to 'www/js/utils.js')
-rw-r--r-- | www/js/utils.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/www/js/utils.js b/www/js/utils.js index fab6736..81501e9 100644 --- a/www/js/utils.js +++ b/www/js/utils.js @@ -22,27 +22,27 @@ 'use strict'; -var Rivendell = Rivendell || {}; +var Rdxport = Rdxport || {}; -var alertbox = function() {} +var alertbox = function() {}; alertbox.warning = function (dest, heading, message) { $('#' + dest + ' .alertbox').html('<div class="alert alert-warning"><a class="close" data-dismiss="alert" href="#">×</a><h4 class="alert-heading">' + heading + '</h4>' + message + '</div>'); -} +}; alertbox.error = function (dest, heading, message) { $('#' + dest + ' .alertbox').html('<div class="alert alert-danger"><a class="close" data-dismiss="alert" href="#">×</a><h4 class="alert-heading">' + heading + '</h4>' + message + '</div>'); -} +}; alertbox.info = function (dest, heading, message) { $('#' + dest + ' .alertbox').html('<div class="alert alert-info"><a class="close" data-dismiss="alert" href="#">×</a><h4 class="alert-heading">' + heading + '</h4>' + message + '</div>'); -} +}; alertbox.success = function (dest, heading, message) { $('#' + dest + ' .alertbox').html('<div class="alert alert-success"><a class="close" data-dismiss="alert" href="#">×</a><h4 class="alert-heading">' + heading + '</h4>' + message + '</div>'); -} +}; Number.prototype.pad = function(size) { var s = String(this); while (s.length < (size || 2)) {s = "0" + s;} return s; -} +}; var weekday = new Array(7); weekday[0] = 'Sonntag'; @@ -53,7 +53,7 @@ weekday[4] = 'Donnerstag'; weekday[5] = 'Freitag'; weekday[6] = 'Samstag'; -var weekday_short = new Array('So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'); +var weekday_short = ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa']; function format_datetime(d) { if(Object.prototype.toString.call(d) !== '[object Date]') { |