comfortable_mexican_sofa 1.10.3 → 1.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +3 -3
- data/app/assets/javascripts/comfortable_mexican_sofa/application.js.coffee +7 -7
- data/app/assets/javascripts/comfortable_mexican_sofa/lib/bootstrap-datetimepicker.js +1 -1
- data/app/assets/stylesheets/comfortable_mexican_sofa/bootstrap_overrides.css.sass +4 -2
- data/app/controllers/cms/content_controller.rb +1 -1
- data/app/models/cms/page.rb +5 -0
- data/app/views/admin/cms/layouts/_form.html.haml +3 -3
- data/app/views/admin/cms/snippets/_form.html.haml +1 -1
- data/config/cms_routes.rb +4 -2
- data/lib/comfortable_mexican_sofa/form_builder.rb +7 -7
- data/lib/comfortable_mexican_sofa/render_methods.rb +14 -2
- data/lib/comfortable_mexican_sofa/routes/cms.rb +18 -0
- data/lib/comfortable_mexican_sofa/routes/cms_admin.rb +38 -0
- data/lib/comfortable_mexican_sofa/routing.rb +6 -58
- data/lib/comfortable_mexican_sofa/version.rb +1 -1
- data/lib/generators/comfy/cms/cms_generator.rb +2 -2
- data/test/controllers/admin/cms/pages_controller_test.rb +7 -7
- data/test/controllers/cms/content_controller_test.rb +2 -2
- data/test/fixtures/generators/cms/routes.rb +2 -2
- data/test/integration/render_cms_test.rb +12 -0
- data/test/models/page_test.rb +8 -0
- metadata +31 -55
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 88a9e84e0974c67ea85659ba5faf418e8ebbee6c
|
4
|
+
data.tar.gz: 36d11549768e66008d7307ebf250abc06ca571a9
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c579974ed007bae0aea86b747ae521d517da205eac88b7fdf756219699c6874ae24eb2f7e1c78416946bfd6829532a7d137fb8d812cf813f3f07826216645a04
|
7
|
+
data.tar.gz: c473c5828a16ee19fbbf67ed9b49129bc57bd813207ee5954cc5bbbf8d23d6099bd77097abc0a2a8d8aeb67083159eae4766e78e3f4553249f03acaa7e91b49c
|
data/README.md
CHANGED
@@ -19,7 +19,7 @@ Installation
|
|
19
19
|
Add gem definition to your Gemfile:
|
20
20
|
|
21
21
|
```ruby
|
22
|
-
gem 'comfortable_mexican_sofa', '~> 1.
|
22
|
+
gem 'comfortable_mexican_sofa', '~> 1.11.0'
|
23
23
|
```
|
24
24
|
|
25
25
|
Then from the Rails project's root run:
|
@@ -31,8 +31,8 @@ Then from the Rails project's root run:
|
|
31
31
|
Now take a look inside your `config/routes.rb` file. You'll see where routes attach for the admin area and content serving. Make sure that content serving route appears as a very last item.
|
32
32
|
|
33
33
|
```ruby
|
34
|
-
|
35
|
-
|
34
|
+
comfy_path :cms_admin, :path => '/admin'
|
35
|
+
comfy_path :cms, :path => '/', :sitemap => false
|
36
36
|
```
|
37
37
|
|
38
38
|
When upgrading from the older version please take a look at [Upgrading ComfortableMexicanSofa](https://github.com/comfy/comfortable-mexican-sofa/wiki/Upgrading-ComfortableMexicanSofa)
|
@@ -52,7 +52,7 @@ window.CMS.slugify = ->
|
|
52
52
|
|
53
53
|
|
54
54
|
window.CMS.wysiwyg = ->
|
55
|
-
$('textarea[data-rich-text]').each (i, element) ->
|
55
|
+
$('textarea[data-cms-rich-text]').each (i, element) ->
|
56
56
|
$(element).wysihtml5
|
57
57
|
html: true
|
58
58
|
color: false
|
@@ -60,9 +60,9 @@ window.CMS.wysiwyg = ->
|
|
60
60
|
|
61
61
|
|
62
62
|
window.CMS.codemirror = ->
|
63
|
-
$('textarea[data-cm-mode]').each (i, element) ->
|
63
|
+
$('textarea[data-cms-cm-mode]').each (i, element) ->
|
64
64
|
cm = CodeMirror.fromTextArea element,
|
65
|
-
mode: $(element).data('cm-mode')
|
65
|
+
mode: $(element).data('cms-cm-mode')
|
66
66
|
lineWrapping: true
|
67
67
|
autoCloseTags: true
|
68
68
|
lineNumbers: true
|
@@ -81,13 +81,13 @@ window.CMS.sortable_list = ->
|
|
81
81
|
|
82
82
|
|
83
83
|
window.CMS.timepicker = ->
|
84
|
-
$('input[type=text][data-datetime]').datetimepicker
|
84
|
+
$('input[type=text][data-cms-datetime]').datetimepicker
|
85
85
|
format: 'yyyy-mm-dd hh:ii'
|
86
|
-
minView:
|
86
|
+
minView: 0
|
87
87
|
autoclose: true
|
88
|
-
$('input[type=text][data-date]').datetimepicker
|
88
|
+
$('input[type=text][data-cms-date]').datetimepicker
|
89
89
|
format: 'yyyy-mm-dd'
|
90
|
-
minView:
|
90
|
+
minView: 2
|
91
91
|
autoclose: true
|
92
92
|
|
93
93
|
|
@@ -26,4 +26,4 @@
|
|
26
26
|
* Make it work in bootstrap v3
|
27
27
|
*/
|
28
28
|
|
29
|
-
!function(e){function t(){return new Date(Date.UTC.apply(Date,arguments))}function n(){var e=new Date;return t(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),0)}var r=function(t,n){var r=this;this.element=e(t);this.language=n.language||this.element.data("date-language")||"en";this.language=this.language in i?this.language:"en";this.isRTL=i[this.language].rtl||false;this.formatType=n.formatType||this.element.data("format-type")||"standard";this.format=s.parseFormat(n.format||this.element.data("date-format")||i[this.language].format||s.getDefaultFormat(this.formatType,"input"),this.formatType);this.isInline=false;this.isVisible=false;this.isInput=this.element.is("input");this.bootcssVer=this.isInput?this.element.is(".form-control")?3:2:this.bootcssVer=this.element.is(".input-group")?3:2;this.component=this.element.is(".date")?this.bootcssVer==3?this.element.find(".input-group-addon .glyphicon-th, .input-group-addon .glyphicon-time, .input-group-addon .glyphicon-calendar").parent():this.element.find(".add-on .icon-th, .add-on .icon-time, .add-on .icon-calendar").parent():false;this.componentReset=this.element.is(".date")?this.bootcssVer==3?this.element.find(".input-group-addon .glyphicon-remove").parent():this.element.find(".add-on .icon-remove").parent():false;this.hasInput=this.component&&this.element.find("input").length;if(this.component&&this.component.length===0){this.component=false}this.linkField=n.linkField||this.element.data("link-field")||false;this.linkFormat=s.parseFormat(n.linkFormat||this.element.data("link-format")||s.getDefaultFormat(this.formatType,"link"),this.formatType);this.minuteStep=n.minuteStep||this.element.data("minute-step")||5;this.pickerPosition=n.pickerPosition||this.element.data("picker-position")||"bottom-right";this.showMeridian=n.showMeridian||this.element.data("show-meridian")||false;this.initialDate=n.initialDate||new Date;this._attachEvents();this.formatViewType="datetime";if("formatViewType"in n){this.formatViewType=n.formatViewType}else if("formatViewType"in this.element.data()){this.formatViewType=this.element.data("formatViewType")}this.minView=0;if("minView"in n){this.minView=n.minView}else if("minView"in this.element.data()){this.minView=this.element.data("min-view")}this.minView=s.convertViewMode(this.minView);this.maxView=s.modes.length-1;if("maxView"in n){this.maxView=n.maxView}else if("maxView"in this.element.data()){this.maxView=this.element.data("max-view")}this.maxView=s.convertViewMode(this.maxView);this.wheelViewModeNavigation=false;if("wheelViewModeNavigation"in n){this.wheelViewModeNavigation=n.wheelViewModeNavigation}else if("wheelViewModeNavigation"in this.element.data()){this.wheelViewModeNavigation=this.element.data("view-mode-wheel-navigation")}this.wheelViewModeNavigationInverseDirection=false;if("wheelViewModeNavigationInverseDirection"in n){this.wheelViewModeNavigationInverseDirection=n.wheelViewModeNavigationInverseDirection}else if("wheelViewModeNavigationInverseDirection"in this.element.data()){this.wheelViewModeNavigationInverseDirection=this.element.data("view-mode-wheel-navigation-inverse-dir")}this.wheelViewModeNavigationDelay=100;if("wheelViewModeNavigationDelay"in n){this.wheelViewModeNavigationDelay=n.wheelViewModeNavigationDelay}else if("wheelViewModeNavigationDelay"in this.element.data()){this.wheelViewModeNavigationDelay=this.element.data("view-mode-wheel-navigation-delay")}this.startViewMode=2;if("startView"in n){this.startViewMode=n.startView}else if("startView"in this.element.data()){this.startViewMode=this.element.data("start-view")}this.startViewMode=s.convertViewMode(this.startViewMode);this.viewMode=this.startViewMode;this.viewSelect=this.minView;if("viewSelect"in n){this.viewSelect=n.viewSelect}else if("viewSelect"in this.element.data()){this.viewSelect=this.element.data("view-select")}this.viewSelect=s.convertViewMode(this.viewSelect);this.forceParse=true;if("forceParse"in n){this.forceParse=n.forceParse}else if("dateForceParse"in this.element.data()){this.forceParse=this.element.data("date-force-parse")}this.picker=e(this.bootcssVer==3?s.templateV3:s.template).appendTo(this.isInline?this.element:"body").on({click:e.proxy(this.click,this),mousedown:e.proxy(this.mousedown,this)});if(this.wheelViewModeNavigation){if(e.fn.mousewheel){this.picker.on({mousewheel:e.proxy(this.mousewheel,this)})}else{console.log("Mouse Wheel event is not supported. Please include the jQuery Mouse Wheel plugin before enabling this option")}}if(this.isInline){this.picker.addClass("datetimepicker-inline")}else{this.picker.addClass("datetimepicker-dropdown-"+this.pickerPosition+" dropdown-menu")}if(this.isRTL){this.picker.addClass("datetimepicker-rtl");if(this.bootcssVer==3){this.picker.find(".prev span, .next span").toggleClass("glyphicon-arrow-left glyphicon-arrow-right")}else{this.picker.find(".prev i, .next i").toggleClass("icon-arrow-left icon-arrow-right")}}e(document).on("mousedown",function(t){if(e(t.target).closest(".datetimepicker").length===0){r.hide()}});this.autoclose=false;if("autoclose"in n){this.autoclose=n.autoclose}else if("dateAutoclose"in this.element.data()){this.autoclose=this.element.data("date-autoclose")}this.keyboardNavigation=true;if("keyboardNavigation"in n){this.keyboardNavigation=n.keyboardNavigation}else if("dateKeyboardNavigation"in this.element.data()){this.keyboardNavigation=this.element.data("date-keyboard-navigation")}this.todayBtn=n.todayBtn||this.element.data("date-today-btn")||false;this.todayHighlight=n.todayHighlight||this.element.data("date-today-highlight")||false;this.weekStart=(n.weekStart||this.element.data("date-weekstart")||i[this.language].weekStart||0)%7;this.weekEnd=(this.weekStart+6)%7;this.startDate=-Infinity;this.endDate=Infinity;this.daysOfWeekDisabled=[];this.setStartDate(n.startDate||this.element.data("date-startdate"));this.setEndDate(n.endDate||this.element.data("date-enddate"));this.setDaysOfWeekDisabled(n.daysOfWeekDisabled||this.element.data("date-days-of-week-disabled"));this.fillDow();this.fillMonths();this.update();this.showMode();if(this.isInline){this.show()}};r.prototype={constructor:r,_events:[],_attachEvents:function(){this._detachEvents();if(this.isInput){this._events=[[this.element,{focus:e.proxy(this.show,this),keyup:e.proxy(this.update,this),keydown:e.proxy(this.keydown,this)}]]}else if(this.component&&this.hasInput){this._events=[[this.element.find("input"),{focus:e.proxy(this.show,this),keyup:e.proxy(this.update,this),keydown:e.proxy(this.keydown,this)}],[this.component,{click:e.proxy(this.show,this)}]];if(this.componentReset){this._events.push([this.componentReset,{click:e.proxy(this.reset,this)}])}}else if(this.element.is("div")){this.isInline=true}else{this._events=[[this.element,{click:e.proxy(this.show,this)}]]}for(var t=0,n,r;t<this._events.length;t++){n=this._events[t][0];r=this._events[t][1];n.on(r)}},_detachEvents:function(){for(var e=0,t,n;e<this._events.length;e++){t=this._events[e][0];n=this._events[e][1];t.off(n)}this._events=[]},show:function(t){this.picker.show();this.height=this.component?this.component.outerHeight():this.element.outerHeight();if(this.forceParse){this.update()}this.place();e(window).on("resize",e.proxy(this.place,this));if(t){t.stopPropagation();t.preventDefault()}this.isVisible=true;this.element.trigger({type:"show",date:this.date})},hide:function(t){if(!this.isVisible)return;if(this.isInline)return;this.picker.hide();e(window).off("resize",this.place);this.viewMode=this.startViewMode;this.showMode();if(!this.isInput){e(document).off("mousedown",this.hide)}if(this.forceParse&&(this.isInput&&this.element.val()||this.hasInput&&this.element.find("input").val()))this.setValue();this.isVisible=false;this.element.trigger({type:"hide",date:this.date})},remove:function(){this._detachEvents();this.picker.remove();delete this.picker;delete this.element.data().datetimepicker},getDate:function(){var e=this.getUTCDate();return new Date(e.getTime()+e.getTimezoneOffset()*6e4)},getUTCDate:function(){return this.date},setDate:function(e){this.setUTCDate(new Date(e.getTime()-e.getTimezoneOffset()*6e4))},setUTCDate:function(e){if(e>=this.startDate&&e<=this.endDate){this.date=e;this.setValue();this.viewDate=this.date;this.fill()}else{this.element.trigger({type:"outOfRange",date:e,startDate:this.startDate,endDate:this.endDate})}},setFormat:function(e){this.format=s.parseFormat(e,this.formatType);var t;if(this.isInput){t=this.element}else if(this.component){t=this.element.find("input")}if(t&&t.val()){this.setValue()}},setValue:function(){var t=this.getFormattedDate();if(!this.isInput){if(this.component){this.element.find("input").val(t)}this.element.data("date",t)}else{this.element.val(t)}if(this.linkField){e("#"+this.linkField).val(this.getFormattedDate(this.linkFormat))}},getFormattedDate:function(e){if(e==undefined)e=this.format;return s.formatDate(this.date,e,this.language,this.formatType)},setStartDate:function(e){this.startDate=e||-Infinity;if(this.startDate!==-Infinity){this.startDate=s.parseDate(this.startDate,this.format,this.language,this.formatType)}this.update();this.updateNavArrows()},setEndDate:function(e){this.endDate=e||Infinity;if(this.endDate!==Infinity){this.endDate=s.parseDate(this.endDate,this.format,this.language,this.formatType)}this.update();this.updateNavArrows()},setDaysOfWeekDisabled:function(t){this.daysOfWeekDisabled=t||[];if(!e.isArray(this.daysOfWeekDisabled)){this.daysOfWeekDisabled=this.daysOfWeekDisabled.split(/,\s*/)}this.daysOfWeekDisabled=e.map(this.daysOfWeekDisabled,function(e){return parseInt(e,10)});this.update();this.updateNavArrows()},place:function(){if(this.isInline)return;var t=0;e("div").each(function(){var n=parseInt(e(this).css("zIndex"),10);if(n>t){t=n}});var n=t+10;var r,i,s;if(this.component){r=this.component.offset();s=r.left;if(this.pickerPosition=="bottom-left"||this.pickerPosition=="top-left"){s+=this.component.outerWidth()-this.picker.outerWidth()}}else{r=this.element.offset();s=r.left}if(this.pickerPosition=="top-left"||this.pickerPosition=="top-right"){i=r.top-this.picker.outerHeight()}else{i=r.top+this.height}this.picker.css({top:i,left:s,zIndex:n})},update:function(){var e,t=false;if(arguments&&arguments.length&&(typeof arguments[0]==="string"||arguments[0]instanceof Date)){e=arguments[0];t=true}else{e=this.element.data("date")||(this.isInput?this.element.val():this.element.find("input").val())||this.initialDate;e=e.replace(/^\s+|\s+$/g,"")}if(!e){e=new Date;t=false}this.date=s.parseDate(e,this.format,this.language,this.formatType);if(t)this.setValue();if(this.date<this.startDate){this.viewDate=new Date(this.startDate)}else if(this.date>this.endDate){this.viewDate=new Date(this.endDate)}else{this.viewDate=new Date(this.date)}this.fill()},fillDow:function(){var e=this.weekStart,t="<tr>";while(e<this.weekStart+7){t+='<th class="dow">'+i[this.language].daysMin[e++%7]+"</th>"}t+="</tr>";this.picker.find(".datetimepicker-days thead").append(t)},fillMonths:function(){var e="",t=0;while(t<12){e+='<span class="month">'+i[this.language].monthsShort[t++]+"</span>"}this.picker.find(".datetimepicker-months td").html(e)},fill:function(){if(this.date==null||this.viewDate==null){return}var n=new Date(this.viewDate),r=n.getUTCFullYear(),o=n.getUTCMonth(),u=n.getUTCDate(),a=n.getUTCHours(),f=n.getUTCMinutes(),l=this.startDate!==-Infinity?this.startDate.getUTCFullYear():-Infinity,c=this.startDate!==-Infinity?this.startDate.getUTCMonth():-Infinity,h=this.endDate!==Infinity?this.endDate.getUTCFullYear():Infinity,p=this.endDate!==Infinity?this.endDate.getUTCMonth():Infinity,d=(new t(this.date.getUTCFullYear(),this.date.getUTCMonth(),this.date.getUTCDate())).valueOf(),v=new Date;this.picker.find(".datetimepicker-days thead th:eq(1)").text(i[this.language].months[o]+" "+r);if(this.formatViewType=="time"){var m=a%12?a%12:12;var g=(m<10?"0":"")+m;var y=(f<10?"0":"")+f;var b=i[this.language].meridiem[a<12?0:1];this.picker.find(".datetimepicker-hours thead th:eq(1)").text(g+":"+y+" "+b.toUpperCase());this.picker.find(".datetimepicker-minutes thead th:eq(1)").text(g+":"+y+" "+b.toUpperCase())}else{this.picker.find(".datetimepicker-hours thead th:eq(1)").text(u+" "+i[this.language].months[o]+" "+r);this.picker.find(".datetimepicker-minutes thead th:eq(1)").text(u+" "+i[this.language].months[o]+" "+r)}this.picker.find("tfoot th.today").text(i[this.language].today).toggle(this.todayBtn!==false);this.updateNavArrows();this.fillMonths();var w=t(r,o-1,28,0,0,0,0),E=s.getDaysInMonth(w.getUTCFullYear(),w.getUTCMonth());w.setUTCDate(E);w.setUTCDate(E-(w.getUTCDay()-this.weekStart+7)%7);var S=new Date(w);S.setUTCDate(S.getUTCDate()+42);S=S.valueOf();var x=[];var T;while(w.valueOf()<S){if(w.getUTCDay()==this.weekStart){x.push("<tr>")}T="";if(w.getUTCFullYear()<r||w.getUTCFullYear()==r&&w.getUTCMonth()<o){T+=" old"}else if(w.getUTCFullYear()>r||w.getUTCFullYear()==r&&w.getUTCMonth()>o){T+=" new"}if(this.todayHighlight&&w.getUTCFullYear()==v.getFullYear()&&w.getUTCMonth()==v.getMonth()&&w.getUTCDate()==v.getDate()){T+=" today"}if(w.valueOf()==d){T+=" active"}if(w.valueOf()+864e5<=this.startDate||w.valueOf()>this.endDate||e.inArray(w.getUTCDay(),this.daysOfWeekDisabled)!==-1){T+=" disabled"}x.push('<td class="day'+T+'">'+w.getUTCDate()+"</td>");if(w.getUTCDay()==this.weekEnd){x.push("</tr>")}w.setUTCDate(w.getUTCDate()+1)}this.picker.find(".datetimepicker-days tbody").empty().append(x.join(""));x=[];var N="",C="",k="";for(var L=0;L<24;L++){var A=t(r,o,u,L);T="";if(A.valueOf()+36e5<=this.startDate||A.valueOf()>this.endDate){T+=" disabled"}else if(a==L){T+=" active"}if(this.showMeridian&&i[this.language].meridiem.length==2){C=L<12?i[this.language].meridiem[0]:i[this.language].meridiem[1];if(C!=k){if(k!=""){x.push("</fieldset>")}x.push('<fieldset class="hour"><legend>'+C.toUpperCase()+"</legend>")}k=C;N=L%12?L%12:12;x.push('<span class="hour'+T+" hour_"+(L<12?"am":"pm")+'">'+N+"</span>");if(L==23){x.push("</fieldset>")}}else{N=L+":00";x.push('<span class="hour'+T+'">'+N+"</span>")}}this.picker.find(".datetimepicker-hours td").html(x.join(""));x=[];N="",C="",k="";for(var L=0;L<60;L+=this.minuteStep){var A=t(r,o,u,a,L,0);T="";if(A.valueOf()<this.startDate||A.valueOf()>this.endDate){T+=" disabled"}else if(Math.floor(f/this.minuteStep)==Math.floor(L/this.minuteStep)){T+=" active"}if(this.showMeridian&&i[this.language].meridiem.length==2){C=a<12?i[this.language].meridiem[0]:i[this.language].meridiem[1];if(C!=k){if(k!=""){x.push("</fieldset>")}x.push('<fieldset class="minute"><legend>'+C.toUpperCase()+"</legend>")}k=C;N=a%12?a%12:12;x.push('<span class="minute'+T+'">'+N+":"+(L<10?"0"+L:L)+"</span>");if(L==59){x.push("</fieldset>")}}else{N=L+":00";x.push('<span class="minute'+T+'">'+a+":"+(L<10?"0"+L:L)+"</span>")}}this.picker.find(".datetimepicker-minutes td").html(x.join(""));var O=this.date.getUTCFullYear();var M=this.picker.find(".datetimepicker-months").find("th:eq(1)").text(r).end().find("span").removeClass("active");if(O==r){M.eq(this.date.getUTCMonth()).addClass("active")}if(r<l||r>h){M.addClass("disabled")}if(r==l){M.slice(0,c).addClass("disabled")}if(r==h){M.slice(p+1).addClass("disabled")}x="";r=parseInt(r/10,10)*10;var _=this.picker.find(".datetimepicker-years").find("th:eq(1)").text(r+"-"+(r+9)).end().find("td");r-=1;for(var L=-1;L<11;L++){x+='<span class="year'+(L==-1||L==10?" old":"")+(O==r?" active":"")+(r<l||r>h?" disabled":"")+'">'+r+"</span>";r+=1}_.html(x);this.place()},updateNavArrows:function(){var e=new Date(this.viewDate),t=e.getUTCFullYear(),n=e.getUTCMonth(),r=e.getUTCDate(),i=e.getUTCHours();switch(this.viewMode){case 0:if(this.startDate!==-Infinity&&t<=this.startDate.getUTCFullYear()&&n<=this.startDate.getUTCMonth()&&r<=this.startDate.getUTCDate()&&i<=this.startDate.getUTCHours()){this.picker.find(".prev").css({visibility:"hidden"})}else{this.picker.find(".prev").css({visibility:"visible"})}if(this.endDate!==Infinity&&t>=this.endDate.getUTCFullYear()&&n>=this.endDate.getUTCMonth()&&r>=this.endDate.getUTCDate()&&i>=this.endDate.getUTCHours()){this.picker.find(".next").css({visibility:"hidden"})}else{this.picker.find(".next").css({visibility:"visible"})}break;case 1:if(this.startDate!==-Infinity&&t<=this.startDate.getUTCFullYear()&&n<=this.startDate.getUTCMonth()&&r<=this.startDate.getUTCDate()){this.picker.find(".prev").css({visibility:"hidden"})}else{this.picker.find(".prev").css({visibility:"visible"})}if(this.endDate!==Infinity&&t>=this.endDate.getUTCFullYear()&&n>=this.endDate.getUTCMonth()&&r>=this.endDate.getUTCDate()){this.picker.find(".next").css({visibility:"hidden"})}else{this.picker.find(".next").css({visibility:"visible"})}break;case 2:if(this.startDate!==-Infinity&&t<=this.startDate.getUTCFullYear()&&n<=this.startDate.getUTCMonth()){this.picker.find(".prev").css({visibility:"hidden"})}else{this.picker.find(".prev").css({visibility:"visible"})}if(this.endDate!==Infinity&&t>=this.endDate.getUTCFullYear()&&n>=this.endDate.getUTCMonth()){this.picker.find(".next").css({visibility:"hidden"})}else{this.picker.find(".next").css({visibility:"visible"})}break;case 3:case 4:if(this.startDate!==-Infinity&&t<=this.startDate.getUTCFullYear()){this.picker.find(".prev").css({visibility:"hidden"})}else{this.picker.find(".prev").css({visibility:"visible"})}if(this.endDate!==Infinity&&t>=this.endDate.getUTCFullYear()){this.picker.find(".next").css({visibility:"hidden"})}else{this.picker.find(".next").css({visibility:"visible"})}break}},mousewheel:function(t){t.preventDefault();t.stopPropagation();if(this.wheelPause){return}this.wheelPause=true;var n=t.originalEvent;var r=n.wheelDelta;var i=r>0?1:r===0?0:-1;if(this.wheelViewModeNavigationInverseDirection){i=-i}this.showMode(i);setTimeout(e.proxy(function(){this.wheelPause=false},this),this.wheelViewModeNavigationDelay)},click:function(n){n.stopPropagation();n.preventDefault();var r=e(n.target).closest("span, td, th, legend");if(r.length==1){if(r.is(".disabled")){this.element.trigger({type:"outOfRange",date:this.viewDate,startDate:this.startDate,endDate:this.endDate});return}switch(r[0].nodeName.toLowerCase()){case"th":switch(r[0].className){case"switch":this.showMode(1);break;case"prev":case"next":var i=s.modes[this.viewMode].navStep*(r[0].className=="prev"?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveHour(this.viewDate,i);break;case 1:this.viewDate=this.moveDate(this.viewDate,i);break;case 2:this.viewDate=this.moveMonth(this.viewDate,i);break;case 3:case 4:this.viewDate=this.moveYear(this.viewDate,i);break}this.fill();break;case"today":var o=new Date;o=t(o.getFullYear(),o.getMonth(),o.getDate(),o.getHours(),o.getMinutes(),o.getSeconds(),0);if(o<this.startDate)o=this.startDate;else if(o>this.endDate)o=this.endDate;this.viewMode=this.startViewMode;this.showMode(0);this._setDate(o);this.fill();if(this.autoclose){this.hide()}break}break;case"span":if(!r.is(".disabled")){var u=this.viewDate.getUTCFullYear(),a=this.viewDate.getUTCMonth(),f=this.viewDate.getUTCDate(),l=this.viewDate.getUTCHours(),c=this.viewDate.getUTCMinutes(),h=this.viewDate.getUTCSeconds();if(r.is(".month")){this.viewDate.setUTCDate(1);a=r.parent().find("span").index(r);f=this.viewDate.getUTCDate();this.viewDate.setUTCMonth(a);this.element.trigger({type:"changeMonth",date:this.viewDate});if(this.viewSelect>=3){this._setDate(t(u,a,f,l,c,h,0))}}else if(r.is(".year")){this.viewDate.setUTCDate(1);u=parseInt(r.text(),10)||0;this.viewDate.setUTCFullYear(u);this.element.trigger({type:"changeYear",date:this.viewDate});if(this.viewSelect>=4){this._setDate(t(u,a,f,l,c,h,0))}}else if(r.is(".hour")){l=parseInt(r.text(),10)||0;if(r.hasClass("hour_am")||r.hasClass("hour_pm")){if(l==12&&r.hasClass("hour_am")){l=0}else if(l!=12&&r.hasClass("hour_pm")){l+=12}}this.viewDate.setUTCHours(l);this.element.trigger({type:"changeHour",date:this.viewDate});if(this.viewSelect>=1){this._setDate(t(u,a,f,l,c,h,0))}}else if(r.is(".minute")){c=parseInt(r.text().substr(r.text().indexOf(":")+1),10)||0;this.viewDate.setUTCMinutes(c);this.element.trigger({type:"changeMinute",date:this.viewDate});if(this.viewSelect>=0){this._setDate(t(u,a,f,l,c,h,0))}}if(this.viewMode!=0){var p=this.viewMode;this.showMode(-1);this.fill();if(p==this.viewMode&&this.autoclose){this.hide()}}else{this.fill();if(this.autoclose){this.hide()}}}break;case"td":if(r.is(".day")&&!r.is(".disabled")){var f=parseInt(r.text(),10)||1;var u=this.viewDate.getUTCFullYear(),a=this.viewDate.getUTCMonth(),l=this.viewDate.getUTCHours(),c=this.viewDate.getUTCMinutes(),h=this.viewDate.getUTCSeconds();if(r.is(".old")){if(a===0){a=11;u-=1}else{a-=1}}else if(r.is(".new")){if(a==11){a=0;u+=1}else{a+=1}}this.viewDate.setUTCFullYear(u);this.viewDate.setUTCMonth(a);this.viewDate.setUTCDate(f);this.element.trigger({type:"changeDay",date:this.viewDate});if(this.viewSelect>=2){this._setDate(t(u,a,f,l,c,h,0))}}var p=this.viewMode;this.showMode(-1);this.fill();if(p==this.viewMode&&this.autoclose){this.hide()}break}}},_setDate:function(e,t){if(!t||t=="date")this.date=e;if(!t||t=="view")this.viewDate=e;this.fill();this.setValue();var n;if(this.isInput){n=this.element}else if(this.component){n=this.element.find("input")}if(n){n.change();if(this.autoclose&&(!t||t=="date")){}}this.element.trigger({type:"changeDate",date:this.date})},moveMinute:function(e,t){if(!t)return e;var n=new Date(e.valueOf());n.setUTCMinutes(n.getUTCMinutes()+t*this.minuteStep);return n},moveHour:function(e,t){if(!t)return e;var n=new Date(e.valueOf());n.setUTCHours(n.getUTCHours()+t);return n},moveDate:function(e,t){if(!t)return e;var n=new Date(e.valueOf());n.setUTCDate(n.getUTCDate()+t);return n},moveMonth:function(e,t){if(!t)return e;var n=new Date(e.valueOf()),r=n.getUTCDate(),i=n.getUTCMonth(),s=Math.abs(t),o,u;t=t>0?1:-1;if(s==1){u=t==-1?function(){return n.getUTCMonth()==i}:function(){return n.getUTCMonth()!=o};o=i+t;n.setUTCMonth(o);if(o<0||o>11)o=(o+12)%12}else{for(var a=0;a<s;a++)n=this.moveMonth(n,t);o=n.getUTCMonth();n.setUTCDate(r);u=function(){return o!=n.getUTCMonth()}}while(u()){n.setUTCDate(--r);n.setUTCMonth(o)}return n},moveYear:function(e,t){return this.moveMonth(e,t*12)},dateWithinRange:function(e){return e>=this.startDate&&e<=this.endDate},keydown:function(e){if(this.picker.is(":not(:visible)")){if(e.keyCode==27)this.show();return}var t=false,n,r,i,s,o;switch(e.keyCode){case 27:this.hide();e.preventDefault();break;case 37:case 39:if(!this.keyboardNavigation)break;n=e.keyCode==37?-1:1;viewMode=this.viewMode;if(e.ctrlKey){viewMode+=2}else if(e.shiftKey){viewMode+=1}if(viewMode==4){s=this.moveYear(this.date,n);o=this.moveYear(this.viewDate,n)}else if(viewMode==3){s=this.moveMonth(this.date,n);o=this.moveMonth(this.viewDate,n)}else if(viewMode==2){s=this.moveDate(this.date,n);o=this.moveDate(this.viewDate,n)}else if(viewMode==1){s=this.moveHour(this.date,n);o=this.moveHour(this.viewDate,n)}else if(viewMode==0){s=this.moveMinute(this.date,n);o=this.moveMinute(this.viewDate,n)}if(this.dateWithinRange(s)){this.date=s;this.viewDate=o;this.setValue();this.update();e.preventDefault();t=true}break;case 38:case 40:if(!this.keyboardNavigation)break;n=e.keyCode==38?-1:1;viewMode=this.viewMode;if(e.ctrlKey){viewMode+=2}else if(e.shiftKey){viewMode+=1}if(viewMode==4){s=this.moveYear(this.date,n);o=this.moveYear(this.viewDate,n)}else if(viewMode==3){s=this.moveMonth(this.date,n);o=this.moveMonth(this.viewDate,n)}else if(viewMode==2){s=this.moveDate(this.date,n*7);o=this.moveDate(this.viewDate,n*7)}else if(viewMode==1){if(this.showMeridian){s=this.moveHour(this.date,n*6);o=this.moveHour(this.viewDate,n*6)}else{s=this.moveHour(this.date,n*4);o=this.moveHour(this.viewDate,n*4)}}else if(viewMode==0){s=this.moveMinute(this.date,n*4);o=this.moveMinute(this.viewDate,n*4)}if(this.dateWithinRange(s)){this.date=s;this.viewDate=o;this.setValue();this.update();e.preventDefault();t=true}break;case 13:if(this.viewMode!=0){var u=this.viewMode;this.showMode(-1);this.fill();if(u==this.viewMode&&this.autoclose){this.hide()}}else{this.fill();if(this.autoclose){this.hide()}}e.preventDefault();break;case 9:this.hide();break}if(t){var a;if(this.isInput){a=this.element}else if(this.component){a=this.element.find("input")}if(a){a.change()}this.element.trigger({type:"changeDate",date:this.date})}},showMode:function(e){if(e){var t=Math.max(0,Math.min(s.modes.length-1,this.viewMode+e));if(t>=this.minView&&t<=this.maxView){this.element.trigger({type:"changeMode",date:this.viewDate,oldViewMode:this.viewMode,newViewMode:t});this.viewMode=t}}this.picker.find(">div").hide().filter(".datetimepicker-"+s.modes[this.viewMode].clsName).css("display","block");this.updateNavArrows()},reset:function(e){this._setDate(null,"date")}};e.fn.datetimepicker=function(t){var n=Array.apply(null,arguments);n.shift();return this.each(function(){var i=e(this),s=i.data("datetimepicker"),o=typeof t=="object"&&t;if(!s){i.data("datetimepicker",s=new r(this,e.extend({},e.fn.datetimepicker.defaults,o)))}if(typeof t=="string"&&typeof s[t]=="function"){s[t].apply(s,n)}})};e.fn.datetimepicker.defaults={};e.fn.datetimepicker.Constructor=r;var i=e.fn.datetimepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],meridiem:["am","pm"],suffix:["st","nd","rd","th"],today:"Today"}};var s={modes:[{clsName:"minutes",navFnc:"Hours",navStep:1},{clsName:"hours",navFnc:"Date",navStep:1},{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(e){return e%4===0&&e%100!==0||e%400===0},getDaysInMonth:function(e,t){return[31,s.isLeapYear(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]},getDefaultFormat:function(e,t){if(e=="standard"){if(t=="input")return"yyyy-mm-dd hh:ii";else return"yyyy-mm-dd hh:ii:ss"}else if(e=="php"){if(t=="input")return"Y-m-d H:i";else return"Y-m-d H:i:s"}else{throw new Error("Invalid format type.")}},validParts:function(e){if(e=="standard"){return/hh?|HH?|p|P|ii?|ss?|dd?|DD?|mm?|MM?|yy(?:yy)?/g}else if(e=="php"){return/[dDjlNwzFmMnStyYaABgGhHis]/g}else{throw new Error("Invalid format type.")}},nonpunctuation:/[^ -\/:-@\[-`{-~\t\n\rTZ]+/g,parseFormat:function(e,t){var n=e.replace(this.validParts(t),"\0").split("\0"),r=e.match(this.validParts(t));if(!n||!n.length||!r||r.length==0){throw new Error("Invalid date format.")}return{separators:n,parts:r}},parseDate:function(n,s,o,u){if(n instanceof Date){var a=new Date(n.valueOf()-n.getTimezoneOffset()*6e4);a.setMilliseconds(0);return a}if(/^\d{4}\-\d{1,2}\-\d{1,2}$/.test(n)){s=this.parseFormat("yyyy-mm-dd",u)}if(/^\d{4}\-\d{1,2}\-\d{1,2}[T ]\d{1,2}\:\d{1,2}$/.test(n)){s=this.parseFormat("yyyy-mm-dd hh:ii",u)}if(/^\d{4}\-\d{1,2}\-\d{1,2}[T ]\d{1,2}\:\d{1,2}\:\d{1,2}[Z]{0,1}$/.test(n)){s=this.parseFormat("yyyy-mm-dd hh:ii:ss",u)}if(/^[-+]\d+[dmwy]([\s,]+[-+]\d+[dmwy])*$/.test(n)){var f=/([-+]\d+)([dmwy])/,l=n.match(/([-+]\d+)([dmwy])/g),c,h;n=new Date;for(var p=0;p<l.length;p++){c=f.exec(l[p]);h=parseInt(c[1]);switch(c[2]){case"d":n.setUTCDate(n.getUTCDate()+h);break;case"m":n=r.prototype.moveMonth.call(r.prototype,n,h);break;case"w":n.setUTCDate(n.getUTCDate()+h*7);break;case"y":n=r.prototype.moveYear.call(r.prototype,n,h);break}}return t(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds(),0)}var l=n&&n.match(this.nonpunctuation)||[],n=new Date(0,0,0,0,0,0,0),d={},v=["hh","h","ii","i","ss","s","yyyy","yy","M","MM","m","mm","D","DD","d","dd","H","HH","p","P"],m={hh:function(e,t){return e.setUTCHours(t)},h:function(e,t){return e.setUTCHours(t)},HH:function(e,t){return e.setUTCHours(t==12?0:t)},H:function(e,t){return e.setUTCHours(t==12?0:t)},ii:function(e,t){return e.setUTCMinutes(t)},i:function(e,t){return e.setUTCMinutes(t)},ss:function(e,t){return e.setUTCSeconds(t)},s:function(e,t){return e.setUTCSeconds(t)},yyyy:function(e,t){return e.setUTCFullYear(t)},yy:function(e,t){return e.setUTCFullYear(2e3+t)},m:function(e,t){t-=1;while(t<0)t+=12;t%=12;e.setUTCMonth(t);while(e.getUTCMonth()!=t)e.setUTCDate(e.getUTCDate()-1);return e},d:function(e,t){return e.setUTCDate(t)},p:function(e,t){return e.setUTCHours(t==1?e.getUTCHours()+12:e.getUTCHours())}},g,y,c;m["M"]=m["MM"]=m["mm"]=m["m"];m["dd"]=m["d"];m["P"]=m["p"];n=t(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds());if(l.length==s.parts.length){for(var p=0,b=s.parts.length;p<b;p++){g=parseInt(l[p],10);c=s.parts[p];if(isNaN(g)){switch(c){case"MM":y=e(i[o].months).filter(function(){var e=this.slice(0,l[p].length),t=l[p].slice(0,e.length);return e==t});g=e.inArray(y[0],i[o].months)+1;break;case"M":y=e(i[o].monthsShort).filter(function(){var e=this.slice(0,l[p].length),t=l[p].slice(0,e.length);return e==t});g=e.inArray(y[0],i[o].monthsShort)+1;break;case"p":case"P":g=e.inArray(l[p].toLowerCase(),i[o].meridiem);break}}d[c]=g}for(var p=0,w;p<v.length;p++){w=v[p];if(w in d&&!isNaN(d[w]))m[w](n,d[w])}}return n},formatDate:function(t,n,r,o){if(t==null){return""}var u;if(o=="standard"){u={yy:t.getUTCFullYear().toString().substring(2),yyyy:t.getUTCFullYear(),m:t.getUTCMonth()+1,M:i[r].monthsShort[t.getUTCMonth()],MM:i[r].months[t.getUTCMonth()],d:t.getUTCDate(),D:i[r].daysShort[t.getUTCDay()],DD:i[r].days[t.getUTCDay()],p:i[r].meridiem.length==2?i[r].meridiem[t.getUTCHours()<12?0:1]:"",h:t.getUTCHours(),i:t.getUTCMinutes(),s:t.getUTCSeconds()};if(i[r].meridiem.length==2){u.H=u.h%12==0?12:u.h%12}else{u.H=u.h}u.HH=(u.H<10?"0":"")+u.H;u.P=u.p.toUpperCase();u.hh=(u.h<10?"0":"")+u.h;u.ii=(u.i<10?"0":"")+u.i;u.ss=(u.s<10?"0":"")+u.s;u.dd=(u.d<10?"0":"")+u.d;u.mm=(u.m<10?"0":"")+u.m}else if(o=="php"){u={y:t.getUTCFullYear().toString().substring(2),Y:t.getUTCFullYear(),F:i[r].months[t.getUTCMonth()],M:i[r].monthsShort[t.getUTCMonth()],n:t.getUTCMonth()+1,t:s.getDaysInMonth(t.getUTCFullYear(),t.getUTCMonth()),j:t.getUTCDate(),l:i[r].days[t.getUTCDay()],D:i[r].daysShort[t.getUTCDay()],w:t.getUTCDay(),N:t.getUTCDay()==0?7:t.getUTCDay(),S:t.getUTCDate()%10<=i[r].suffix.length?i[r].suffix[t.getUTCDate()%10-1]:"",a:i[r].meridiem.length==2?i[r].meridiem[t.getUTCHours()<12?0:1]:"",g:t.getUTCHours()%12==0?12:t.getUTCHours()%12,G:t.getUTCHours(),i:t.getUTCMinutes(),s:t.getUTCSeconds()};u.m=(u.n<10?"0":"")+u.n;u.d=(u.j<10?"0":"")+u.j;u.A=u.a.toString().toUpperCase();u.h=(u.g<10?"0":"")+u.g;u.H=(u.G<10?"0":"")+u.G;u.i=(u.i<10?"0":"")+u.i;u.s=(u.s<10?"0":"")+u.s}else{throw new Error("Invalid format type.")}var t=[],a=e.extend([],n.separators);for(var f=0,l=n.parts.length;f<l;f++){if(a.length){t.push(a.shift())}t.push(u[n.parts[f]])}if(a.length){t.push(a.shift())}return t.join("")},convertViewMode:function(e){switch(e){case 4:case"decade":e=4;break;case 3:case"year":e=3;break;case 2:case"month":e=2;break;case 1:case"day":e=1;break;case 0:case"hour":e=0;break}return e},headTemplate:"<thead>"+"<tr>"+'<th class="prev"><i class="icon-arrow-left"/></th>'+'<th colspan="5" class="switch"></th>'+'<th class="next"><i class="icon-arrow-right"/></th>'+"</tr>"+"</thead>",headTemplateV3:"<thead>"+"<tr>"+'<th class="prev"><i class="glyphicon glyphicon-arrow-left"></i> </th>'+'<th colspan="5" class="switch"></th>'+'<th class="next"><i class="glyphicon glyphicon-arrow-right"></i> </th>'+"</tr>"+"</thead>",contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"></th></tr></tfoot>'};s.template='<div class="datetimepicker">'+'<div class="datetimepicker-minutes">'+'<table class=" table-condensed">'+s.headTemplate+s.contTemplate+s.footTemplate+"</table>"+"</div>"+'<div class="datetimepicker-hours">'+'<table class=" table-condensed">'+s.headTemplate+s.contTemplate+s.footTemplate+"</table>"+"</div>"+'<div class="datetimepicker-days">'+'<table class=" table-condensed">'+s.headTemplate+"<tbody></tbody>"+s.footTemplate+"</table>"+"</div>"+'<div class="datetimepicker-months">'+'<table class="table-condensed">'+s.headTemplate+s.contTemplate+s.footTemplate+"</table>"+"</div>"+'<div class="datetimepicker-years">'+'<table class="table-condensed">'+s.headTemplate+s.contTemplate+s.footTemplate+"</table>"+"</div>"+"</div>";s.templateV3='<div class="datetimepicker">'+'<div class="datetimepicker-minutes">'+'<table class=" table-condensed">'+s.headTemplateV3+s.contTemplate+s.footTemplate+"</table>"+"</div>"+'<div class="datetimepicker-hours">'+'<table class=" table-condensed">'+s.headTemplateV3+s.contTemplate+s.footTemplate+"</table>"+"</div>"+'<div class="datetimepicker-days">'+'<table class=" table-condensed">'+s.headTemplateV3+"<tbody></tbody>"+s.footTemplate+"</table>"+"</div>"+'<div class="datetimepicker-months">'+'<table class="table-condensed">'+s.headTemplateV3+s.contTemplate+s.footTemplate+"</table>"+"</div>"+'<div class="datetimepicker-years">'+'<table class="table-condensed">'+s.headTemplateV3+s.contTemplate+s.footTemplate+"</table>"+"</div>"+"</div>";e.fn.datetimepicker.DPGlobal=s;e.fn.datetimepicker.noConflict=function(){e.fn.datetimepicker=old;return this};e(document).on("focus.datetimepicker.data-api click.datetimepicker.data-api",'[data-provide="datetimepicker"]',function(t){var n=e(this);if(n.data("datetimepicker"))return;t.preventDefault();n.datetimepicker("show")});e(function(){e('[data-provide="datetimepicker-inline"]').datetimepicker()})}(window.jQuery)
|
29
|
+
!function(c){function f(){return new Date(Date.UTC.apply(Date,arguments))}function a(){var g=new Date();return f(g.getUTCFullYear(),g.getUTCMonth(),g.getUTCDate(),g.getUTCHours(),g.getUTCMinutes(),g.getUTCSeconds(),0)}var e=function(h,g){var i=this;this.element=c(h);this.language=g.language||this.element.data("date-language")||"en";this.language=this.language in d?this.language:"en";this.isRTL=d[this.language].rtl||false;this.formatType=g.formatType||this.element.data("format-type")||"standard";this.format=b.parseFormat(g.format||this.element.data("date-format")||d[this.language].format||b.getDefaultFormat(this.formatType,"input"),this.formatType);this.isInline=false;this.isVisible=false;this.isInput=this.element.is("input");this.bootcssVer=this.isInput?(this.element.is(".form-control")?3:2):(this.bootcssVer=this.element.is(".input-group")?3:2);this.component=this.element.is(".date")?(this.bootcssVer==3?this.element.find(".input-group-addon .glyphicon-th, .input-group-addon .glyphicon-time, .input-group-addon .glyphicon-calendar").parent():this.element.find(".add-on .icon-th, .add-on .icon-time, .add-on .icon-calendar").parent()):false;this.componentReset=this.element.is(".date")?(this.bootcssVer==3?this.element.find(".input-group-addon .glyphicon-remove").parent():this.element.find(".add-on .icon-remove").parent()):false;this.hasInput=this.component&&this.element.find("input").length;if(this.component&&this.component.length===0){this.component=false}this.linkField=g.linkField||this.element.data("link-field")||false;this.linkFormat=b.parseFormat(g.linkFormat||this.element.data("link-format")||b.getDefaultFormat(this.formatType,"link"),this.formatType);this.minuteStep=g.minuteStep||this.element.data("minute-step")||5;this.pickerPosition=g.pickerPosition||this.element.data("picker-position")||"bottom-right";this.showMeridian=g.showMeridian||this.element.data("show-meridian")||false;this.initialDate=g.initialDate||new Date();this._attachEvents();this.formatViewType="datetime";if("formatViewType" in g){this.formatViewType=g.formatViewType}else{if("formatViewType" in this.element.data()){this.formatViewType=this.element.data("formatViewType")}}this.minView=0;if("minView" in g){this.minView=g.minView}else{if("minView" in this.element.data()){this.minView=this.element.data("min-view")}}this.minView=b.convertViewMode(this.minView);this.maxView=b.modes.length-1;if("maxView" in g){this.maxView=g.maxView}else{if("maxView" in this.element.data()){this.maxView=this.element.data("max-view")}}this.maxView=b.convertViewMode(this.maxView);this.wheelViewModeNavigation=false;if("wheelViewModeNavigation" in g){this.wheelViewModeNavigation=g.wheelViewModeNavigation}else{if("wheelViewModeNavigation" in this.element.data()){this.wheelViewModeNavigation=this.element.data("view-mode-wheel-navigation")}}this.wheelViewModeNavigationInverseDirection=false;if("wheelViewModeNavigationInverseDirection" in g){this.wheelViewModeNavigationInverseDirection=g.wheelViewModeNavigationInverseDirection}else{if("wheelViewModeNavigationInverseDirection" in this.element.data()){this.wheelViewModeNavigationInverseDirection=this.element.data("view-mode-wheel-navigation-inverse-dir")}}this.wheelViewModeNavigationDelay=100;if("wheelViewModeNavigationDelay" in g){this.wheelViewModeNavigationDelay=g.wheelViewModeNavigationDelay}else{if("wheelViewModeNavigationDelay" in this.element.data()){this.wheelViewModeNavigationDelay=this.element.data("view-mode-wheel-navigation-delay")}}this.startViewMode=2;if("startView" in g){this.startViewMode=g.startView}else{if("startView" in this.element.data()){this.startViewMode=this.element.data("start-view")}}this.startViewMode=b.convertViewMode(this.startViewMode);this.viewMode=this.startViewMode;this.viewSelect=this.minView;if("viewSelect" in g){this.viewSelect=g.viewSelect}else{if("viewSelect" in this.element.data()){this.viewSelect=this.element.data("view-select")}}this.viewSelect=b.convertViewMode(this.viewSelect);this.forceParse=true;if("forceParse" in g){this.forceParse=g.forceParse}else{if("dateForceParse" in this.element.data()){this.forceParse=this.element.data("date-force-parse")}}this.picker=c((this.bootcssVer==3)?b.templateV3:b.template).appendTo(this.isInline?this.element:"body").on({click:c.proxy(this.click,this),mousedown:c.proxy(this.mousedown,this)});if(this.wheelViewModeNavigation){if(c.fn.mousewheel){this.picker.on({mousewheel:c.proxy(this.mousewheel,this)})}else{console.log("Mouse Wheel event is not supported. Please include the jQuery Mouse Wheel plugin before enabling this option")}}if(this.isInline){this.picker.addClass("datetimepicker-inline")}else{this.picker.addClass("datetimepicker-dropdown-"+this.pickerPosition+" dropdown-menu")}if(this.isRTL){this.picker.addClass("datetimepicker-rtl");if(this.bootcssVer==3){this.picker.find(".prev span, .next span").toggleClass("glyphicon-arrow-left glyphicon-arrow-right")}else{this.picker.find(".prev i, .next i").toggleClass("icon-arrow-left icon-arrow-right")}}c(document).on("mousedown",function(j){if(c(j.target).closest(".datetimepicker").length===0){i.hide()}});this.autoclose=false;if("autoclose" in g){this.autoclose=g.autoclose}else{if("dateAutoclose" in this.element.data()){this.autoclose=this.element.data("date-autoclose")}}this.keyboardNavigation=true;if("keyboardNavigation" in g){this.keyboardNavigation=g.keyboardNavigation}else{if("dateKeyboardNavigation" in this.element.data()){this.keyboardNavigation=this.element.data("date-keyboard-navigation")}}this.todayBtn=(g.todayBtn||this.element.data("date-today-btn")||false);this.todayHighlight=(g.todayHighlight||this.element.data("date-today-highlight")||false);this.weekStart=((g.weekStart||this.element.data("date-weekstart")||d[this.language].weekStart||0)%7);this.weekEnd=((this.weekStart+6)%7);this.startDate=-Infinity;this.endDate=Infinity;this.daysOfWeekDisabled=[];this.setStartDate(g.startDate||this.element.data("date-startdate"));this.setEndDate(g.endDate||this.element.data("date-enddate"));this.setDaysOfWeekDisabled(g.daysOfWeekDisabled||this.element.data("date-days-of-week-disabled"));this.fillDow();this.fillMonths();this.update();this.showMode();if(this.isInline){this.show()}};e.prototype={constructor:e,_events:[],_attachEvents:function(){this._detachEvents();if(this.isInput){this._events=[[this.element,{focus:c.proxy(this.show,this),keyup:c.proxy(this.update,this),keydown:c.proxy(this.keydown,this)}]]}else{if(this.component&&this.hasInput){this._events=[[this.element.find("input"),{focus:c.proxy(this.show,this),keyup:c.proxy(this.update,this),keydown:c.proxy(this.keydown,this)}],[this.component,{click:c.proxy(this.show,this)}]];if(this.componentReset){this._events.push([this.componentReset,{click:c.proxy(this.reset,this)}])}}else{if(this.element.is("div")){this.isInline=true}else{this._events=[[this.element,{click:c.proxy(this.show,this)}]]}}}for(var g=0,h,j;g<this._events.length;g++){h=this._events[g][0];j=this._events[g][1];h.on(j)}},_detachEvents:function(){for(var g=0,h,j;g<this._events.length;g++){h=this._events[g][0];j=this._events[g][1];h.off(j)}this._events=[]},show:function(g){this.picker.show();this.height=this.component?this.component.outerHeight():this.element.outerHeight();if(this.forceParse){this.update()}this.place();c(window).on("resize",c.proxy(this.place,this));if(g){g.stopPropagation();g.preventDefault()}this.isVisible=true;this.element.trigger({type:"show",date:this.date})},hide:function(g){if(!this.isVisible){return}if(this.isInline){return}this.picker.hide();c(window).off("resize",this.place);this.viewMode=this.startViewMode;this.showMode();if(!this.isInput){c(document).off("mousedown",this.hide)}if(this.forceParse&&(this.isInput&&this.element.val()||this.hasInput&&this.element.find("input").val())){this.setValue()}this.isVisible=false;this.element.trigger({type:"hide",date:this.date})},remove:function(){this._detachEvents();this.picker.remove();delete this.picker;delete this.element.data().datetimepicker},getDate:function(){var g=this.getUTCDate();return new Date(g.getTime()+(g.getTimezoneOffset()*60000))},getUTCDate:function(){return this.date},setDate:function(g){this.setUTCDate(new Date(g.getTime()-(g.getTimezoneOffset()*60000)))},setUTCDate:function(g){if(g>=this.startDate&&g<=this.endDate){this.date=g;this.setValue();this.viewDate=this.date;this.fill()}else{this.element.trigger({type:"outOfRange",date:g,startDate:this.startDate,endDate:this.endDate})}},setFormat:function(h){this.format=b.parseFormat(h,this.formatType);var g;if(this.isInput){g=this.element}else{if(this.component){g=this.element.find("input")}}if(g&&g.val()){this.setValue()}},setValue:function(){var g=this.getFormattedDate();if(!this.isInput){if(this.component){this.element.find("input").val(g)}this.element.data("date",g)}else{this.element.val(g)}if(this.linkField){c("#"+this.linkField).val(this.getFormattedDate(this.linkFormat))}},getFormattedDate:function(g){if(g==undefined){g=this.format}return b.formatDate(this.date,g,this.language,this.formatType)},setStartDate:function(g){this.startDate=g||-Infinity;if(this.startDate!==-Infinity){this.startDate=b.parseDate(this.startDate,this.format,this.language,this.formatType)}this.update();this.updateNavArrows()},setEndDate:function(g){this.endDate=g||Infinity;if(this.endDate!==Infinity){this.endDate=b.parseDate(this.endDate,this.format,this.language,this.formatType)}this.update();this.updateNavArrows()},setDaysOfWeekDisabled:function(g){this.daysOfWeekDisabled=g||[];if(!c.isArray(this.daysOfWeekDisabled)){this.daysOfWeekDisabled=this.daysOfWeekDisabled.split(/,\s*/)}this.daysOfWeekDisabled=c.map(this.daysOfWeekDisabled,function(h){return parseInt(h,10)});this.update();this.updateNavArrows()},place:function(){if(this.isInline){return}var g=0;c("div").each(function(){var l=parseInt(c(this).css("zIndex"),10);if(l>g){g=l}});var k=g+10;var j,i,h;if(this.component){j=this.component.offset();h=j.left;if(this.pickerPosition=="bottom-left"||this.pickerPosition=="top-left"){h+=this.component.outerWidth()-this.picker.outerWidth()}}else{j=this.element.offset();h=j.left}if(this.pickerPosition=="top-left"||this.pickerPosition=="top-right"){i=j.top-this.picker.outerHeight()}else{i=j.top+this.height}this.picker.css({top:i,left:h,zIndex:k})},update:function(){var g,h=false;if(arguments&&arguments.length&&(typeof arguments[0]==="string"||arguments[0] instanceof Date)){g=arguments[0];h=true}else{g=this.element.data("date")||(this.isInput?this.element.val():this.element.find("input").val())||this.initialDate;if(typeof g=="string"||g instanceof String){g=g.replace(/^\s+|\s+$/g,"")}}if(!g){g=new Date();h=false}this.date=b.parseDate(g,this.format,this.language,this.formatType);if(h){this.setValue()}if(this.date<this.startDate){this.viewDate=new Date(this.startDate)}else{if(this.date>this.endDate){this.viewDate=new Date(this.endDate)}else{this.viewDate=new Date(this.date)}}this.fill()},fillDow:function(){var g=this.weekStart,h="<tr>";while(g<this.weekStart+7){h+='<th class="dow">'+d[this.language].daysMin[(g++)%7]+"</th>"}h+="</tr>";this.picker.find(".datetimepicker-days thead").append(h)},fillMonths:function(){var h="",g=0;while(g<12){h+='<span class="month">'+d[this.language].monthsShort[g++]+"</span>"}this.picker.find(".datetimepicker-months td").html(h)},fill:function(){if(this.date==null||this.viewDate==null){return}var E=new Date(this.viewDate),q=E.getUTCFullYear(),F=E.getUTCMonth(),j=E.getUTCDate(),z=E.getUTCHours(),u=E.getUTCMinutes(),v=this.startDate!==-Infinity?this.startDate.getUTCFullYear():-Infinity,A=this.startDate!==-Infinity?this.startDate.getUTCMonth():-Infinity,l=this.endDate!==Infinity?this.endDate.getUTCFullYear():Infinity,w=this.endDate!==Infinity?this.endDate.getUTCMonth():Infinity,n=(new f(this.date.getUTCFullYear(),this.date.getUTCMonth(),this.date.getUTCDate())).valueOf(),D=new Date();this.picker.find(".datetimepicker-days thead th:eq(1)").text(d[this.language].months[F]+" "+q);if(this.formatViewType=="time"){var B=z%12?z%12:12;var h=(B<10?"0":"")+B;var m=(u<10?"0":"")+u;var H=d[this.language].meridiem[z<12?0:1];this.picker.find(".datetimepicker-hours thead th:eq(1)").text(h+":"+m+" "+H.toUpperCase());this.picker.find(".datetimepicker-minutes thead th:eq(1)").text(h+":"+m+" "+H.toUpperCase())}else{this.picker.find(".datetimepicker-hours thead th:eq(1)").text(j+" "+d[this.language].months[F]+" "+q);this.picker.find(".datetimepicker-minutes thead th:eq(1)").text(j+" "+d[this.language].months[F]+" "+q)}this.picker.find("tfoot th.today").text(d[this.language].today).toggle(this.todayBtn!==false);this.updateNavArrows();this.fillMonths();var I=f(q,F-1,28,0,0,0,0),y=b.getDaysInMonth(I.getUTCFullYear(),I.getUTCMonth());I.setUTCDate(y);I.setUTCDate(y-(I.getUTCDay()-this.weekStart+7)%7);var g=new Date(I);g.setUTCDate(g.getUTCDate()+42);g=g.valueOf();var o=[];var r;while(I.valueOf()<g){if(I.getUTCDay()==this.weekStart){o.push("<tr>")}r="";if(I.getUTCFullYear()<q||(I.getUTCFullYear()==q&&I.getUTCMonth()<F)){r+=" old"}else{if(I.getUTCFullYear()>q||(I.getUTCFullYear()==q&&I.getUTCMonth()>F)){r+=" new"}}if(this.todayHighlight&&I.getUTCFullYear()==D.getFullYear()&&I.getUTCMonth()==D.getMonth()&&I.getUTCDate()==D.getDate()){r+=" today"}if(I.valueOf()==n){r+=" active"}if((I.valueOf()+86400000)<=this.startDate||I.valueOf()>this.endDate||c.inArray(I.getUTCDay(),this.daysOfWeekDisabled)!==-1){r+=" disabled"}o.push('<td class="day'+r+'">'+I.getUTCDate()+"</td>");if(I.getUTCDay()==this.weekEnd){o.push("</tr>")}I.setUTCDate(I.getUTCDate()+1)}this.picker.find(".datetimepicker-days tbody").empty().append(o.join(""));o=[];var s="",C="",p="";for(var x=0;x<24;x++){var t=f(q,F,j,x);r="";if((t.valueOf()+3600000)<=this.startDate||t.valueOf()>this.endDate){r+=" disabled"}else{if(z==x){r+=" active"}}if(this.showMeridian&&d[this.language].meridiem.length==2){C=(x<12?d[this.language].meridiem[0]:d[this.language].meridiem[1]);if(C!=p){if(p!=""){o.push("</fieldset>")}o.push('<fieldset class="hour"><legend>'+C.toUpperCase()+"</legend>")}p=C;s=(x%12?x%12:12);o.push('<span class="hour'+r+" hour_"+(x<12?"am":"pm")+'">'+s+"</span>");if(x==23){o.push("</fieldset>")}}else{s=x+":00";o.push('<span class="hour'+r+'">'+s+"</span>")}}this.picker.find(".datetimepicker-hours td").html(o.join(""));o=[];s="",C="",p="";for(var x=0;x<60;x+=this.minuteStep){var t=f(q,F,j,z,x,0);r="";if(t.valueOf()<this.startDate||t.valueOf()>this.endDate){r+=" disabled"}else{if(Math.floor(u/this.minuteStep)==Math.floor(x/this.minuteStep)){r+=" active"}}if(this.showMeridian&&d[this.language].meridiem.length==2){C=(z<12?d[this.language].meridiem[0]:d[this.language].meridiem[1]);if(C!=p){if(p!=""){o.push("</fieldset>")}o.push('<fieldset class="minute"><legend>'+C.toUpperCase()+"</legend>")}p=C;s=(z%12?z%12:12);o.push('<span class="minute'+r+'">'+s+":"+(x<10?"0"+x:x)+"</span>");if(x==59){o.push("</fieldset>")}}else{s=x+":00";o.push('<span class="minute'+r+'">'+z+":"+(x<10?"0"+x:x)+"</span>")}}this.picker.find(".datetimepicker-minutes td").html(o.join(""));var J=this.date.getUTCFullYear();var k=this.picker.find(".datetimepicker-months").find("th:eq(1)").text(q).end().find("span").removeClass("active");if(J==q){k.eq(this.date.getUTCMonth()).addClass("active")}if(q<v||q>l){k.addClass("disabled")}if(q==v){k.slice(0,A).addClass("disabled")}if(q==l){k.slice(w+1).addClass("disabled")}o="";q=parseInt(q/10,10)*10;var G=this.picker.find(".datetimepicker-years").find("th:eq(1)").text(q+"-"+(q+9)).end().find("td");q-=1;for(var x=-1;x<11;x++){o+='<span class="year'+(x==-1||x==10?" old":"")+(J==q?" active":"")+(q<v||q>l?" disabled":"")+'">'+q+"</span>";q+=1}G.html(o);this.place()},updateNavArrows:function(){var k=new Date(this.viewDate),i=k.getUTCFullYear(),j=k.getUTCMonth(),h=k.getUTCDate(),g=k.getUTCHours();switch(this.viewMode){case 0:if(this.startDate!==-Infinity&&i<=this.startDate.getUTCFullYear()&&j<=this.startDate.getUTCMonth()&&h<=this.startDate.getUTCDate()&&g<=this.startDate.getUTCHours()){this.picker.find(".prev").css({visibility:"hidden"})}else{this.picker.find(".prev").css({visibility:"visible"})}if(this.endDate!==Infinity&&i>=this.endDate.getUTCFullYear()&&j>=this.endDate.getUTCMonth()&&h>=this.endDate.getUTCDate()&&g>=this.endDate.getUTCHours()){this.picker.find(".next").css({visibility:"hidden"})}else{this.picker.find(".next").css({visibility:"visible"})}break;case 1:if(this.startDate!==-Infinity&&i<=this.startDate.getUTCFullYear()&&j<=this.startDate.getUTCMonth()&&h<=this.startDate.getUTCDate()){this.picker.find(".prev").css({visibility:"hidden"})}else{this.picker.find(".prev").css({visibility:"visible"})}if(this.endDate!==Infinity&&i>=this.endDate.getUTCFullYear()&&j>=this.endDate.getUTCMonth()&&h>=this.endDate.getUTCDate()){this.picker.find(".next").css({visibility:"hidden"})}else{this.picker.find(".next").css({visibility:"visible"})}break;case 2:if(this.startDate!==-Infinity&&i<=this.startDate.getUTCFullYear()&&j<=this.startDate.getUTCMonth()){this.picker.find(".prev").css({visibility:"hidden"})}else{this.picker.find(".prev").css({visibility:"visible"})}if(this.endDate!==Infinity&&i>=this.endDate.getUTCFullYear()&&j>=this.endDate.getUTCMonth()){this.picker.find(".next").css({visibility:"hidden"})}else{this.picker.find(".next").css({visibility:"visible"})}break;case 3:case 4:if(this.startDate!==-Infinity&&i<=this.startDate.getUTCFullYear()){this.picker.find(".prev").css({visibility:"hidden"})}else{this.picker.find(".prev").css({visibility:"visible"})}if(this.endDate!==Infinity&&i>=this.endDate.getUTCFullYear()){this.picker.find(".next").css({visibility:"hidden"})}else{this.picker.find(".next").css({visibility:"visible"})}break}},mousewheel:function(h){h.preventDefault();h.stopPropagation();if(this.wheelPause){return}this.wheelPause=true;var g=h.originalEvent;var j=g.wheelDelta;var i=j>0?1:(j===0)?0:-1;if(this.wheelViewModeNavigationInverseDirection){i=-i}this.showMode(i);setTimeout(c.proxy(function(){this.wheelPause=false},this),this.wheelViewModeNavigationDelay)},click:function(k){k.stopPropagation();k.preventDefault();var l=c(k.target).closest("span, td, th, legend");if(l.length==1){if(l.is(".disabled")){this.element.trigger({type:"outOfRange",date:this.viewDate,startDate:this.startDate,endDate:this.endDate});return}switch(l[0].nodeName.toLowerCase()){case"th":switch(l[0].className){case"switch":this.showMode(1);break;case"prev":case"next":var g=b.modes[this.viewMode].navStep*(l[0].className=="prev"?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveHour(this.viewDate,g);break;case 1:this.viewDate=this.moveDate(this.viewDate,g);break;case 2:this.viewDate=this.moveMonth(this.viewDate,g);break;case 3:case 4:this.viewDate=this.moveYear(this.viewDate,g);break}this.fill();break;case"today":var h=new Date();h=f(h.getFullYear(),h.getMonth(),h.getDate(),h.getHours(),h.getMinutes(),h.getSeconds(),0);if(h<this.startDate){h=this.startDate}else{if(h>this.endDate){h=this.endDate}}this.viewMode=this.startViewMode;this.showMode(0);this._setDate(h);this.fill();if(this.autoclose){this.hide()}break}break;case"span":if(!l.is(".disabled")){var n=this.viewDate.getUTCFullYear(),m=this.viewDate.getUTCMonth(),o=this.viewDate.getUTCDate(),p=this.viewDate.getUTCHours(),i=this.viewDate.getUTCMinutes(),q=this.viewDate.getUTCSeconds();if(l.is(".month")){this.viewDate.setUTCDate(1);m=l.parent().find("span").index(l);o=this.viewDate.getUTCDate();this.viewDate.setUTCMonth(m);this.element.trigger({type:"changeMonth",date:this.viewDate});if(this.viewSelect>=3){this._setDate(f(n,m,o,p,i,q,0))}}else{if(l.is(".year")){this.viewDate.setUTCDate(1);n=parseInt(l.text(),10)||0;this.viewDate.setUTCFullYear(n);this.element.trigger({type:"changeYear",date:this.viewDate});if(this.viewSelect>=4){this._setDate(f(n,m,o,p,i,q,0))}}else{if(l.is(".hour")){p=parseInt(l.text(),10)||0;if(l.hasClass("hour_am")||l.hasClass("hour_pm")){if(p==12&&l.hasClass("hour_am")){p=0}else{if(p!=12&&l.hasClass("hour_pm")){p+=12}}}this.viewDate.setUTCHours(p);this.element.trigger({type:"changeHour",date:this.viewDate});if(this.viewSelect>=1){this._setDate(f(n,m,o,p,i,q,0))}}else{if(l.is(".minute")){i=parseInt(l.text().substr(l.text().indexOf(":")+1),10)||0;this.viewDate.setUTCMinutes(i);this.element.trigger({type:"changeMinute",date:this.viewDate});if(this.viewSelect>=0){this._setDate(f(n,m,o,p,i,q,0))}}}}}if(this.viewMode!=0){var j=this.viewMode;this.showMode(-1);this.fill();if(j==this.viewMode&&this.autoclose){this.hide()}}else{this.fill();if(this.autoclose){this.hide()}}}break;case"td":if(l.is(".day")&&!l.is(".disabled")){var o=parseInt(l.text(),10)||1;var n=this.viewDate.getUTCFullYear(),m=this.viewDate.getUTCMonth(),p=this.viewDate.getUTCHours(),i=this.viewDate.getUTCMinutes(),q=this.viewDate.getUTCSeconds();if(l.is(".old")){if(m===0){m=11;n-=1}else{m-=1}}else{if(l.is(".new")){if(m==11){m=0;n+=1}else{m+=1}}}this.viewDate.setUTCFullYear(n);this.viewDate.setUTCMonth(m);this.viewDate.setUTCDate(o);this.element.trigger({type:"changeDay",date:this.viewDate});if(this.viewSelect>=2){this._setDate(f(n,m,o,p,i,q,0))}}var j=this.viewMode;this.showMode(-1);this.fill();if(j==this.viewMode&&this.autoclose){this.hide()}break}}},_setDate:function(g,i){if(!i||i=="date"){this.date=g}if(!i||i=="view"){this.viewDate=g}this.fill();this.setValue();var h;if(this.isInput){h=this.element}else{if(this.component){h=this.element.find("input")}}if(h){h.change();if(this.autoclose&&(!i||i=="date")){}}this.element.trigger({type:"changeDate",date:this.date})},moveMinute:function(h,g){if(!g){return h}var i=new Date(h.valueOf());i.setUTCMinutes(i.getUTCMinutes()+(g*this.minuteStep));return i},moveHour:function(h,g){if(!g){return h}var i=new Date(h.valueOf());i.setUTCHours(i.getUTCHours()+g);return i},moveDate:function(h,g){if(!g){return h}var i=new Date(h.valueOf());i.setUTCDate(i.getUTCDate()+g);return i},moveMonth:function(g,h){if(!h){return g}var l=new Date(g.valueOf()),p=l.getUTCDate(),m=l.getUTCMonth(),k=Math.abs(h),o,n;h=h>0?1:-1;if(k==1){n=h==-1?function(){return l.getUTCMonth()==m}:function(){return l.getUTCMonth()!=o};o=m+h;l.setUTCMonth(o);if(o<0||o>11){o=(o+12)%12}}else{for(var j=0;j<k;j++){l=this.moveMonth(l,h)}o=l.getUTCMonth();l.setUTCDate(p);n=function(){return o!=l.getUTCMonth()}}while(n()){l.setUTCDate(--p);l.setUTCMonth(o)}return l},moveYear:function(h,g){return this.moveMonth(h,g*12)},dateWithinRange:function(g){return g>=this.startDate&&g<=this.endDate},keydown:function(k){if(this.picker.is(":not(:visible)")){if(k.keyCode==27){this.show()}return}var m=false,h,n,l,o,g;switch(k.keyCode){case 27:this.hide();k.preventDefault();break;case 37:case 39:if(!this.keyboardNavigation){break}h=k.keyCode==37?-1:1;viewMode=this.viewMode;if(k.ctrlKey){viewMode+=2}else{if(k.shiftKey){viewMode+=1}}if(viewMode==4){o=this.moveYear(this.date,h);g=this.moveYear(this.viewDate,h)}else{if(viewMode==3){o=this.moveMonth(this.date,h);g=this.moveMonth(this.viewDate,h)}else{if(viewMode==2){o=this.moveDate(this.date,h);g=this.moveDate(this.viewDate,h)}else{if(viewMode==1){o=this.moveHour(this.date,h);g=this.moveHour(this.viewDate,h)}else{if(viewMode==0){o=this.moveMinute(this.date,h);g=this.moveMinute(this.viewDate,h)}}}}}if(this.dateWithinRange(o)){this.date=o;this.viewDate=g;this.setValue();this.update();k.preventDefault();m=true}break;case 38:case 40:if(!this.keyboardNavigation){break}h=k.keyCode==38?-1:1;viewMode=this.viewMode;if(k.ctrlKey){viewMode+=2}else{if(k.shiftKey){viewMode+=1}}if(viewMode==4){o=this.moveYear(this.date,h);g=this.moveYear(this.viewDate,h)}else{if(viewMode==3){o=this.moveMonth(this.date,h);g=this.moveMonth(this.viewDate,h)}else{if(viewMode==2){o=this.moveDate(this.date,h*7);g=this.moveDate(this.viewDate,h*7)}else{if(viewMode==1){if(this.showMeridian){o=this.moveHour(this.date,h*6);g=this.moveHour(this.viewDate,h*6)}else{o=this.moveHour(this.date,h*4);g=this.moveHour(this.viewDate,h*4)}}else{if(viewMode==0){o=this.moveMinute(this.date,h*4);g=this.moveMinute(this.viewDate,h*4)}}}}}if(this.dateWithinRange(o)){this.date=o;this.viewDate=g;this.setValue();this.update();k.preventDefault();m=true}break;case 13:if(this.viewMode!=0){var j=this.viewMode;this.showMode(-1);this.fill();if(j==this.viewMode&&this.autoclose){this.hide()}}else{this.fill();if(this.autoclose){this.hide()}}k.preventDefault();break;case 9:this.hide();break}if(m){var i;if(this.isInput){i=this.element}else{if(this.component){i=this.element.find("input")}}if(i){i.change()}this.element.trigger({type:"changeDate",date:this.date})}},showMode:function(g){if(g){var h=Math.max(0,Math.min(b.modes.length-1,this.viewMode+g));if(h>=this.minView&&h<=this.maxView){this.element.trigger({type:"changeMode",date:this.viewDate,oldViewMode:this.viewMode,newViewMode:h});this.viewMode=h}}this.picker.find(">div").hide().filter(".datetimepicker-"+b.modes[this.viewMode].clsName).css("display","block");this.updateNavArrows()},reset:function(g){this._setDate(null,"date")}};c.fn.datetimepicker=function(h){var g=Array.apply(null,arguments);g.shift();return this.each(function(){var k=c(this),j=k.data("datetimepicker"),i=typeof h=="object"&&h;if(!j){k.data("datetimepicker",(j=new e(this,c.extend({},c.fn.datetimepicker.defaults,i))))}if(typeof h=="string"&&typeof j[h]=="function"){j[h].apply(j,g)}})};c.fn.datetimepicker.defaults={};c.fn.datetimepicker.Constructor=e;var d=c.fn.datetimepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],meridiem:["am","pm"],suffix:["st","nd","rd","th"],today:"Today"}};var b={modes:[{clsName:"minutes",navFnc:"Hours",navStep:1},{clsName:"hours",navFnc:"Date",navStep:1},{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(g){return(((g%4===0)&&(g%100!==0))||(g%400===0))},getDaysInMonth:function(g,h){return[31,(b.isLeapYear(g)?29:28),31,30,31,30,31,31,30,31,30,31][h]},getDefaultFormat:function(g,h){if(g=="standard"){if(h=="input"){return"yyyy-mm-dd hh:ii"}else{return"yyyy-mm-dd hh:ii:ss"}}else{if(g=="php"){if(h=="input"){return"Y-m-d H:i"}else{return"Y-m-d H:i:s"}}else{throw new Error("Invalid format type.")}}},validParts:function(g){if(g=="standard"){return/hh?|HH?|p|P|ii?|ss?|dd?|DD?|mm?|MM?|yy(?:yy)?/g}else{if(g=="php"){return/[dDjlNwzFmMnStyYaABgGhHis]/g}else{throw new Error("Invalid format type.")}}},nonpunctuation:/[^ -\/:-@\[-`{-~\t\n\rTZ]+/g,parseFormat:function(j,h){var g=j.replace(this.validParts(h),"\0").split("\0"),i=j.match(this.validParts(h));if(!g||!g.length||!i||i.length==0){throw new Error("Invalid date format.")}return{separators:g,parts:i}},parseDate:function(l,u,o,r){if(l instanceof Date){var w=new Date(l.valueOf()-l.getTimezoneOffset()*60000);w.setMilliseconds(0);return w}if(/^\d{4}\-\d{1,2}\-\d{1,2}$/.test(l)){u=this.parseFormat("yyyy-mm-dd",r)}if(/^\d{4}\-\d{1,2}\-\d{1,2}[T ]\d{1,2}\:\d{1,2}$/.test(l)){u=this.parseFormat("yyyy-mm-dd hh:ii",r)}if(/^\d{4}\-\d{1,2}\-\d{1,2}[T ]\d{1,2}\:\d{1,2}\:\d{1,2}[Z]{0,1}$/.test(l)){u=this.parseFormat("yyyy-mm-dd hh:ii:ss",r)}if(/^[-+]\d+[dmwy]([\s,]+[-+]\d+[dmwy])*$/.test(l)){var x=/([-+]\d+)([dmwy])/,m=l.match(/([-+]\d+)([dmwy])/g),g,k;l=new Date();for(var n=0;n<m.length;n++){g=x.exec(m[n]);k=parseInt(g[1]);switch(g[2]){case"d":l.setUTCDate(l.getUTCDate()+k);break;case"m":l=e.prototype.moveMonth.call(e.prototype,l,k);break;case"w":l.setUTCDate(l.getUTCDate()+k*7);break;case"y":l=e.prototype.moveYear.call(e.prototype,l,k);break}}return f(l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate(),l.getUTCHours(),l.getUTCMinutes(),l.getUTCSeconds(),0)}var m=l&&l.match(this.nonpunctuation)||[],l=new Date(0,0,0,0,0,0,0),q={},t=["hh","h","ii","i","ss","s","yyyy","yy","M","MM","m","mm","D","DD","d","dd","H","HH","p","P"],v={hh:function(s,i){return s.setUTCHours(i)},h:function(s,i){return s.setUTCHours(i)},HH:function(s,i){return s.setUTCHours(i==12?0:i)},H:function(s,i){return s.setUTCHours(i==12?0:i)},ii:function(s,i){return s.setUTCMinutes(i)},i:function(s,i){return s.setUTCMinutes(i)},ss:function(s,i){return s.setUTCSeconds(i)},s:function(s,i){return s.setUTCSeconds(i)},yyyy:function(s,i){return s.setUTCFullYear(i)},yy:function(s,i){return s.setUTCFullYear(2000+i)},m:function(s,i){i-=1;while(i<0){i+=12}i%=12;s.setUTCMonth(i);while(s.getUTCMonth()!=i){s.setUTCDate(s.getUTCDate()-1)}return s},d:function(s,i){return s.setUTCDate(i)},p:function(s,i){return s.setUTCHours(i==1?s.getUTCHours()+12:s.getUTCHours())}},j,p,g;v.M=v.MM=v.mm=v.m;v.dd=v.d;v.P=v.p;l=f(l.getFullYear(),l.getMonth(),l.getDate(),l.getHours(),l.getMinutes(),l.getSeconds());if(m.length==u.parts.length){for(var n=0,h=u.parts.length;n<h;n++){j=parseInt(m[n],10);g=u.parts[n];if(isNaN(j)){switch(g){case"MM":p=c(d[o].months).filter(function(){var i=this.slice(0,m[n].length),s=m[n].slice(0,i.length);return i==s});j=c.inArray(p[0],d[o].months)+1;break;case"M":p=c(d[o].monthsShort).filter(function(){var i=this.slice(0,m[n].length),s=m[n].slice(0,i.length);return i==s});j=c.inArray(p[0],d[o].monthsShort)+1;break;case"p":case"P":j=c.inArray(m[n].toLowerCase(),d[o].meridiem);break}}q[g]=j}for(var n=0,y;n<t.length;n++){y=t[n];if(y in q&&!isNaN(q[y])){v[y](l,q[y])}}}return l},formatDate:function(g,m,o,k){if(g==null){return""}var n;if(k=="standard"){n={yy:g.getUTCFullYear().toString().substring(2),yyyy:g.getUTCFullYear(),m:g.getUTCMonth()+1,M:d[o].monthsShort[g.getUTCMonth()],MM:d[o].months[g.getUTCMonth()],d:g.getUTCDate(),D:d[o].daysShort[g.getUTCDay()],DD:d[o].days[g.getUTCDay()],p:(d[o].meridiem.length==2?d[o].meridiem[g.getUTCHours()<12?0:1]:""),h:g.getUTCHours(),i:g.getUTCMinutes(),s:g.getUTCSeconds()};if(d[o].meridiem.length==2){n.H=(n.h%12==0?12:n.h%12)}else{n.H=n.h}n.HH=(n.H<10?"0":"")+n.H;n.P=n.p.toUpperCase();n.hh=(n.h<10?"0":"")+n.h;n.ii=(n.i<10?"0":"")+n.i;n.ss=(n.s<10?"0":"")+n.s;n.dd=(n.d<10?"0":"")+n.d;n.mm=(n.m<10?"0":"")+n.m}else{if(k=="php"){n={y:g.getUTCFullYear().toString().substring(2),Y:g.getUTCFullYear(),F:d[o].months[g.getUTCMonth()],M:d[o].monthsShort[g.getUTCMonth()],n:g.getUTCMonth()+1,t:b.getDaysInMonth(g.getUTCFullYear(),g.getUTCMonth()),j:g.getUTCDate(),l:d[o].days[g.getUTCDay()],D:d[o].daysShort[g.getUTCDay()],w:g.getUTCDay(),N:(g.getUTCDay()==0?7:g.getUTCDay()),S:(g.getUTCDate()%10<=d[o].suffix.length?d[o].suffix[g.getUTCDate()%10-1]:""),a:(d[o].meridiem.length==2?d[o].meridiem[g.getUTCHours()<12?0:1]:""),g:(g.getUTCHours()%12==0?12:g.getUTCHours()%12),G:g.getUTCHours(),i:g.getUTCMinutes(),s:g.getUTCSeconds()};n.m=(n.n<10?"0":"")+n.n;n.d=(n.j<10?"0":"")+n.j;n.A=n.a.toString().toUpperCase();n.h=(n.g<10?"0":"")+n.g;n.H=(n.G<10?"0":"")+n.G;n.i=(n.i<10?"0":"")+n.i;n.s=(n.s<10?"0":"")+n.s}else{throw new Error("Invalid format type.")}}var g=[],l=c.extend([],m.separators);for(var j=0,h=m.parts.length;j<h;j++){if(l.length){g.push(l.shift())}g.push(n[m.parts[j]])}if(l.length){g.push(l.shift())}return g.join("")},convertViewMode:function(g){switch(g){case 4:case"decade":g=4;break;case 3:case"year":g=3;break;case 2:case"month":g=2;break;case 1:case"day":g=1;break;case 0:case"hour":g=0;break}return g},headTemplate:'<thead><tr><th class="prev"><i class="icon-arrow-left"/></th><th colspan="5" class="switch"></th><th class="next"><i class="icon-arrow-right"/></th></tr></thead>',headTemplateV3:'<thead><tr><th class="prev"><i class="glyphicon glyphicon-arrow-left"></i> </th><th colspan="5" class="switch"></th><th class="next"><i class="glyphicon glyphicon-arrow-right"></i> </th></tr></thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"></th></tr></tfoot>'};b.template='<div class="datetimepicker"><div class="datetimepicker-minutes"><table class=" table-condensed">'+b.headTemplate+b.contTemplate+b.footTemplate+'</table></div><div class="datetimepicker-hours"><table class=" table-condensed">'+b.headTemplate+b.contTemplate+b.footTemplate+'</table></div><div class="datetimepicker-days"><table class=" table-condensed">'+b.headTemplate+"<tbody></tbody>"+b.footTemplate+'</table></div><div class="datetimepicker-months"><table class="table-condensed">'+b.headTemplate+b.contTemplate+b.footTemplate+'</table></div><div class="datetimepicker-years"><table class="table-condensed">'+b.headTemplate+b.contTemplate+b.footTemplate+"</table></div></div>";b.templateV3='<div class="datetimepicker"><div class="datetimepicker-minutes"><table class=" table-condensed">'+b.headTemplateV3+b.contTemplate+b.footTemplate+'</table></div><div class="datetimepicker-hours"><table class=" table-condensed">'+b.headTemplateV3+b.contTemplate+b.footTemplate+'</table></div><div class="datetimepicker-days"><table class=" table-condensed">'+b.headTemplateV3+"<tbody></tbody>"+b.footTemplate+'</table></div><div class="datetimepicker-months"><table class="table-condensed">'+b.headTemplateV3+b.contTemplate+b.footTemplate+'</table></div><div class="datetimepicker-years"><table class="table-condensed">'+b.headTemplateV3+b.contTemplate+b.footTemplate+"</table></div></div>";c.fn.datetimepicker.DPGlobal=b;c.fn.datetimepicker.noConflict=function(){c.fn.datetimepicker=old;return this};c(document).on("focus.datetimepicker.data-api click.datetimepicker.data-api",'[data-provide="datetimepicker"]',function(h){var g=c(this);if(g.data("datetimepicker")){return}h.preventDefault();g.datetimepicker("show")});c(function(){c('[data-provide="datetimepicker-inline"]').datetimepicker()})}(window.jQuery);
|
@@ -1,10 +1,12 @@
|
|
1
1
|
$form_fields: "select, textarea, input[type='text'], input[type='password'], input[type='datetime'], input[type='datetime-local'], input[type='date'], input[type='month'], input[type='time'], input[type='week'], input[type='number'], input[type='email'], input[type='url'], input[type='search'], input[type='tel'], input[type='color'], .uneditable-input"
|
2
2
|
|
3
3
|
body#comfy
|
4
|
-
|
5
4
|
h1, h2, h3, h4, h5, .page-header
|
6
5
|
margin-top: 0
|
7
|
-
|
6
|
+
.input-prepend
|
7
|
+
.add-on
|
8
|
+
box-sizing: content-box
|
9
|
+
padding: 6px 4px
|
8
10
|
table.table
|
9
11
|
th, td
|
10
12
|
white-space: nowrap
|
@@ -46,7 +46,7 @@ protected
|
|
46
46
|
if @cms_page = @cms_site.pages.published.find_by_full_path('/404')
|
47
47
|
render_html(404)
|
48
48
|
else
|
49
|
-
raise ActionController::RoutingError.new(
|
49
|
+
raise ActionController::RoutingError.new("Page Not Found at: \"#{params[:cms_path]}\"")
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
data/app/models/cms/page.rb
CHANGED
@@ -68,6 +68,11 @@ class Cms::Page < ActiveRecord::Base
|
|
68
68
|
self.read_attribute(:full_path) || self.assign_full_path
|
69
69
|
end
|
70
70
|
|
71
|
+
# Somewhat unique method of identifying a page that is not a full_path
|
72
|
+
def identifier
|
73
|
+
self.parent_id.blank?? 'index' : self.full_path[1..-1].slugify
|
74
|
+
end
|
75
|
+
|
71
76
|
# Transforms existing cms_block information into a hash that can be used
|
72
77
|
# during form processing. That's the only way to modify cms_blocks.
|
73
78
|
def blocks_attributes(was = false)
|
@@ -11,9 +11,9 @@
|
|
11
11
|
- if (options = Cms::Layout.app_layouts_for_select).present?
|
12
12
|
= form.select :app_layout, [["---- #{t('.select_app_layout')} ----", nil]] + options
|
13
13
|
|
14
|
-
= form.text_area :content, :data => {
|
15
|
-
= form.text_area :css, :data => {
|
16
|
-
= form.text_area :js, :data => {
|
14
|
+
= form.text_area :content, :data => {'cms-cm-mode' => 'text/html'}
|
15
|
+
= form.text_area :css, :data => {'cms-cm-mode' => 'css'}
|
16
|
+
= form.text_area :js, :data => {'cms-cm-mode' => 'javascript'}
|
17
17
|
|
18
18
|
= render 'admin/cms/partials/layout_form_after', :object => form
|
19
19
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
= form.text_field :label, :data => {:slugify => @snippet.new_record?}
|
7
7
|
= form.text_field :identifier, :data => {:slug => true}
|
8
|
-
= form.text_area :content, :data => {
|
8
|
+
= form.text_area :content, :data => {'cms-cm-mode' => 'text/html'}
|
9
9
|
|
10
10
|
= render :partial => 'admin/cms/categories/form', :object => form
|
11
11
|
|
data/config/cms_routes.rb
CHANGED
@@ -28,7 +28,7 @@ class ComfortableMexicanSofa::FormBuilder < FormattedForm::FormBuilder
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def field_date_time(tag, index)
|
31
|
-
default_tag_field(tag, index, :text_field_tag, :data => {
|
31
|
+
default_tag_field(tag, index, :text_field_tag, :data => {'cms-datetime' => true})
|
32
32
|
end
|
33
33
|
|
34
34
|
def field_integer(tag, index)
|
@@ -40,15 +40,15 @@ class ComfortableMexicanSofa::FormBuilder < FormattedForm::FormBuilder
|
|
40
40
|
end
|
41
41
|
|
42
42
|
def field_text(tag, index)
|
43
|
-
default_tag_field(tag, index, :text_area_tag, :data => {
|
43
|
+
default_tag_field(tag, index, :text_area_tag, :data => {'cms-cm-mode' => 'text/html'})
|
44
44
|
end
|
45
45
|
|
46
46
|
def field_rich_text(tag, index)
|
47
|
-
default_tag_field(tag, index, :text_area_tag, :data => {
|
47
|
+
default_tag_field(tag, index, :text_area_tag, :data => {'cms-rich-text' => true})
|
48
48
|
end
|
49
49
|
|
50
50
|
def page_date_time(tag, index)
|
51
|
-
default_tag_field(tag, index, :text_field_tag, :data => {
|
51
|
+
default_tag_field(tag, index, :text_field_tag, :data => {'cms-datetime' => true})
|
52
52
|
end
|
53
53
|
|
54
54
|
def page_integer(tag, index)
|
@@ -60,11 +60,11 @@ class ComfortableMexicanSofa::FormBuilder < FormattedForm::FormBuilder
|
|
60
60
|
end
|
61
61
|
|
62
62
|
def page_text(tag, index)
|
63
|
-
default_tag_field(tag, index, :text_area_tag, :data => {
|
63
|
+
default_tag_field(tag, index, :text_area_tag, :data => {'cms-cm-mode' => 'text/html'})
|
64
64
|
end
|
65
65
|
|
66
66
|
def page_rich_text(tag, index)
|
67
|
-
default_tag_field(tag, index, :text_area_tag, :data => {
|
67
|
+
default_tag_field(tag, index, :text_area_tag, :data => {'cms-rich-text' => true})
|
68
68
|
end
|
69
69
|
|
70
70
|
def page_file(tag, index)
|
@@ -76,7 +76,7 @@ class ComfortableMexicanSofa::FormBuilder < FormattedForm::FormBuilder
|
|
76
76
|
end
|
77
77
|
|
78
78
|
def page_markdown(tag, index)
|
79
|
-
default_tag_field(tag, index, :text_area_tag, :data => {
|
79
|
+
default_tag_field(tag, index, :text_area_tag, :data => {'cms-cm-mode' => 'text/x-markdown'})
|
80
80
|
end
|
81
81
|
|
82
82
|
def collection(tag, index)
|
@@ -48,9 +48,21 @@ module ComfortableMexicanSofa::RenderMethods
|
|
48
48
|
|
49
49
|
if @cms_page = @cms_site && @cms_site.pages.find_by_full_path(path)
|
50
50
|
@cms_layout = @cms_page.layout
|
51
|
+
if (cms_blocks = options.delete(:cms_blocks)).present?
|
52
|
+
cms_blocks.each do |identifier, value|
|
53
|
+
content = if value.is_a?(Hash)
|
54
|
+
render_to_string(value.keys.first.to_sym => value[value.keys.first], :layout => false)
|
55
|
+
else
|
56
|
+
value.to_s
|
57
|
+
end
|
58
|
+
page_block = @cms_page.blocks.detect{|b| b.identifier == identifier.to_s} ||
|
59
|
+
@cms_page.blocks.build(:identifier => identifier.to_s)
|
60
|
+
page_block.content = content
|
61
|
+
end
|
62
|
+
end
|
51
63
|
cms_app_layout = @cms_layout.try(:app_layout)
|
52
64
|
options[:layout] ||= cms_app_layout.blank?? nil : cms_app_layout
|
53
|
-
options[:inline] = @cms_page.
|
65
|
+
options[:inline] = @cms_page.render
|
54
66
|
super(options, locals, &block)
|
55
67
|
else
|
56
68
|
raise ComfortableMexicanSofa::MissingPage.new(path)
|
@@ -71,7 +83,7 @@ module ComfortableMexicanSofa::RenderMethods
|
|
71
83
|
cms_page.blocks.build(:identifier => identifier.to_s, :content => content)
|
72
84
|
end
|
73
85
|
options[:layout] ||= cms_app_layout.blank?? nil : cms_app_layout
|
74
|
-
options[:inline] = cms_page.
|
86
|
+
options[:inline] = cms_page.render
|
75
87
|
super(options, locals, &block)
|
76
88
|
else
|
77
89
|
raise ComfortableMexicanSofa::MissingLayout.new(identifier)
|
@@ -0,0 +1,18 @@
|
|
1
|
+
class ActionDispatch::Routing::Mapper
|
2
|
+
|
3
|
+
def comfy_route_cms(options = {})
|
4
|
+
namespace :cms, :path => options[:path] do
|
5
|
+
get 'cms-css/:site_id/:identifier' => 'content#render_css', :as => 'render_css'
|
6
|
+
get 'cms-js/:site_id/:identifier' => 'content#render_js', :as => 'render_js'
|
7
|
+
|
8
|
+
if options[:sitemap]
|
9
|
+
get '(:cms_path)/sitemap' => 'content#render_sitemap',
|
10
|
+
:as => 'render_sitemap',
|
11
|
+
:constraints => {:format => /xml/},
|
12
|
+
:format => :xml
|
13
|
+
end
|
14
|
+
|
15
|
+
get '/' => 'content#render_html', :as => 'render_html', :path => "(*cms_path)"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
class ActionDispatch::Routing::Mapper
|
2
|
+
|
3
|
+
def comfy_route_cms_admin(options = {})
|
4
|
+
options[:path] ||= 'admin'
|
5
|
+
|
6
|
+
scope :module => :admin do
|
7
|
+
namespace :cms, :as => :admin_cms, :path => options[:path], :except => :show do
|
8
|
+
get '/', :to => 'base#jump'
|
9
|
+
resources :sites do
|
10
|
+
resources :pages do
|
11
|
+
get :form_blocks, :on => :member
|
12
|
+
get :toggle_branch, :on => :member
|
13
|
+
put :reorder, :on => :collection
|
14
|
+
resources :revisions, :only => [:index, :show, :revert] do
|
15
|
+
patch :revert, :on => :member
|
16
|
+
end
|
17
|
+
end
|
18
|
+
resources :files do
|
19
|
+
post :reorder, :on => :collection
|
20
|
+
end
|
21
|
+
resources :layouts do
|
22
|
+
put :reorder, :on => :collection
|
23
|
+
resources :revisions, :only => [:index, :show, :revert] do
|
24
|
+
patch :revert, :on => :member
|
25
|
+
end
|
26
|
+
end
|
27
|
+
resources :snippets do
|
28
|
+
put :reorder, :on => :collection
|
29
|
+
resources :revisions, :only => [:index, :show, :revert] do
|
30
|
+
patch :revert, :on => :member
|
31
|
+
end
|
32
|
+
end
|
33
|
+
resources :categories
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -1,60 +1,8 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
scope :module => :admin do
|
8
|
-
namespace :cms, :as => :admin_cms, :path => options[:path], :except => :show do
|
9
|
-
get '/', :to => 'base#jump'
|
10
|
-
resources :sites do
|
11
|
-
resources :pages do
|
12
|
-
get :form_blocks, :on => :member
|
13
|
-
get :toggle_branch, :on => :member
|
14
|
-
put :reorder, :on => :collection
|
15
|
-
resources :revisions, :only => [:index, :show, :revert] do
|
16
|
-
patch :revert, :on => :member
|
17
|
-
end
|
18
|
-
end
|
19
|
-
resources :files do
|
20
|
-
post :reorder, :on => :collection
|
21
|
-
end
|
22
|
-
resources :layouts do
|
23
|
-
put :reorder, :on => :collection
|
24
|
-
resources :revisions, :only => [:index, :show, :revert] do
|
25
|
-
patch :revert, :on => :member
|
26
|
-
end
|
27
|
-
end
|
28
|
-
resources :snippets do
|
29
|
-
put :reorder, :on => :collection
|
30
|
-
resources :revisions, :only => [:index, :show, :revert] do
|
31
|
-
patch :revert, :on => :member
|
32
|
-
end
|
33
|
-
end
|
34
|
-
resources :categories
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
1
|
+
require_relative 'routes/cms_admin'
|
2
|
+
require_relative 'routes/cms'
|
3
|
+
|
4
|
+
class ActionDispatch::Routing::Mapper
|
5
|
+
def comfy_route(identifier, options = {})
|
6
|
+
send("comfy_route_#{identifier}", options)
|
39
7
|
end
|
40
|
-
|
41
|
-
def self.content(options = {})
|
42
|
-
|
43
|
-
Rails.application.routes.draw do
|
44
|
-
namespace :cms, :path => options[:path] do
|
45
|
-
get 'cms-css/:site_id/:identifier' => 'content#render_css', :as => 'render_css'
|
46
|
-
get 'cms-js/:site_id/:identifier' => 'content#render_js', :as => 'render_js'
|
47
|
-
|
48
|
-
if options[:sitemap]
|
49
|
-
get '(:cms_path)/sitemap' => 'content#render_sitemap',
|
50
|
-
:as => 'render_sitemap',
|
51
|
-
:constraints => {:format => /xml/},
|
52
|
-
:format => :xml
|
53
|
-
end
|
54
|
-
|
55
|
-
get '/' => 'content#render_html', :as => 'render_html', :path => "(*cms_path)"
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|
60
8
|
end
|
@@ -27,9 +27,9 @@ module Comfy
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def generate_routing
|
30
|
-
route_string = "
|
30
|
+
route_string = " comfy_route :cms_admin, :path => '/admin'\n\n"
|
31
31
|
route_string << " # Make sure this routeset is defined last\n"
|
32
|
-
route_string << "
|
32
|
+
route_string << " comfy_route :cms, :path => '/', :sitemap => false\n"
|
33
33
|
route route_string[2..-1]
|
34
34
|
end
|
35
35
|
|
@@ -64,7 +64,7 @@ class Admin::Cms::PagesControllerTest < ActionController::TestCase
|
|
64
64
|
cms_layouts(:default).update_columns(:content =>'{{cms:field:test_label:datetime}}')
|
65
65
|
get :new, :site_id => cms_sites(:default)
|
66
66
|
assert_response :success
|
67
|
-
assert_select "input[type='text'][name='page[blocks_attributes][0][content]'][data-datetime]"
|
67
|
+
assert_select "input[type='text'][name='page[blocks_attributes][0][content]'][data-cms-datetime]"
|
68
68
|
assert_select "input[type='hidden'][name='page[blocks_attributes][0][identifier]'][value='test_label']"
|
69
69
|
end
|
70
70
|
|
@@ -88,7 +88,7 @@ class Admin::Cms::PagesControllerTest < ActionController::TestCase
|
|
88
88
|
cms_layouts(:default).update_columns(:content => '{{cms:field:test_label:text}}')
|
89
89
|
get :new, :site_id => cms_sites(:default)
|
90
90
|
assert_response :success
|
91
|
-
assert_select "textarea[name='page[blocks_attributes][0][content]'][data-cm-mode='text/html']"
|
91
|
+
assert_select "textarea[name='page[blocks_attributes][0][content]'][data-cms-cm-mode='text/html']"
|
92
92
|
assert_select "input[type='hidden'][name='page[blocks_attributes][0][identifier]'][value='test_label']"
|
93
93
|
end
|
94
94
|
|
@@ -96,7 +96,7 @@ class Admin::Cms::PagesControllerTest < ActionController::TestCase
|
|
96
96
|
cms_layouts(:default).update_columns(:content => '{{cms:field:test_label:rich_text}}')
|
97
97
|
get :new, :site_id => cms_sites(:default)
|
98
98
|
assert_response :success
|
99
|
-
assert_select "textarea[name='page[blocks_attributes][0][content]'][data-rich-text]"
|
99
|
+
assert_select "textarea[name='page[blocks_attributes][0][content]'][data-cms-rich-text]"
|
100
100
|
assert_select "input[type='hidden'][name='page[blocks_attributes][0][identifier]'][value='test_label']"
|
101
101
|
end
|
102
102
|
|
@@ -104,7 +104,7 @@ class Admin::Cms::PagesControllerTest < ActionController::TestCase
|
|
104
104
|
cms_layouts(:default).update_columns(:content => '{{cms:page:test_label:datetime}}')
|
105
105
|
get :new, :site_id => cms_sites(:default)
|
106
106
|
assert_response :success
|
107
|
-
assert_select "input[type='text'][name='page[blocks_attributes][0][content]'][data-datetime]"
|
107
|
+
assert_select "input[type='text'][name='page[blocks_attributes][0][content]'][data-cms-datetime]"
|
108
108
|
assert_select "input[type='hidden'][name='page[blocks_attributes][0][identifier]'][value='test_label']"
|
109
109
|
end
|
110
110
|
|
@@ -128,7 +128,7 @@ class Admin::Cms::PagesControllerTest < ActionController::TestCase
|
|
128
128
|
cms_layouts(:default).update_columns(:content => '{{cms:page:test_label}}')
|
129
129
|
get :new, :site_id => cms_sites(:default)
|
130
130
|
assert_response :success
|
131
|
-
assert_select "textarea[name='page[blocks_attributes][0][content]'][data-cm-mode=text/html]"
|
131
|
+
assert_select "textarea[name='page[blocks_attributes][0][content]'][data-cms-cm-mode=text/html]"
|
132
132
|
assert_select "input[type='hidden'][name='page[blocks_attributes][0][identifier]'][value='test_label']"
|
133
133
|
end
|
134
134
|
|
@@ -164,7 +164,7 @@ class Admin::Cms::PagesControllerTest < ActionController::TestCase
|
|
164
164
|
cms_layouts(:default).update_columns(:content => '{{cms:page:test_label:rich_text}}')
|
165
165
|
get :new, :site_id => cms_sites(:default)
|
166
166
|
assert_response :success
|
167
|
-
assert_select "textarea[name='page[blocks_attributes][0][content]'][data-rich-text]"
|
167
|
+
assert_select "textarea[name='page[blocks_attributes][0][content]'][data-cms-rich-text]"
|
168
168
|
assert_select "input[type='hidden'][name='page[blocks_attributes][0][identifier]'][value='test_label']"
|
169
169
|
end
|
170
170
|
|
@@ -172,7 +172,7 @@ class Admin::Cms::PagesControllerTest < ActionController::TestCase
|
|
172
172
|
cms_layouts(:default).update_columns(:content => '{{cms:page:test_label:markdown}}')
|
173
173
|
get :new, :site_id => cms_sites(:default)
|
174
174
|
assert_response :success
|
175
|
-
assert_select "textarea[name='page[blocks_attributes][0][content]'][data-cm-mode=text/x-markdown]"
|
175
|
+
assert_select "textarea[name='page[blocks_attributes][0][content]'][data-cms-cm-mode=text/x-markdown]"
|
176
176
|
assert_select "input[type='hidden'][name='page[blocks_attributes][0][identifier]'][value='test_label']"
|
177
177
|
end
|
178
178
|
|
@@ -39,7 +39,7 @@ class Cms::ContentControllerTest < ActionController::TestCase
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def test_render_page_not_found
|
42
|
-
assert_exception_raised ActionController::RoutingError, 'Page Not Found' do
|
42
|
+
assert_exception_raised ActionController::RoutingError, 'Page Not Found at: "doesnotexist"' do
|
43
43
|
get :render_html, :cms_path => 'doesnotexist'
|
44
44
|
end
|
45
45
|
end
|
@@ -92,7 +92,7 @@ class Cms::ContentControllerTest < ActionController::TestCase
|
|
92
92
|
page = cms_pages(:default)
|
93
93
|
page.update_columns(:is_published => false)
|
94
94
|
|
95
|
-
assert_exception_raised ActionController::RoutingError, 'Page Not Found' do
|
95
|
+
assert_exception_raised ActionController::RoutingError, 'Page Not Found at: ""' do
|
96
96
|
get :render_html, :cms_path => ''
|
97
97
|
end
|
98
98
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
Test::Application.routes.draw do
|
2
2
|
|
3
|
-
|
3
|
+
comfy_route :cms_admin, :path => '/admin'
|
4
4
|
|
5
5
|
# Make sure this routeset is defined last
|
6
|
-
|
6
|
+
comfy_route :cms, :path => '/', :sitemap => false
|
7
7
|
|
8
8
|
end
|
@@ -59,6 +59,10 @@ class RenderCmsIntergrationTest < ActionDispatch::IntegrationTest
|
|
59
59
|
render :cms_page => '/test-page', :status => 404
|
60
60
|
when 'page_explicit_with_site'
|
61
61
|
render :cms_page => '/', :cms_site => 'site-b'
|
62
|
+
when 'page_explicit_with_blocks'
|
63
|
+
render :cms_page => '/test-page', :cms_blocks => {
|
64
|
+
:content => 'custom page content'
|
65
|
+
}
|
62
66
|
else
|
63
67
|
raise 'Invalid or no param[:type] provided'
|
64
68
|
end
|
@@ -173,6 +177,14 @@ class RenderCmsIntergrationTest < ActionDispatch::IntegrationTest
|
|
173
177
|
end
|
174
178
|
end
|
175
179
|
|
180
|
+
def test_explicit_with_page_blocks
|
181
|
+
page = cms_pages(:child)
|
182
|
+
page.update_attributes(slug: 'test-page')
|
183
|
+
get '/render-page?type=page_explicit_with_blocks'
|
184
|
+
assert_response :success
|
185
|
+
assert_equal 'custom page content', response.body
|
186
|
+
end
|
187
|
+
|
176
188
|
# -- Layout Render Tests --------------------------------------------------
|
177
189
|
def test_cms_layout_defaults
|
178
190
|
get '/render-layout?type=layout_defaults'
|
data/test/models/page_test.rb
CHANGED
@@ -244,6 +244,14 @@ class CmsPageTest < ActiveSupport::TestCase
|
|
244
244
|
assert_equal '/child-page/tést-ünicode-slug', found_page.full_path
|
245
245
|
end
|
246
246
|
|
247
|
+
def test_identifier
|
248
|
+
assert_equal 'index', cms_pages(:default).identifier
|
249
|
+
assert_equal 'child-page', cms_pages(:child).identifier
|
250
|
+
|
251
|
+
cms_pages(:default).update_column(:slug, 'index')
|
252
|
+
assert_equal 'index', cms_pages(:default).identifier
|
253
|
+
end
|
254
|
+
|
247
255
|
protected
|
248
256
|
|
249
257
|
def new_params(options = {})
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: comfortable_mexican_sofa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
5
|
-
prerelease:
|
4
|
+
version: 1.11.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Oleg Khabarov
|
@@ -10,12 +9,11 @@ authors:
|
|
10
9
|
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date: 2013-
|
12
|
+
date: 2013-11-05 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: rails
|
17
16
|
requirement: !ruby/object:Gem::Requirement
|
18
|
-
none: false
|
19
17
|
requirements:
|
20
18
|
- - ~>
|
21
19
|
- !ruby/object:Gem::Version
|
@@ -23,7 +21,6 @@ dependencies:
|
|
23
21
|
type: :runtime
|
24
22
|
prerelease: false
|
25
23
|
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
none: false
|
27
24
|
requirements:
|
28
25
|
- - ~>
|
29
26
|
- !ruby/object:Gem::Version
|
@@ -31,177 +28,155 @@ dependencies:
|
|
31
28
|
- !ruby/object:Gem::Dependency
|
32
29
|
name: formatted_form
|
33
30
|
requirement: !ruby/object:Gem::Requirement
|
34
|
-
none: false
|
35
31
|
requirements:
|
36
|
-
- -
|
32
|
+
- - '>='
|
37
33
|
- !ruby/object:Gem::Version
|
38
34
|
version: 2.1.0
|
39
35
|
type: :runtime
|
40
36
|
prerelease: false
|
41
37
|
version_requirements: !ruby/object:Gem::Requirement
|
42
|
-
none: false
|
43
38
|
requirements:
|
44
|
-
- -
|
39
|
+
- - '>='
|
45
40
|
- !ruby/object:Gem::Version
|
46
41
|
version: 2.1.0
|
47
42
|
- !ruby/object:Gem::Dependency
|
48
43
|
name: active_link_to
|
49
44
|
requirement: !ruby/object:Gem::Requirement
|
50
|
-
none: false
|
51
45
|
requirements:
|
52
|
-
- -
|
46
|
+
- - '>='
|
53
47
|
- !ruby/object:Gem::Version
|
54
48
|
version: 1.0.0
|
55
49
|
type: :runtime
|
56
50
|
prerelease: false
|
57
51
|
version_requirements: !ruby/object:Gem::Requirement
|
58
|
-
none: false
|
59
52
|
requirements:
|
60
|
-
- -
|
53
|
+
- - '>='
|
61
54
|
- !ruby/object:Gem::Version
|
62
55
|
version: 1.0.0
|
63
56
|
- !ruby/object:Gem::Dependency
|
64
57
|
name: paperclip
|
65
58
|
requirement: !ruby/object:Gem::Requirement
|
66
|
-
none: false
|
67
59
|
requirements:
|
68
|
-
- -
|
60
|
+
- - '>='
|
69
61
|
- !ruby/object:Gem::Version
|
70
62
|
version: 3.4.0
|
71
63
|
type: :runtime
|
72
64
|
prerelease: false
|
73
65
|
version_requirements: !ruby/object:Gem::Requirement
|
74
|
-
none: false
|
75
66
|
requirements:
|
76
|
-
- -
|
67
|
+
- - '>='
|
77
68
|
- !ruby/object:Gem::Version
|
78
69
|
version: 3.4.0
|
79
70
|
- !ruby/object:Gem::Dependency
|
80
71
|
name: kramdown
|
81
72
|
requirement: !ruby/object:Gem::Requirement
|
82
|
-
none: false
|
83
73
|
requirements:
|
84
|
-
- -
|
74
|
+
- - '>='
|
85
75
|
- !ruby/object:Gem::Version
|
86
76
|
version: 1.0.0
|
87
77
|
type: :runtime
|
88
78
|
prerelease: false
|
89
79
|
version_requirements: !ruby/object:Gem::Requirement
|
90
|
-
none: false
|
91
80
|
requirements:
|
92
|
-
- -
|
81
|
+
- - '>='
|
93
82
|
- !ruby/object:Gem::Version
|
94
83
|
version: 1.0.0
|
95
84
|
- !ruby/object:Gem::Dependency
|
96
85
|
name: jquery-rails
|
97
86
|
requirement: !ruby/object:Gem::Requirement
|
98
|
-
none: false
|
99
87
|
requirements:
|
100
|
-
- -
|
88
|
+
- - '>='
|
101
89
|
- !ruby/object:Gem::Version
|
102
90
|
version: 3.0.0
|
103
91
|
type: :runtime
|
104
92
|
prerelease: false
|
105
93
|
version_requirements: !ruby/object:Gem::Requirement
|
106
|
-
none: false
|
107
94
|
requirements:
|
108
|
-
- -
|
95
|
+
- - '>='
|
109
96
|
- !ruby/object:Gem::Version
|
110
97
|
version: 3.0.0
|
111
98
|
- !ruby/object:Gem::Dependency
|
112
99
|
name: jquery-ui-rails
|
113
100
|
requirement: !ruby/object:Gem::Requirement
|
114
|
-
none: false
|
115
101
|
requirements:
|
116
|
-
- -
|
102
|
+
- - '>='
|
117
103
|
- !ruby/object:Gem::Version
|
118
104
|
version: 4.0.0
|
119
105
|
type: :runtime
|
120
106
|
prerelease: false
|
121
107
|
version_requirements: !ruby/object:Gem::Requirement
|
122
|
-
none: false
|
123
108
|
requirements:
|
124
|
-
- -
|
109
|
+
- - '>='
|
125
110
|
- !ruby/object:Gem::Version
|
126
111
|
version: 4.0.0
|
127
112
|
- !ruby/object:Gem::Dependency
|
128
113
|
name: haml-rails
|
129
114
|
requirement: !ruby/object:Gem::Requirement
|
130
|
-
none: false
|
131
115
|
requirements:
|
132
|
-
- -
|
116
|
+
- - '>='
|
133
117
|
- !ruby/object:Gem::Version
|
134
118
|
version: 0.3.0
|
135
119
|
type: :runtime
|
136
120
|
prerelease: false
|
137
121
|
version_requirements: !ruby/object:Gem::Requirement
|
138
|
-
none: false
|
139
122
|
requirements:
|
140
|
-
- -
|
123
|
+
- - '>='
|
141
124
|
- !ruby/object:Gem::Version
|
142
125
|
version: 0.3.0
|
143
126
|
- !ruby/object:Gem::Dependency
|
144
127
|
name: sass-rails
|
145
128
|
requirement: !ruby/object:Gem::Requirement
|
146
|
-
none: false
|
147
129
|
requirements:
|
148
|
-
- -
|
130
|
+
- - '>='
|
149
131
|
- !ruby/object:Gem::Version
|
150
132
|
version: 3.1.0
|
151
133
|
type: :runtime
|
152
134
|
prerelease: false
|
153
135
|
version_requirements: !ruby/object:Gem::Requirement
|
154
|
-
none: false
|
155
136
|
requirements:
|
156
|
-
- -
|
137
|
+
- - '>='
|
157
138
|
- !ruby/object:Gem::Version
|
158
139
|
version: 3.1.0
|
159
140
|
- !ruby/object:Gem::Dependency
|
160
141
|
name: coffee-rails
|
161
142
|
requirement: !ruby/object:Gem::Requirement
|
162
|
-
none: false
|
163
143
|
requirements:
|
164
|
-
- -
|
144
|
+
- - '>='
|
165
145
|
- !ruby/object:Gem::Version
|
166
146
|
version: 3.1.0
|
167
147
|
type: :runtime
|
168
148
|
prerelease: false
|
169
149
|
version_requirements: !ruby/object:Gem::Requirement
|
170
|
-
none: false
|
171
150
|
requirements:
|
172
|
-
- -
|
151
|
+
- - '>='
|
173
152
|
- !ruby/object:Gem::Version
|
174
153
|
version: 3.1.0
|
175
154
|
- !ruby/object:Gem::Dependency
|
176
155
|
name: codemirror-rails
|
177
156
|
requirement: !ruby/object:Gem::Requirement
|
178
|
-
none: false
|
179
157
|
requirements:
|
180
|
-
- -
|
158
|
+
- - '>='
|
181
159
|
- !ruby/object:Gem::Version
|
182
160
|
version: 3.0.0
|
183
161
|
type: :runtime
|
184
162
|
prerelease: false
|
185
163
|
version_requirements: !ruby/object:Gem::Requirement
|
186
|
-
none: false
|
187
164
|
requirements:
|
188
|
-
- -
|
165
|
+
- - '>='
|
189
166
|
- !ruby/object:Gem::Version
|
190
167
|
version: 3.0.0
|
191
168
|
- !ruby/object:Gem::Dependency
|
192
169
|
name: kaminari
|
193
170
|
requirement: !ruby/object:Gem::Requirement
|
194
|
-
none: false
|
195
171
|
requirements:
|
196
|
-
- -
|
172
|
+
- - '>='
|
197
173
|
- !ruby/object:Gem::Version
|
198
174
|
version: 0.14.0
|
199
175
|
type: :runtime
|
200
176
|
prerelease: false
|
201
177
|
version_requirements: !ruby/object:Gem::Requirement
|
202
|
-
none: false
|
203
178
|
requirements:
|
204
|
-
- -
|
179
|
+
- - '>='
|
205
180
|
- !ruby/object:Gem::Version
|
206
181
|
version: 0.14.0
|
207
182
|
description: ComfortableMexicanSofa is a powerful CMS Engine for Ruby on Rails applications
|
@@ -421,6 +396,8 @@ files:
|
|
421
396
|
- lib/comfortable_mexican_sofa/fixture/snippet.rb
|
422
397
|
- lib/comfortable_mexican_sofa/form_builder.rb
|
423
398
|
- lib/comfortable_mexican_sofa/render_methods.rb
|
399
|
+
- lib/comfortable_mexican_sofa/routes/cms.rb
|
400
|
+
- lib/comfortable_mexican_sofa/routes/cms_admin.rb
|
424
401
|
- lib/comfortable_mexican_sofa/routing.rb
|
425
402
|
- lib/comfortable_mexican_sofa/tag.rb
|
426
403
|
- lib/comfortable_mexican_sofa/tags/asset.rb
|
@@ -554,26 +531,25 @@ files:
|
|
554
531
|
homepage: http://github.com/comfy/comfortable-mexican-sofa
|
555
532
|
licenses:
|
556
533
|
- MIT
|
534
|
+
metadata: {}
|
557
535
|
post_install_message:
|
558
536
|
rdoc_options: []
|
559
537
|
require_paths:
|
560
538
|
- lib
|
561
539
|
required_ruby_version: !ruby/object:Gem::Requirement
|
562
|
-
none: false
|
563
540
|
requirements:
|
564
|
-
- -
|
541
|
+
- - '>='
|
565
542
|
- !ruby/object:Gem::Version
|
566
543
|
version: '0'
|
567
544
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
568
|
-
none: false
|
569
545
|
requirements:
|
570
|
-
- -
|
546
|
+
- - '>='
|
571
547
|
- !ruby/object:Gem::Version
|
572
548
|
version: '0'
|
573
549
|
requirements: []
|
574
550
|
rubyforge_project:
|
575
|
-
rubygems_version: 1.
|
551
|
+
rubygems_version: 2.1.10
|
576
552
|
signing_key:
|
577
|
-
specification_version:
|
553
|
+
specification_version: 4
|
578
554
|
summary: CMS Engine for Rails 4 apps
|
579
555
|
test_files: []
|