net.ftlines.wicket.fullcalendar.res.fullcalendar.ext.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of wicket-fullcalendar-core Show documentation
Show all versions of wicket-fullcalendar-core Show documentation
Provides a Wicket frontend to the FullCalendar JavaScript library
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
$.generateId = function() {
return arguments.callee.prefix + arguments.callee.count++;
};
$.generateId.prefix = 'jq$';
$.generateId.count = 0;
$.fn.generateId = function() {
return this.each(function() {
this.id = $.generateId();
});
};
/*
* @author: igor
*/
(function($){
/** forwards function invocation to fullCalendar plugin */
function forward(element, args) {
return $.fn.fullCalendar.apply($(element), args);
}
function copyArray(original) {
var copy=[];
for (var i=0,len=original.length;i ");
if (this.data.fcxEnabled) { checkbox.attr("checked","checked"); }
if (!this.enableInSelector) { checkbox.attr("disabled", "true"); }
checkbox.bind("click", function() { _toggleSource(owner, sourceUuid, this.checked); });
checkbox.generateId();
var li=$("");
// Add the class used by the event source to the so it can be styled.
if (this.className && $.trim(this.className) != "") { li.attr("class",this.className); }
checkbox.appendTo(li);
$("").appendTo(li);
li.appendTo(ul);
}
});
}
ext.toggleSource=function(sourceId, enabled) {
_toggleSource(owner, sourceId, enabled);
}
return ext;
}(this));
$.data(this, 'fullCalendarExt', ext);
forward(this, _arguments);
});
};
})(jQuery);
function fullCalendarExtIsoDate(d) {
function pad(n){return n<10 ? '0'+n:n;}
return d.getUTCFullYear()+'-'+pad(d.getUTCMonth()+1)+'-'+pad(d.getUTCDate())+'T'
+pad(d.getUTCHours())+':'+pad(d.getUTCMinutes())+':'+pad(d.getUTCSeconds())+'Z';
}