Permalink
Browse files

Updated packages

  • Loading branch information...
1 parent cdac63b commit d76c533822e075048699160c92ca938489793c15 @faceleg faceleg committed Oct 31, 2012
View
@@ -1,5 +1,5 @@
/*!
-VERSION: 0.0.27
+VERSION: 0.0.29
For license information, see http://www.raptor-editor.com/license
*/
/**
@@ -32082,7 +32082,7 @@ $.ui.editor.registerUi({
}
this.ui.button.find('.ui-button-icon-primary').css({
- 'background-image': 'url(http://www.jquery-raptor.com/logo/0.0.27?' + query.join('&') + ')'
+ 'background-image': 'url(http://www.jquery-raptor.com/logo/0.0.29?' + query.join('&') + ')'
});
}
});
@@ -32889,13 +32889,12 @@ $.ui.editor.registerPlugin('saveRest', /** @lends $.editor.plugin.saveRest.proto
this.requests = 0;
// Get all unified content
- var dirty = 0;
+ var plugin = this,
+ dirty = 0;
this.editor.unify(function(editor) {
if (editor.isDirty()) {
dirty++;
- var plugin = editor.getPlugin('saveRest');
- var content = plugin.editor.save();
- plugin.ajax(content);
+ editor.getPlugin('saveRest').ajax(editor.save(), plugin);
}
});
this.dirty = dirty;
@@ -32973,38 +32972,35 @@ $.ui.editor.registerPlugin('saveRest', /** @lends $.editor.plugin.saveRest.proto
},
/**
- * Handle the save AJAX request(s)
- * @param {String} contentData The element's content
- * @param {String} id Editing element's identfier
+ * Handle the save AJAX request(s).
+ *
+ * @param {String} contentData The element's content.
+ * @param {String} id Editing element's ID.
+ * @param {Object} counter Counter object used to confirm all content block have been saved.
*/
- ajax: function(contentData, id) {
- // Create POST data
- //var data = {};
-
- // Content is serialized to a JSON object, and sent as 1 post parameter
- //data[this.options.postName] = JSON.stringify(contentData);
-
+ ajax: function(contentData, counter) {
// Create the JSON request
var ajax = $.extend(true, {}, this.options.ajax);
+ // Get the data to send to the server
if ($.isFunction(ajax.data)) {
- ajax.data = ajax.data.apply(this, [id, contentData]);
+ ajax.data = ajax.data.apply(this, [contentData]);
} else if (this.options.postName) {
ajax.data = {};
ajax.data[this.options.postName] = JSON.stringify(contentData);
}
// Get the URL, if it is a callback
if ($.isFunction(ajax.url)) {
- ajax.url = ajax.url.apply(this, [id]);
+ ajax.url = ajax.url.apply(this);
}
// Send the data to the server
- this.requests++;
+ counter.requests++;
$.ajax(ajax)
- .done($.proxy(this.done, this))
- .fail($.proxy(this.fail, this))
- .always($.proxy(this.always, this));
+ .done($.proxy(counter.done, counter))
+ .fail($.proxy(counter.fail, counter))
+ .always($.proxy(counter.always, counter));
}
});

Large diffs are not rendered by default.

