wpaint.js: second iteration; not ready yet; vichan-devel#20

This commit is contained in:
czaks 2014-01-29 22:05:59 +01:00
parent 764d15a7b6
commit 31584986e4
2 changed files with 24 additions and 12 deletions

View File

@ -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) {

View File

@ -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;
})();