Commit 5330cee6 authored by bbaer's avatar bbaer

fullCalendar view implementation

parent a57634df
Pipeline #3138 passed with stages
in 2 minutes
......@@ -31,7 +31,7 @@ QfqNS.Helper = QfqNS.Helper || {};
*
* @function
*/
var fullCalendar = function () {
var fullCalendar = function (form) {
if (typeof FullCalendar === 'undefined') {
QfqNS.log.error("FullCalendar Plugin wasn't loaded correctly.");
return;
......@@ -41,7 +41,7 @@ QfqNS.Helper = QfqNS.Helper || {};
function () {
var config = {};
var $this = $(this);
var element = document.getElementById($this.attr('id'));
var element = $this.get(0);
var configData = $this.data('config');
if (configData) {
if (configData instanceof Object) {
......@@ -53,12 +53,6 @@ QfqNS.Helper = QfqNS.Helper || {};
}
var calendar = new FullCalendar.Calendar(element, configData);
calendar.render();
calendar.on('change', (function ($form, $textArea) {
return function (instance, changeObj) {
$textArea.val(instance.getValue());
$form.change();
};
})($(this).closest('form'), $this));
}
);
};
......
......@@ -80,6 +80,7 @@ $(document).ready( function () {
});
});
n.Helper.calendar();
})(QfqNS);
});
\ No newline at end of file
......@@ -153,7 +153,7 @@ var QfqNS = QfqNS || {};
//n.Helper.jqxEditor();
n.Helper.tinyMce();
n.Helper.codemirror();
n.Helper.calendar();
this.form.on('form.submit.before', n.Helper.tinyMce.prepareSave);
this.form.on('form.validation.before', n.Helper.tinyMce.prepareSave);
this.form.on('form.validation.failed', this.validationError);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment