caboose-cms 0.5.77 → 0.5.78

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZTdhMjRiY2Y1YWIyNTc5MTA0ZDIyNGQwNThjMGRiYmExMzZmNmQxNw==
4
+ MTI3MjVkYWE1OGYwMDJjZjVmYzlkOGVmNjdiZDg2N2RmZDUxNjMwNQ==
5
5
  data.tar.gz: !binary |-
6
- MjdkZWJlMDgxNjVkOGIzNjU4NTllNjg3YjFkNDc2M2Y3OWNiNTU0NA==
6
+ ZGYxYTI3NDhmOTI3MGU3NTViMDkyYzFmMjhhNjZiMGM2MTIwMmZlMw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NGY2OTVhZWM1YWYyMTczN2RiNGYwNWU0NjZhNDQ1Y2VjNjIwMWJkMTNlNmEz
10
- MmJjZTk0Y2Y4NjQ4ZWExZjBhOGY5Y2YwM2NhNzY2MTgzNmRhZTdkNTM3MDE3
11
- ZmZiYzNhNWMyMDU5M2U5ZTFkZTBkYThlZDgwMjEzMzZlMDlmM2U=
9
+ ZmFlNDJjY2I3MmYyOTU2ZmI3OTA4NWZkZjA4NTBhOGIxMDZjMTMyZTA4M2Vh
10
+ ODYwYmI1MGZlNGI0MWE3YzYzYzc3NzQ2ZTg3NmE5ZDc1MDUxYjgyM2M1OTIy
11
+ YTVmZTlhOTU3NGRmZmFmOTcwMmY2YTk0MjE5OTJkNjM0YWNmOWU=
12
12
  data.tar.gz: !binary |-
