wpaint.js: second iteration; not ready yet; vichan-devel#20
This commit is contained in:
parent
764d15a7b6
commit
31584986e4
@ -7,8 +7,8 @@
|
|||||||
*
|
*
|
||||||
* Usage:
|
* Usage:
|
||||||
* $config['additional_javascript'][] = 'js/jquery.min.js';
|
* $config['additional_javascript'][] = 'js/jquery.min.js';
|
||||||
|
* //$config['additional_javascript'][] = 'js/wpaint.js';
|
||||||
* $config['additional_javascript'][] = 'js/upload-selection.js';
|
* $config['additional_javascript'][] = 'js/upload-selection.js';
|
||||||
* //$config['additional_javascript'][] = 'js/oekaki.js'; //WARNING: unsupported
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -16,7 +16,7 @@ $(function(){
|
|||||||
var enabled_file = true;
|
var enabled_file = true;
|
||||||
var enabled_url = $("#upload_url").length > 0;
|
var enabled_url = $("#upload_url").length > 0;
|
||||||
var enabled_embed = $("#upload_embed").length > 0;
|
var enabled_embed = $("#upload_embed").length > 0;
|
||||||
var enabled_oekaki = $("#oekaki").length > 0;
|
var enabled_oekaki = typeof window.oekaki != "undefined";
|
||||||
|
|
||||||
var disable_all = function() {
|
var disable_all = function() {
|
||||||
$("#upload").hide();
|
$("#upload").hide();
|
||||||
@ -26,8 +26,8 @@ $(function(){
|
|||||||
$("#oekaki").hide();
|
$("#oekaki").hide();
|
||||||
|
|
||||||
if (enabled_oekaki) {
|
if (enabled_oekaki) {
|
||||||
if ($("#confirm_oekaki").is(':checked')) {
|
if (window.oekaki.initialized) {
|
||||||
$("#confirm_oekaki").click();
|
window.oekaki.deinit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -55,9 +55,7 @@ $(function(){
|
|||||||
disable_all();
|
disable_all();
|
||||||
$("#oekaki").show();
|
$("#oekaki").show();
|
||||||
|
|
||||||
if (!$("#confirm_oekaki").is(':checked')) {
|
window.oekaki.init();
|
||||||
$("#confirm_oekaki").click();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (enabled_url || enabled_embed || enabled_oekaki) {
|
if (enabled_url || enabled_embed || enabled_oekaki) {
|
||||||
|
24
js/wpaint.js
24
js/wpaint.js
@ -10,12 +10,26 @@
|
|||||||
* $config['additional_javascript'][] = 'js/jquery-ui.custom.min.js';
|
* $config['additional_javascript'][] = 'js/jquery-ui.custom.min.js';
|
||||||
* $config['additional_javascript'][] = 'js/ajax.js';
|
* $config['additional_javascript'][] = 'js/ajax.js';
|
||||||
* $config['additional_javascript'][] = 'js/wPaint/lib/wColorPicker.min.js';
|
* $config['additional_javascript'][] = 'js/wPaint/lib/wColorPicker.min.js';
|
||||||
* $config['additional_javascript'][] = 'js/wPaint/lib/wPaint.min.js';
|
* $config['additional_javascript'][] = 'js/wPaint/wPaint.min.js';
|
||||||
* $config['additional_javascript'][] = 'js/wPaint/lib/plugins/main/wPaint.menu.main.min.js';
|
* $config['additional_javascript'][] = 'js/wPaint/plugins/main/wPaint.menu.main.min.js';
|
||||||
* //$config['additional_javascript'][] = 'js/wPaint/lib/plugins/text/wPaint.menu.text.min.js';
|
* //$config['additional_javascript'][] = 'js/wPaint/plugins/text/wPaint.menu.text.min.js';
|
||||||
* //$config['additional_javascript'][] = 'js/wPaint/lib/plugins/shapes/wPaint.menu.main.shapes.min.js';
|
* //$config['additional_javascript'][] = 'js/wPaint/plugins/shapes/wPaint.menu.main.shapes.min.js';
|
||||||
* //$config['additional_javascript'][] = 'js/wPaint/lib/plugins/file/wPaint.menu.main.file.min.js';
|
* //$config['additional_javascript'][] = 'js/wPaint/plugins/file/wPaint.menu.main.file.min.js';
|
||||||
* $config['additional_javascript'][] = 'js/wpaint.js';
|
* $config['additional_javascript'][] = 'js/wpaint.js';
|
||||||
|
* $config['additional_javascript'][] = 'js/upload-selection.js';
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
var oekaki = window.oekaki = {};
|
||||||
|
|
||||||
|
oekaki.init = function() {
|
||||||
|
};
|
||||||
|
|
||||||
|
oekaki.deinit = function() {
|
||||||
|
};
|
||||||
|
|
||||||
|
oekaki.initialized = false;
|
||||||
|
|
||||||
|
})();
|
||||||
|
Loading…
Reference in New Issue
Block a user