Oops, something went wrong.
Binary file not shown.
@@ -1,5 +1,5 @@
/*!
-VERSION: 0.0.27
+VERSION: 0.0.29
For license information, see http://www.raptor-editor.com/license
*/
/**
@@ -32088,7 +32088,7 @@ $.ui.editor.registerUi({
}
this.ui.button.find('.ui-button-icon-primary').css({
- 'background-image': 'url(http://www.jquery-raptor.com/logo/0.0.27?' + query.join('&') + ')'
+ 'background-image': 'url(http://www.jquery-raptor.com/logo/0.0.29?' + query.join('&') + ')'
});
}
});
@@ -32895,13 +32895,12 @@ $.ui.editor.registerPlugin('saveRest', /** @lends $.editor.plugin.saveRest.proto
this.requests = 0;
// Get all unified content
- var dirty = 0;
+ var plugin = this,
+ dirty = 0;
this.editor.unify(function(editor) {
if (editor.isDirty()) {
dirty++;
- var plugin = editor.getPlugin('saveRest');
- var content = plugin.editor.save();
- plugin.ajax(content);
+ editor.getPlugin('saveRest').ajax(editor.save(), plugin);
}
});
this.dirty = dirty;
@@ -32979,38 +32978,35 @@ $.ui.editor.registerPlugin('saveRest', /** @lends $.editor.plugin.saveRest.proto
},
/**
- * Handle the save AJAX request(s)
- * @param {String} contentData The element's content
- * @param {String} id Editing element's identfier
+ * Handle the save AJAX request(s).
+ *
+ * @param {String} contentData The element's content.
+ * @param {String} id Editing element's ID.
+ * @param {Object} counter Counter object used to confirm all content block have been saved.
*/
- ajax: function(contentData, id) {
- // Create POST data
- //var data = {};
-
- // Content is serialized to a JSON object, and sent as 1 post parameter
- //data[this.options.postName] = JSON.stringify(contentData);
-
+ ajax: function(contentData, counter) {
// Create the JSON request
var ajax = $.extend(true, {}, this.options.ajax);
+ // Get the data to send to the server
if ($.isFunction(ajax.data)) {
- ajax.data = ajax.data.apply(this, [id, contentData]);
+ ajax.data = ajax.data.apply(this, [contentData]);
} else if (this.options.postName) {
ajax.data = {};
ajax.data[this.options.postName] = JSON.stringify(contentData);
}
// Get the URL, if it is a callback
if ($.isFunction(ajax.url)) {
- ajax.url = ajax.url.apply(this, [id]);
+ ajax.url = ajax.url.apply(this);
}
// Send the data to the server
- this.requests++;
+ counter.requests++;
$.ajax(ajax)
- .done($.proxy(this.done, this))
- .fail($.proxy(this.fail, this))
- .always($.proxy(this.always, this));
+ .done($.proxy(counter.done, counter))
+ .fail($.proxy(counter.fail, counter))
+ .always($.proxy(counter.always, counter));
}
});

Large diffs are not rendered by default.