13
- YzhjNjg3M2NiOWNkZjBhNGMzMGRhYzJjMGRlNjFhOWZhOWNhN2QwYzk0MTQ1
14
- YjY1MTlmYjYyZjVlY2IyNzRjMTNjZmJkNDdmMTY3ZjNjOTg0NDk0ZWE5NzMx
15
- YmQwN2MwMzg5YjRiOWUzNWZmOTMzN2E0N2U1Y2M5Y2E5ODFmY2I=
13
+ OTE2OGNhMjZlODU2ZTU4NTAyNDMxZTQ0YmZjOWE3YTJiZDU5NzAxZWMwMDRk
14
+ MzhjNjQ4YjdjYTE5NzFmNWU0MGFkNzJkYWQ4M2QyYWE2MmM5MDFlM2Y1YWQ2
15
+ NTNkZmUxNGEzYjY3MjMyM2Q5OTRjOTE5ZTMzMjRkYzM0OTk1ZTk=
@@ -0,0 +1,53 @@
1
+ Date.prototype.format = function(str_format, utc_offset) {
2
+ var obj = new Date(this.getTime()+this.getTimezoneOffset()*60000+utc_offset*3600000);
3
+ var two = function(s, pad) {
4
+ if (pad == null) pad = '0';
5
+ return s < 10 ? pad + s : s + "";
6
+ };
7
+ //return str_format.replace(/MM|yyyy|hh|mm|ss|ampm/g, function(pattern){
8
+ // switch(pattern){
9
+
10
+ var month_name = function(i) {
11
+ switch (i) {
12
+ case 0 : return 'January';
13
+ case 1 : return 'February';
14
+ case 2 : return 'March';
15
+ case 3 : return 'April';
16
+ case 4 : return 'May';
17
+ case 5 : return 'June';
18
+ case 6 : return 'July';
19
+ case 7 : return 'August';
20
+ case 8 : return 'September';
21
+ case 9 : return 'October';
22
+ case 10 : return 'November';
23
+ case 11 : return 'December';
24
+ }
25
+ };
26
+
27
+ var twelve_hours = function(h) {
28
+ if (h <= 12) return h;
29
+ return h - 12;
30
+ };
31
+
32
+ return str_format.replace(/%Y|%y|%m|%_m|%-m|%B|%b|%d|%-d|%e|%j|%H|%k|%I|%l|%P|%p|%M|%S/g, function(pattern) {
33
+ switch(pattern) {
34
+ case '%Y' : return obj.getFullYear(); // Year with century (can be negative, 4 digits at least)
35
+ case '%y' : return obj.getFullYear() % 100; // Year without century
36
+ case '%m' : return two(obj.getMonth()+1); // Month of the year, zero-padded (01..12)
37
+ case '%-m' : return obj.getMonth()+1; // Month of the year, no-padded (1..12)
38
+ case '%B' : return month_name(obj.getMonth()); // The full month name (``January'')
39
+ case '%b' : return month_name(obj.getMonth()).substr(0, 3); // The abbreviated month name (``Jan'')
40
+ case '%d' : return two(obj.getDate()); // Day of the month, zero-padded (01..31)
41
+ case '%-d' : return obj.getDate(); // Day of the month, no-padded (1..31)
42
+ case '%e' : return two(obj.getDate(), ' '); // Day of the month, blank-padded ( 1..31)
43
+ case '%H' : return two(obj.getHours()); // Hour of the day, 24-hour clock, zero-padded (00..23)
44
+ case '%k' : return two(obj.getHours(), ' '); // Hour of the day, 24-hour clock, blank-padded ( 0..23)
45
+ case '%I' : return two(twelve_hours(obj.getHours())); // Hour of the day, 12-hour clock, zero-padded (01..12)
46
+ case '%l' : return two(twelve_hours(obj.getHours()), ' '); // Hour of the day, 12-hour clock, blank-padded ( 1..12)
47
+ case '%P' : return (obj.getHours() >= 12 ? 'pm' : 'am'); // Meridian indicator, lowercase (``am'' or ``pm'')
48
+ case '%p' : return (obj.getHours() >= 12 ? 'PM' : 'AM'); // Meridian indicator, uppercase (``AM'' or ``PM'')
49
+ case '%M' : return two(obj.getMinutes()); // Minute of the hour (00..59)
50
+ case '%S' : return two(obj.getSeconds()); // Second of the minute (00..59)
51
+ }
52
+ });
53
+ };
@@ -0,0 +1,7 @@
1
+ /*!
2
+ * jquery-timepicker v1.5.3 - A jQuery timepicker plugin inspired by Google Calendar. It supports both mouse and keyboard navigation.
3
+ * Copyright (c) 2015 Jon Thornton - http://jonthornton.github.com/jquery-timepicker/
4
+ * License:
5
+ */
6
+
7
+ !function(a){"object"==typeof exports&&exports&&"object"==typeof module&&module&&module.exports===exports?a(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){function b(a){var b=a[0];return b.offsetWidth>0&&b.offsetHeight>0}function c(b){if(b.minTime&&(b.minTime=u(b.minTime)),b.maxTime&&(b.maxTime=u(b.maxTime)),b.durationTime&&"function"!=typeof b.durationTime&&(b.durationTime=u(b.durationTime)),"now"==b.scrollDefault?b.scrollDefault=u(new Date):b.scrollDefault?b.scrollDefault=u(b.scrollDefault):b.minTime&&(b.scrollDefault=b.minTime),b.scrollDefault&&(b.scrollDefault=f(b.scrollDefault,b)),"string"===a.type(b.timeFormat)&&b.timeFormat.match(/[gh]/)&&(b._twelveHourTime=!0),b.disableTimeRanges.length>0){for(var c in b.disableTimeRanges)b.disableTimeRanges[c]=[u(b.disableTimeRanges[c][0]),u(b.disableTimeRanges[c][1])];b.disableTimeRanges=b.disableTimeRanges.sort(function(a,b){return a[0]-b[0]});for(var c=b.disableTimeRanges.length-1;c>0;c--)b.disableTimeRanges[c][0]<=b.disableTimeRanges[c-1][1]&&(b.disableTimeRanges[c-1]=[Math.min(b.disableTimeRanges[c][0],b.disableTimeRanges[c-1][0]),Math.max(b.disableTimeRanges[c][1],b.disableTimeRanges[c-1][1])],b.disableTimeRanges.splice(c,1))}return b}function d(b){var c=b.data("timepicker-settings"),d=b.data("timepicker-list");if(d&&d.length&&(d.remove(),b.data("timepicker-list",!1)),c.useSelect){d=a("<select />",{"class":"ui-timepicker-select"});var f=d}else{d=a("<ul />",{"class":"ui-timepicker-list"});var f=a("<div />",{"class":"ui-timepicker-wrapper",tabindex:-1});f.css({display:"none",position:"absolute"}).append(d)}if(c.noneOption)if(c.noneOption===!0&&(c.noneOption=c.useSelect?"Time...":"None"),a.isArray(c.noneOption)){for(var h in c.noneOption)if(parseInt(h,10)==h){var i=e(c.noneOption[h],c.useSelect);d.append(i)}}else{var i=e(c.noneOption,c.useSelect);d.append(i)}if(c.className&&f.addClass(c.className),(null!==c.minTime||null!==c.durationTime)&&c.showDuration){{"function"==typeof c.step?"function":c.step}f.addClass("ui-timepicker-with-duration"),f.addClass("ui-timepicker-step-"+c.step)}var k=c.minTime;"function"==typeof c.durationTime?k=u(c.durationTime()):null!==c.durationTime&&(k=c.durationTime);var m=null!==c.minTime?c.minTime:0,n=null!==c.maxTime?c.maxTime:m+w-1;m>=n&&(n+=w),n===w-1&&"string"===a.type(c.timeFormat)&&c.show2400&&(n=w);var p=c.disableTimeRanges,q=0,v=p.length,x=c.step;"function"!=typeof x&&(x=function(){return c.step});for(var h=m,z=0;n>=h;z++,h+=60*x(z)){var A=h,B=t(A,c);if(c.useSelect){var C=a("<option />",{value:B});C.text(B)}else{var C=a("<li />");C.data("time",86400>=A?A:A%86400),C.text(B)}if((null!==c.minTime||null!==c.durationTime)&&c.showDuration){var D=s(h-k,c.step);if(c.useSelect)C.text(C.text()+" ("+D+")");else{var E=a("<span />",{"class":"ui-timepicker-duration"});E.text(" ("+D+")"),C.append(E)}}v>q&&(A>=p[q][1]&&(q+=1),p[q]&&A>=p[q][0]&&A<p[q][1]&&(c.useSelect?C.prop("disabled",!0):C.addClass("ui-timepicker-disabled"))),d.append(C)}if(f.data("timepicker-input",b),b.data("timepicker-list",f),c.useSelect)b.val()&&d.val(g(b.val(),c)),d.on("focus",function(){a(this).data("timepicker-input").trigger("showTimepicker")}),d.on("blur",function(){a(this).data("timepicker-input").trigger("hideTimepicker")}),d.on("change",function(){o(b,a(this).val(),"select")}),o(b,d.val()),b.hide().after(d);else{var F=c.appendTo;"string"==typeof F?F=a(F):"function"==typeof F&&(F=F(b)),F.append(f),l(b,d),d.on("mousedown","li",function(){b.off("focus.timepicker"),b.on("focus.timepicker-ie-hack",function(){b.off("focus.timepicker-ie-hack"),b.on("focus.timepicker",y.show)}),j(b)||b[0].focus(),d.find("li").removeClass("ui-timepicker-selected"),a(this).addClass("ui-timepicker-selected"),r(b)&&(b.trigger("hideTimepicker"),d.on("mouseup.timepicker","li",function(){d.off("mouseup.timepicker"),f.hide()}))})}}function e(b,c){var d,e,f;return"object"==typeof b?(d=b.label,e=b.className,f=b.value):"string"==typeof b?d=b:a.error("Invalid noneOption value"),c?a("<option />",{value:f,"class":e,text:d}):a("<li />",{"class":e,text:d}).data("time",f)}function f(b,c){if(a.isNumeric(b)||(b=u(b)),null===b)return null;var d=b%(60*c.step);return d>=30*c.step?b+=60*c.step-d:b-=d,b}function g(a,b){return a=f(a,b),null!==a?t(a,b):void 0}function h(){return new Date(1970,1,1,0,0,0)}function i(b){var c=a(b.target),d=c.closest(".ui-timepicker-input");0===d.length&&0===c.closest(".ui-timepicker-wrapper").length&&(y.hide(),a(document).unbind(".ui-timepicker"))}function j(a){var b=a.data("timepicker-settings");return(window.navigator.msMaxTouchPoints||"ontouchstart"in document)&&b.disableTouchKeyboard}function k(b,c,d){if(!d&&0!==d)return!1;var e=b.data("timepicker-settings"),f=!1,g=30*e.step;return c.find("li").each(function(b,c){var e=a(c);if("number"==typeof e.data("time")){var h=e.data("time")-d;return Math.abs(h)<g||h==g?(f=e,!1):void 0}}),f}function l(a,b){b.find("li").removeClass("ui-timepicker-selected");var c=u(n(a),a.data("timepicker-settings"));if(null!==c){var d=k(a,b,c);if(d){var e=d.offset().top-b.offset().top;(e+d.outerHeight()>b.outerHeight()||0>e)&&b.scrollTop(b.scrollTop()+d.position().top-d.outerHeight()),d.addClass("ui-timepicker-selected")}}}function m(b,c){if(""!==this.value&&"timepicker"!=c){var d=a(this);if(!d.is(":focus")||b&&"change"==b.type){var e=d.data("timepicker-settings"),f=u(this.value,e);if(null===f)return void d.trigger("timeFormatError");var g=!1;if(null!==e.minTime&&f<e.minTime?g=!0:null!==e.maxTime&&f>e.maxTime&&(g=!0),a.each(e.disableTimeRanges,function(){return f>=this[0]&&f<this[1]?(g=!0,!1):void 0}),e.forceRoundTime){var h=f%(60*e.step);h>=30*e.step?f+=60*e.step-h:f-=h}var i=t(f,e);g?o(d,i,"error")&&d.trigger("timeRangeError"):o(d,i)}}}function n(a){return a.is("input")?a.val():a.data("ui-timepicker-value")}function o(a,b,c){if(a.is("input")){a.val(b);var d=a.data("timepicker-settings");d.useSelect&&"select"!=c&&a.data("timepicker-list").val(g(b,d))}return a.data("ui-timepicker-value")!=b?(a.data("ui-timepicker-value",b),"select"==c?a.trigger("selectTime").trigger("changeTime").trigger("change","timepicker"):"error"!=c&&a.trigger("changeTime"),!0):(a.trigger("selectTime"),!1)}function p(c){var d=a(this),e=d.data("timepicker-list");if(!e||!b(e)){if(40!=c.keyCode)return!0;y.show.call(d.get(0)),e=d.data("timepicker-list"),j(d)||d.focus()}switch(c.keyCode){case 13:return r(d)&&y.hide.apply(this),c.preventDefault(),!1;case 38:var f=e.find(".ui-timepicker-selected");return f.length?f.is(":first-child")||(f.removeClass("ui-timepicker-selected"),f.prev().addClass("ui-timepicker-selected"),f.prev().position().top<f.outerHeight()&&e.scrollTop(e.scrollTop()-f.outerHeight())):(e.find("li").each(function(b,c){return a(c).position().top>0?(f=a(c),!1):void 0}),f.addClass("ui-timepicker-selected")),!1;case 40:return f=e.find(".ui-timepicker-selected"),0===f.length?(e.find("li").each(function(b,c){return a(c).position().top>0?(f=a(c),!1):void 0}),f.addClass("ui-timepicker-selected")):f.is(":last-child")||(f.removeClass("ui-timepicker-selected"),f.next().addClass("ui-timepicker-selected"),f.next().position().top+2*f.outerHeight()>e.outerHeight()&&e.scrollTop(e.scrollTop()+f.outerHeight())),!1;case 27:e.find("li").removeClass("ui-timepicker-selected"),y.hide();break;case 9:y.hide();break;default:return!0}}function q(c){var d=a(this),e=d.data("timepicker-list");if(!e||!b(e))return!0;if(!d.data("timepicker-settings").typeaheadHighlight)return e.find("li").removeClass("ui-timepicker-selected"),!0;switch(c.keyCode){case 96:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 65:case 77:case 80:case 186:case 8:case 46:l(d,e);break;default:return}}function r(a){var b=a.data("timepicker-settings"),c=a.data("timepicker-list"),d=null,e=c.find(".ui-timepicker-selected");if(e.hasClass("ui-timepicker-disabled"))return!1;if(e.length&&(d=e.data("time")),null!==d)if("string"==typeof d)a.val(d),a.trigger("selectTime").trigger("changeTime").trigger("change","timepicker");else{var f=t(d,b);o(a,f,"select")}return!0}function s(a,b){a=Math.abs(a);var c,d,e=Math.round(a/60),f=[];return 60>e?f=[e,x.mins]:(c=Math.floor(e/60),d=e%60,30==b&&30==d&&(c+=x.decimal+5),f.push(c),f.push(1==c?x.hr:x.hrs),30!=b&&d&&(f.push(d),f.push(x.mins))),f.join(" ")}function t(b,c){if(null!==b){var d=new Date(v.valueOf()+1e3*b);if(!isNaN(d.getTime())){if("function"===a.type(c.timeFormat))return c.timeFormat(d);for(var e,f,g="",h=0;h<c.timeFormat.length;h++)switch(f=c.timeFormat.charAt(h)){case"a":g+=d.getHours()>11?x.pm:x.am;break;case"A":g+=d.getHours()>11?x.PM:x.AM;break;case"g":e=d.getHours()%12,g+=0===e?"12":e;break;case"G":e=d.getHours(),b===w&&(e=24),g+=e;break;case"h":e=d.getHours()%12,0!==e&&10>e&&(e="0"+e),g+=0===e?"12":e;break;case"H":e=d.getHours(),b===w&&(e=24),g+=e>9?e:"0"+e;break;case"i":var i=d.getMinutes();g+=i>9?i:"0"+i;break;case"s":b=d.getSeconds(),g+=b>9?b:"0"+b;break;case"\\":h++,g+=format.charAt(h);break;default:g+=f}return g}}}function u(a,b){if(""===a)return null;if(!a||a+0==a)return a;if("object"==typeof a)return 3600*a.getHours()+60*a.getMinutes()+a.getSeconds();a=a.toLowerCase().replace(".",""),("a"==a.slice(-1)||"p"==a.slice(-1))&&(a+="m");var c="("+x.am.replace(".","")+"|"+x.pm.replace(".","")+"|"+x.AM.replace(".","")+"|"+x.PM.replace(".","")+")?",d=new RegExp("^"+c+"\\s*([0-2]?[0-9])\\W?([0-5][0-9])?\\W?([0-5][0-9])?\\s*"+c+"$"),e=a.match(d);if(!e)return null;var f=parseInt(1*e[2],10),g=e[1]||e[5],h=f;if(12>=f&&g){var i=g==x.pm||g==x.PM;h=12==f?i?12:0:f+(i?12:0)}var j=1*e[3]||0,k=1*e[4]||0,l=3600*h+60*j+k;if(!g&&b&&b._twelveHourTime&&b.scrollDefault){var m=l-b.scrollDefault;0>m&&m>=w/-2&&(l=(l+w/2)%w)}return l}var v=h(),w=86400,x={am:"am",pm:"pm",AM:"AM",PM:"PM",decimal:".",mins:"mins",hr:"hr",hrs:"hrs"},y={init:function(b){return this.each(function(){var e=a(this),f=[];for(var g in a.fn.timepicker.defaults)e.data(g)&&(f[g]=e.data(g));var h=a.extend({},a.fn.timepicker.defaults,f,b);h.lang&&(x=a.extend(x,h.lang)),h=c(h),e.data("timepicker-settings",h),e.addClass("ui-timepicker-input"),h.useSelect?d(e):(e.prop("autocomplete","off"),e.on("click.timepicker focus.timepicker",y.show),e.on("change.timepicker",m),e.on("keydown.timepicker",p),e.on("keyup.timepicker",q),m.call(e.get(0)))})},show:function(c){var e=a(this),f=e.data("timepicker-settings");if(c){if(!f.showOnFocus)return!0;c.preventDefault()}if(f.useSelect)return void e.data("timepicker-list").focus();j(e)&&e.blur();var g=e.data("timepicker-list");if(!e.prop("readonly")&&(g&&0!==g.length&&"function"!=typeof f.durationTime||(d(e),g=e.data("timepicker-list")),!b(g))){y.hide(),g.show();var h={};h.left=f.orientation.match(/r/)?e.offset().left+e.outerWidth()-g.outerWidth()+parseInt(g.css("marginLeft").replace("px",""),10):e.offset().left+parseInt(g.css("marginLeft").replace("px",""),10);var l;l=f.orientation.match(/t/)?"t":f.orientation.match(/b/)?"b":e.offset().top+e.outerHeight(!0)+g.outerHeight()>a(window).height()+a(window).scrollTop()?"t":"b","t"==l?(g.addClass("ui-timepicker-positioned-top"),h.top=e.offset().top-g.outerHeight()+parseInt(g.css("marginTop").replace("px",""),10)):(g.removeClass("ui-timepicker-positioned-top"),h.top=e.offset().top+e.outerHeight()+parseInt(g.css("marginTop").replace("px",""),10)),g.offset(h);var m=g.find(".ui-timepicker-selected");if(m.length||(n(e)?m=k(e,g,u(n(e))):f.scrollDefault&&(m=k(e,g,f.scrollDefault))),m&&m.length){var o=g.scrollTop()+m.position().top-m.outerHeight();g.scrollTop(o)}else g.scrollTop(0);return a(document).on("touchstart.ui-timepicker mousedown.ui-timepicker",i),f.closeOnWindowScroll&&a(document).on("scroll.ui-timepicker",i),e.trigger("showTimepicker"),this}},hide:function(){var c=a(this),d=c.data("timepicker-settings");return d&&d.useSelect&&c.blur(),a(".ui-timepicker-wrapper").each(function(){var c=a(this);if(b(c)){var d=c.data("timepicker-input"),e=d.data("timepicker-settings");e&&e.selectOnBlur&&r(d),c.hide(),d.trigger("hideTimepicker")}}),this},option:function(b,e){return this.each(function(){var f=a(this),g=f.data("timepicker-settings"),h=f.data("timepicker-list");if("object"==typeof b)g=a.extend(g,b);else if("string"==typeof b&&"undefined"!=typeof e)g[b]=e;else if("string"==typeof b)return g[b];g=c(g),f.data("timepicker-settings",g),h&&(h.remove(),f.data("timepicker-list",!1)),g.useSelect&&d(f)})},getSecondsFromMidnight:function(){return u(n(this))},getTime:function(a){var b=this,c=n(b);if(!c)return null;a||(a=new Date);var d=u(c),e=new Date(a);return e.setHours(d/3600),e.setMinutes(d%3600/60),e.setSeconds(d%60),e.setMilliseconds(0),e},setTime:function(a){var b=this,c=b.data("timepicker-settings");if(c.forceRoundTime)var d=g(a,c);else var d=t(u(a),c);return o(b,d),b.data("timepicker-list")&&l(b,b.data("timepicker-list")),this},remove:function(){var a=this;if(a.hasClass("ui-timepicker-input")){var b=a.data("timepicker-settings");return a.removeAttr("autocomplete","off"),a.removeClass("ui-timepicker-input"),a.removeData("timepicker-settings"),a.off(".timepicker"),a.data("timepicker-list")&&a.data("timepicker-list").remove(),b.useSelect&&a.show(),a.removeData("timepicker-list"),this}}};a.fn.timepicker=function(b){return this.length?y[b]?this.hasClass("ui-timepicker-input")?y[b].apply(this,Array.prototype.slice.call(arguments,1)):this:"object"!=typeof b&&b?void a.error("Method "+b+" does not exist on jQuery.timepicker"):y.init.apply(this,arguments):this},a.fn.timepicker.defaults={className:null,minTime:null,maxTime:null,durationTime:null,step:30,showDuration:!1,showOnFocus:!0,timeFormat:"g:ia",scrollDefault:null,selectOnBlur:!1,disableTouchKeyboard:!1,forceRoundTime:!1,appendTo:"body",orientation:"l",disableTimeRanges:[],closeOnWindowScroll:!1,typeaheadHighlight:!0,noneOption:!1,show2400:!1}});
@@ -74,7 +74,8 @@ IndexTable.prototype = {
74
74
  it.quick_edit_model_id = model_id;
75
75
  it.print();
76
76
  },
77
-
77
+
78
+ allow_add: true,
78
79
  allow_bulk_edit: true,
79
80
  allow_bulk_delete: true,
80
81
  allow_bulk_import: true,
@@ -186,7 +187,8 @@ IndexTable.prototype = {
186
187
  var m = that.models[i];
187
188
  m.id = parseInt(m.id);
188
189
  }
189
- that.print();
190
+ that.print();
191
+ that.populate_search_form();
190
192
  },
191
193
  error: function() { $('#' + this.container).html("<p class='note error'>Error retrieving data.</p>"); }
192
194
  });
@@ -250,7 +252,7 @@ IndexTable.prototype = {
250
252
  else
251
253
  {
252
254
  var controls = $('<p/>');
253
- controls.append($('<input/>').attr('type', 'button').attr('id', this.container + '_new' ).val(that.new_model_text ).click(function(e) { that.new_form(); })).append(' ');
255
+ if (this.allow_add ) controls.append($('<input/>').attr('type', 'button').attr('id', this.container + '_new' ).val(that.new_model_text ).click(function(e) { that.new_form(); })).append(' ');
254
256
  controls.append($('<input/>').attr('type', 'button').attr('id', this.container + '_toggle_columns' ).val('Show/Hide Columns' ).click(function(e) { that.toggle_columns(); })).append(' ');
255
257
  if (this.allow_bulk_edit ) controls.append($('<input/>').attr('type', 'button').attr('id', this.container + '_bulk_edit' ).val('Bulk Edit' ).click(function(e) { that.bulk_edit(); })).append(' ');
256
258
  if (this.allow_bulk_import ) controls.append($('<input/>').attr('type', 'button').attr('id', this.container + '_bulk_import' ).val('Import' ).click(function(e) { that.bulk_import(); })).append(' ');
@@ -296,6 +298,14 @@ IndexTable.prototype = {
296
298
  }
297
299
  },
298
300
 
301
+ populate_search_form: function()
302
+ {
303
+ var pp = this.pager_params();
304
+ $.each(this.search_form_fields, function(i, f) {
305
+ $('#' + f).val(pp[f]);
306
+ });
307
+ },
308
+
299
309
  all_models_selected: function()
300
310
  {
301
311
  var that = this;
@@ -0,0 +1,72 @@
1
+ .ui-timepicker-wrapper {
2
+ overflow-y: auto;
3
+ height: 150px;
4
+ width: 6.5em;
5
+ background: #fff;
6
+ border: 1px solid #ddd;
7
+ -webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);
8
+ -moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);
9
+ box-shadow:0 5px 10px rgba(0,0,0,0.2);
10
+ outline: none;
11
+ z-index: 10001;
12
+ margin: 0;
13
+ }
14
+
15
+ .ui-timepicker-wrapper.ui-timepicker-with-duration {
16
+ width: 13em;
17
+ }
18
+
19
+ .ui-timepicker-wrapper.ui-timepicker-with-duration.ui-timepicker-step-30,
20
+ .ui-timepicker-wrapper.ui-timepicker-with-duration.ui-timepicker-step-60 {
21
+ width: 11em;
22
+ }
23
+
24
+ .ui-timepicker-list {
25
+ margin: 0;
26
+ padding: 0;
27
+ list-style: none;
28
+ }
29
+
30
+ .ui-timepicker-duration {
31
+ margin-left: 5px; color: #888;
32
+ }
33
+
34
+ .ui-timepicker-list:hover .ui-timepicker-duration {
35
+ color: #888;
36
+ }
37
+
38
+ .ui-timepicker-list li {
39
+ padding: 3px 0 3px 5px;
40
+ cursor: pointer;
41
+ white-space: nowrap;
42
+ color: #000;
43
+ list-style: none;
44
+ margin: 0;
45
+ }
46
+
47
+ .ui-timepicker-list:hover .ui-timepicker-selected {
48
+ background: #fff; color: #000;
49
+ }
50
+
51
+ li.ui-timepicker-selected,
52
+ .ui-timepicker-list li:hover,
53
+ .ui-timepicker-list .ui-timepicker-selected:hover {
54
+ background: #1980EC; color: #fff;
55
+ }
56
+
57
+ li.ui-timepicker-selected .ui-timepicker-duration,
58
+ .ui-timepicker-list li:hover .ui-timepicker-duration {
59
+ color: #ccc;
60
+ }
61
+
62
+ .ui-timepicker-list li.ui-timepicker-disabled,
63
+ .ui-timepicker-list li.ui-timepicker-disabled:hover,
64
+ .ui-timepicker-list li.ui-timepicker-selected.ui-timepicker-disabled {
65
+ color: #888;
66
+ cursor: default;
67
+ }
68
+
69
+ .ui-timepicker-list li.ui-timepicker-disabled:hover,
70
+ .ui-timepicker-list li.ui-timepicker-selected.ui-timepicker-disabled {
71
+ background: #f2f2f2;
72
+ }
@@ -234,7 +234,7 @@ module Caboose
234
234
  return s.value