Oops, something went wrong.
Binary file not shown.
View
@@ -1,5 +1,5 @@
/*!
-VERSION: 0.0.27
+VERSION: 0.0.29
For license information, see http://www.raptor-editor.com/license
*/
/**
@@ -32306,7 +32306,7 @@ $.ui.editor.registerUi({
}
this.ui.button.find('.ui-button-icon-primary').css({
- 'background-image': 'url(http://www.jquery-raptor.com/logo/0.0.27?' + query.join('&') + ')'
+ 'background-image': 'url(http://www.jquery-raptor.com/logo/0.0.29?' + query.join('&') + ')'
});
}
});
@@ -33115,13 +33115,12 @@ $.ui.editor.registerPlugin('saveRest', /** @lends $.editor.plugin.saveRest.proto
this.requests = 0;
// Get all unified content
- var dirty = 0;
+ var plugin = this,
+ dirty = 0;
this.editor.unify(function(editor) {
if (editor.isDirty()) {
dirty++;
- var plugin = editor.getPlugin('saveRest');
- var content = plugin.editor.save();
- plugin.ajax(content);
+ editor.getPlugin('saveRest').ajax(editor.save(), plugin);
}
});
this.dirty = dirty;
@@ -33199,38 +33198,35 @@ $.ui.editor.registerPlugin('saveRest', /** @lends $.editor.plugin.saveRest.proto
},
/**
- * Handle the save AJAX request(s)
- * @param {String} contentData The element's content
- * @param {String} id Editing element's identfier
+ * Handle the save AJAX request(s).
+ *
+ * @param {String} contentData The element's content.
+ * @param {String} id Editing element's ID.
+ * @param {Object} counter Counter object used to confirm all content block have been saved.
*/
- ajax: function(contentData, id) {
- // Create POST data
- //var data = {};
-
- // Content is serialized to a JSON object, and sent as 1 post parameter
- //data[this.options.postName] = JSON.stringify(contentData);
-
+ ajax: function(contentData, counter) {
// Create the JSON request
var ajax = $.extend(true, {}, this.options.ajax);
+ // Get the data to send to the server
if ($.isFunction(ajax.data)) {
- ajax.data = ajax.data.apply(this, [id, contentData]);
+ ajax.data = ajax.data.apply(this, [contentData]);
} else if (this.options.postName) {
ajax.data = {};
ajax.data[this.options.postName] = JSON.stringify(contentData);
}
// Get the URL, if it is a callback
if ($.isFunction(ajax.url)) {
- ajax.url = ajax.url.apply(this, [id]);
+ ajax.url = ajax.url.apply(this);
}
// Send the data to the server
- this.requests++;
+ counter.requests++;
$.ajax(ajax)
- .done($.proxy(this.done, this))
- .fail($.proxy(this.fail, this))
- .always($.proxy(this.always, this));
+ .done($.proxy(counter.done, counter))
+ .fail($.proxy(counter.fail, counter))
+ .always($.proxy(counter.always, counter));
}
});
@@ -1,5 +1,5 @@
/*!
-VERSION: 0.0.27
+VERSION: 0.0.29
For license information, see http://www.raptor-editor.com/license
*/
/**
@@ -32306,7 +32306,7 @@ $.ui.editor.registerUi({
}
this.ui.button.find('.ui-button-icon-primary').css({
- 'background-image': 'url(http://www.jquery-raptor.com/logo/0.0.27?' + query.join('&') + ')'
+ 'background-image': 'url(http://www.jquery-raptor.com/logo/0.0.29?' + query.join('&') + ')'
});
}
});
@@ -33115,13 +33115,12 @@ $.ui.editor.registerPlugin('saveRest', /** @lends $.editor.plugin.saveRest.proto
this.requests = 0;
// Get all unified content
- var dirty = 0;
+ var plugin = this,
+ dirty = 0;
this.editor.unify(function(editor) {
if (editor.isDirty()) {
dirty++;
- var plugin = editor.getPlugin('saveRest');
- var content = plugin.editor.save();
- plugin.ajax(content);
+ editor.getPlugin('saveRest').ajax(editor.save(), plugin);
}
});
this.dirty = dirty;
@@ -33199,38 +33198,35 @@ $.ui.editor.registerPlugin('saveRest', /** @lends $.editor.plugin.saveRest.proto
},
/**
- * Handle the save AJAX request(s)
- * @param {String} contentData The element's content
- * @param {String} id Editing element's identfier
+ * Handle the save AJAX request(s).
+ *
+ * @param {String} contentData The element's content.
+ * @param {String} id Editing element's ID.
+ * @param {Object} counter Counter object used to confirm all content block have been saved.
*/
- ajax: function(contentData, id) {
- // Create POST data
- //var data = {};
-
- // Content is serialized to a JSON object, and sent as 1 post parameter
- //data[this.options.postName] = JSON.stringify(contentData);
-
+ ajax: function(contentData, counter) {
// Create the JSON request
var ajax = $.extend(true, {}, this.options.ajax);
+ // Get the data to send to the server
if ($.isFunction(ajax.data)) {
- ajax.data = ajax.data.apply(this, [id, contentData]);
+ ajax.data = ajax.data.apply(this, [contentData]);
} else if (this.options.postName) {
ajax.data = {};
ajax.data[this.options.postName] = JSON.stringify(contentData);
}
// Get the URL, if it is a callback
if ($.isFunction(ajax.url)) {
- ajax.url = ajax.url.apply(this, [id]);
+ ajax.url = ajax.url.apply(this);
}
// Send the data to the server
- this.requests++;
+ counter.requests++;
$.ajax(ajax)
- .done($.proxy(this.done, this))
- .fail($.proxy(this.fail, this))
- .always($.proxy(this.always, this));
+ .done($.proxy(counter.done, counter))
+ .fail($.proxy(counter.fail, counter))
+ .always($.proxy(counter.always, counter));
}
});
Binary file not shown.
Oops, something went wrong.

0 comments on commit d76c533

Please sign in to comment.