235
235
  end
236
236
 
237
- # RedirectsConverts querystrings into hashes
237
+ # Redirects/Converts querystrings into hashes
238
238
  def hashify_query_string
239
239
  if request.query_string && request.query_string.length > 0
240
240
  redirect_to request.url.gsub('?', '#')
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.5.77'
2
+ VERSION = '0.5.78'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.77
4
+ version: 0.5.78
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-28 00:00:00.000000000 Z
11
+ date: 2015-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg
@@ -397,11 +397,13 @@ files:
397
397
  - app/assets/javascripts/caboose/checkout_module.js
398
398
  - app/assets/javascripts/caboose/checkout_payment.js
399
399
  - app/assets/javascripts/caboose/checkout_shipping.js
400
+ - app/assets/javascripts/caboose/date_format.js
400
401
  - app/assets/javascripts/caboose/imageZoom.js
401
402
  - app/assets/javascripts/caboose/jquery.detect.js
402
403
  - app/assets/javascripts/caboose/jquery.fileupload.js
403
404
  - app/assets/javascripts/caboose/jquery.iframe-transport.js
404
405
  - app/assets/javascripts/caboose/jquery.placeholder.js
406
+ - app/assets/javascripts/caboose/jquery.timepicker.js
405
407
  - app/assets/javascripts/caboose/lodash.min.js
406
408
  - app/assets/javascripts/caboose/main.js
407
409
  - app/assets/javascripts/caboose/modal.js
@@ -456,6 +458,7 @@ files:
456
458
  - app/assets/stylesheets/caboose/fonts/big_noodle_titling_oblique.ttf
457
459
  - app/assets/stylesheets/caboose/icomoon_fonts.css
458
460
  - app/assets/stylesheets/caboose/icons.txt
461
+ - app/assets/stylesheets/caboose/jquery.timepicker.css
459
462
  - app/assets/stylesheets/caboose/login.css
460
463
  - app/assets/stylesheets/caboose/message_boxes.css.scss
461
464
  - app/assets/stylesheets/caboose/modal.css