beef-admin_area 0.3.4 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/app/controllers/admin/users_controller.rb +16 -1
- data/app/views/admin/users/index.html.erb +27 -2
- data/beef-admin_area.gemspec +77 -6
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/langs/en.js +170 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/inlinepopups/editor_plugin.js +1 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/inlinepopups/editor_plugin_src.js +635 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif +0 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif +0 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css +90 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/paste/editor_plugin.js +1 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/paste/editor_plugin_src.js +952 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/paste/js/pastetext.js +36 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/paste/js/pasteword.js +51 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/paste/langs/en_dlg.js +5 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/paste/pastetext.htm +2 -8
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/paste/pasteword.htm +2 -8
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/template/css/template.css +23 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/template/editor_plugin.js +1 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/template/editor_plugin_src.js +159 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/template/js/template.js +106 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/template/langs/en_dlg.js +15 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/template/template.htm +2 -9
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/wordcount/editor_plugin.js +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/wordcount/editor_plugin_src.js +98 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/about.htm +54 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/anchor.htm +2 -7
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/charmap.htm +52 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/color_picker.htm +1 -3
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/editor_template.js +1 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/editor_template_src.js +1217 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/image.htm +80 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/img/icons.gif +0 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/js/about.js +72 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/js/anchor.js +37 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/js/charmap.js +335 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/js/color_picker.js +253 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/js/image.js +245 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/js/link.js +156 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/langs/en.js +62 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/langs/en_dlg.js +51 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/link.htm +2 -7
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/skins/default/content.css +36 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/skins/default/dialog.css +117 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/skins/default/ui.css +213 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/skins/o2k7/content.css +36 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/skins/o2k7/dialog.css +116 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png +0 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png +0 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png +0 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/skins/o2k7/ui.css +215 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/skins/o2k7/ui_black.css +8 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css +5 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/source_editor.htm +4 -10
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/tiny_mce.js +1 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/tiny_mce_popup.js +5 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/utils/editable_selects.js +70 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/utils/form_utils.js +200 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/utils/mctabs.js +77 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/utils/validate.js +220 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/langs/en.js +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/plugins/inlinepopups/editor_plugin.js +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/plugins/inlinepopups/skins/clearlooks2/img/button.gif +0 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif +0 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/plugins/inlinepopups/skins/clearlooks2/img/corners.gif +0 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif +0 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif +0 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/plugins/inlinepopups/skins/clearlooks2/window.css +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/plugins/inlinepopups/template.htm +387 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/plugins/paste/editor_plugin.js +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/plugins/paste/js/pastetext.js +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/plugins/paste/js/pasteword.js +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/plugins/paste/langs/en_dlg.js +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/plugins/paste/pastetext.htm +33 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/plugins/paste/pasteword.htm +27 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/{tiny_mce → tiny_mce.old}/plugins/safari/blank.htm +0 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/{tiny_mce → tiny_mce.old}/plugins/safari/editor_plugin.js +0 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/plugins/template/blank.htm +12 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/plugins/template/css/template.css +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/plugins/template/editor_plugin.js +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/plugins/template/js/template.js +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/plugins/template/langs/en_dlg.js +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/plugins/template/template.htm +38 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/themes/advanced/anchor.htm +31 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/themes/advanced/color_picker.htm +75 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/themes/advanced/editor_template.js +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/themes/advanced/img/colorpicker.jpg +0 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/themes/advanced/img/icons.gif +0 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/themes/advanced/js/anchor.js +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/themes/advanced/js/color_picker.js +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/themes/advanced/js/link.js +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/themes/advanced/js/source_editor.js +62 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/themes/advanced/langs/en.js +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/themes/advanced/langs/en_dlg.js +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/themes/advanced/link.htm +63 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/themes/advanced/skins/default/content.css +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/themes/advanced/skins/default/dialog.css +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/themes/advanced/skins/default/img/buttons.png +0 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/themes/advanced/skins/default/img/items.gif +0 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/themes/advanced/skins/default/img/menu_arrow.gif +0 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/themes/advanced/skins/default/img/menu_check.gif +0 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/themes/advanced/skins/default/img/progress.gif +0 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/themes/advanced/skins/default/img/tabs.gif +0 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/themes/advanced/skins/default/ui.css +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/themes/advanced/source_editor.htm +31 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/tiny_mce.js +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/tiny_mce_popup.js +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/utils/form_utils.js +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/utils/mctabs.js +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/utils/validate.js +1 -0
- metadata +78 -7
data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/tiny_mce_popup.js
CHANGED
@@ -1 +1,5 @@
|
|
1
|
-
|
1
|
+
|
2
|
+
// Uncomment and change this document.domain value if you are loading the script cross subdomains
|
3
|
+
// document.domain = 'moxiecode.com';
|
4
|
+
|
5
|
+
var tinymce=null,tinyMCEPopup,tinyMCE;tinyMCEPopup={init:function(){var b=this,a,c;a=b.getWin();tinymce=a.tinymce;tinyMCE=a.tinyMCE;b.editor=tinymce.EditorManager.activeEditor;b.params=b.editor.windowManager.params;b.features=b.editor.windowManager.features;b.dom=b.editor.windowManager.createInstance("tinymce.dom.DOMUtils",document);if(b.features.popup_css!==false){b.dom.loadCSS(b.features.popup_css||b.editor.settings.popup_css)}b.listeners=[];b.onInit={add:function(e,d){b.listeners.push({func:e,scope:d})}};b.isWindow=!b.getWindowArg("mce_inline");b.id=b.getWindowArg("mce_window_id");b.editor.windowManager.onOpen.dispatch(b.editor.windowManager,window)},getWin:function(){return(!window.frameElement&&window.dialogArguments)||opener||parent||top},getWindowArg:function(c,b){var a=this.params[c];return tinymce.is(a)?a:b},getParam:function(b,a){return this.editor.getParam(b,a)},getLang:function(b,a){return this.editor.getLang(b,a)},execCommand:function(d,c,e,b){b=b||{};b.skip_focus=1;this.restoreSelection();return this.editor.execCommand(d,c,e,b)},resizeToInnerSize:function(){var a=this;setTimeout(function(){var b=a.dom.getViewPort(window);a.editor.windowManager.resizeBy(a.getWindowArg("mce_width")-b.w,a.getWindowArg("mce_height")-b.h,a.id||window)},0)},executeOnLoad:function(s){this.onInit.add(function(){eval(s)})},storeSelection:function(){this.editor.windowManager.bookmark=tinyMCEPopup.editor.selection.getBookmark(1)},restoreSelection:function(){var a=tinyMCEPopup;if(!a.isWindow&&tinymce.isIE){a.editor.selection.moveToBookmark(a.editor.windowManager.bookmark)}},requireLangPack:function(){var b=this,a=b.getWindowArg("plugin_url")||b.getWindowArg("theme_url");if(a&&b.editor.settings.language&&b.features.translate_i18n!==false){a+="/langs/"+b.editor.settings.language+"_dlg.js";if(!tinymce.ScriptLoader.isDone(a)){document.write('<script type="text/javascript" src="'+tinymce._addVer(a)+'"><\/script>');tinymce.ScriptLoader.markDone(a)}}},pickColor:function(b,a){this.execCommand("mceColorPicker",true,{color:document.getElementById(a).value,func:function(e){document.getElementById(a).value=e;try{document.getElementById(a).onchange()}catch(d){}}})},openBrowser:function(a,c,b){tinyMCEPopup.restoreSelection();this.editor.execCallback("file_browser_callback",a,document.getElementById(a).value,c,window)},confirm:function(b,a,c){this.editor.windowManager.confirm(b,a,c,window)},alert:function(b,a,c){this.editor.windowManager.alert(b,a,c,window)},close:function(){var a=this;function b(){a.editor.windowManager.close(window);tinymce=tinyMCE=a.editor=a.params=a.dom=a.dom.doc=null}if(tinymce.isOpera){a.getWin().setTimeout(b,0)}else{b()}},_restoreSelection:function(){var a=window.event.srcElement;if(a.nodeName=="INPUT"&&(a.type=="submit"||a.type=="button")){tinyMCEPopup.restoreSelection()}},_onDOMLoaded:function(){var b=tinyMCEPopup,d=document.title,e,c,a;if(b.domLoaded){return}b.domLoaded=1;if(b.features.translate_i18n!==false){c=document.body.innerHTML;if(tinymce.isIE){c=c.replace(/ (value|title|alt)=([^"][^\s>]+)/gi,' $1="$2"')}document.dir=b.editor.getParam("directionality","");if((a=b.editor.translate(c))&&a!=c){document.body.innerHTML=a}if((a=b.editor.translate(d))&&a!=d){document.title=d=a}}document.body.style.display="";if(tinymce.isIE){document.attachEvent("onmouseup",tinyMCEPopup._restoreSelection);b.dom.add(b.dom.select("head")[0],"base",{target:"_self"})}b.restoreSelection();b.resizeToInnerSize();if(!b.isWindow){b.editor.windowManager.setTitle(window,d)}else{window.focus()}if(!tinymce.isIE&&!b.isWindow){tinymce.dom.Event._add(document,"focus",function(){b.editor.windowManager.focus(b.id)})}tinymce.each(b.dom.select("select"),function(f){f.onkeydown=tinyMCEPopup._accessHandler});tinymce.each(b.listeners,function(f){f.func.call(f.scope,b.editor)});if(b.getWindowArg("mce_auto_focus",true)){window.focus();tinymce.each(document.forms,function(g){tinymce.each(g.elements,function(f){if(b.dom.hasClass(f,"mceFocus")&&!f.disabled){f.focus();return false}})})}document.onkeyup=tinyMCEPopup._closeWinKeyHandler},_accessHandler:function(a){a=a||window.event;if(a.keyCode==13||a.keyCode==32){a=a.target||a.srcElement;if(a.onchange){a.onchange()}return tinymce.dom.Event.cancel(a)}},_closeWinKeyHandler:function(a){a=a||window.event;if(a.keyCode==27){tinyMCEPopup.close()}},_wait:function(){if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);tinyMCEPopup._onDOMLoaded()}});if(document.documentElement.doScroll&&window==window.top){(function(){if(tinyMCEPopup.domLoaded){return}try{document.documentElement.doScroll("left")}catch(a){setTimeout(arguments.callee,0);return}tinyMCEPopup._onDOMLoaded()})()}document.attachEvent("onload",tinyMCEPopup._onDOMLoaded)}else{if(document.addEventListener){window.addEventListener("DOMContentLoaded",tinyMCEPopup._onDOMLoaded,false);window.addEventListener("load",tinyMCEPopup._onDOMLoaded,false)}}}};tinyMCEPopup.init();tinyMCEPopup._wait();
|
@@ -0,0 +1,70 @@
|
|
1
|
+
/**
|
2
|
+
* editable_selects.js
|
3
|
+
*
|
4
|
+
* Copyright 2009, Moxiecode Systems AB
|
5
|
+
* Released under LGPL License.
|
6
|
+
*
|
7
|
+
* License: http://tinymce.moxiecode.com/license
|
8
|
+
* Contributing: http://tinymce.moxiecode.com/contributing
|
9
|
+
*/
|
10
|
+
|
11
|
+
var TinyMCE_EditableSelects = {
|
12
|
+
editSelectElm : null,
|
13
|
+
|
14
|
+
init : function() {
|
15
|
+
var nl = document.getElementsByTagName("select"), i, d = document, o;
|
16
|
+
|
17
|
+
for (i=0; i<nl.length; i++) {
|
18
|
+
if (nl[i].className.indexOf('mceEditableSelect') != -1) {
|
19
|
+
o = new Option('(value)', '__mce_add_custom__');
|
20
|
+
|
21
|
+
o.className = 'mceAddSelectValue';
|
22
|
+
|
23
|
+
nl[i].options[nl[i].options.length] = o;
|
24
|
+
nl[i].onchange = TinyMCE_EditableSelects.onChangeEditableSelect;
|
25
|
+
}
|
26
|
+
}
|
27
|
+
},
|
28
|
+
|
29
|
+
onChangeEditableSelect : function(e) {
|
30
|
+
var d = document, ne, se = window.event ? window.event.srcElement : e.target;
|
31
|
+
|
32
|
+
if (se.options[se.selectedIndex].value == '__mce_add_custom__') {
|
33
|
+
ne = d.createElement("input");
|
34
|
+
ne.id = se.id + "_custom";
|
35
|
+
ne.name = se.name + "_custom";
|
36
|
+
ne.type = "text";
|
37
|
+
|
38
|
+
ne.style.width = se.offsetWidth + 'px';
|
39
|
+
se.parentNode.insertBefore(ne, se);
|
40
|
+
se.style.display = 'none';
|
41
|
+
ne.focus();
|
42
|
+
ne.onblur = TinyMCE_EditableSelects.onBlurEditableSelectInput;
|
43
|
+
ne.onkeydown = TinyMCE_EditableSelects.onKeyDown;
|
44
|
+
TinyMCE_EditableSelects.editSelectElm = se;
|
45
|
+
}
|
46
|
+
},
|
47
|
+
|
48
|
+
onBlurEditableSelectInput : function() {
|
49
|
+
var se = TinyMCE_EditableSelects.editSelectElm;
|
50
|
+
|
51
|
+
if (se) {
|
52
|
+
if (se.previousSibling.value != '') {
|
53
|
+
addSelectValue(document.forms[0], se.id, se.previousSibling.value, se.previousSibling.value);
|
54
|
+
selectByValue(document.forms[0], se.id, se.previousSibling.value);
|
55
|
+
} else
|
56
|
+
selectByValue(document.forms[0], se.id, '');
|
57
|
+
|
58
|
+
se.style.display = 'inline';
|
59
|
+
se.parentNode.removeChild(se.previousSibling);
|
60
|
+
TinyMCE_EditableSelects.editSelectElm = null;
|
61
|
+
}
|
62
|
+
},
|
63
|
+
|
64
|
+
onKeyDown : function(e) {
|
65
|
+
e = e || window.event;
|
66
|
+
|
67
|
+
if (e.keyCode == 13)
|
68
|
+
TinyMCE_EditableSelects.onBlurEditableSelectInput();
|
69
|
+
}
|
70
|
+
};
|
data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/utils/form_utils.js
CHANGED
@@ -1 +1,200 @@
|
|
1
|
-
|
1
|
+
/**
|
2
|
+
* form_utils.js
|
3
|
+
*
|
4
|
+
* Copyright 2009, Moxiecode Systems AB
|
5
|
+
* Released under LGPL License.
|
6
|
+
*
|
7
|
+
* License: http://tinymce.moxiecode.com/license
|
8
|
+
* Contributing: http://tinymce.moxiecode.com/contributing
|
9
|
+
*/
|
10
|
+
|
11
|
+
var themeBaseURL = tinyMCEPopup.editor.baseURI.toAbsolute('themes/' + tinyMCEPopup.getParam("theme"));
|
12
|
+
|
13
|
+
function getColorPickerHTML(id, target_form_element) {
|
14
|
+
var h = "";
|
15
|
+
|
16
|
+
h += '<a id="' + id + '_link" href="javascript:;" onclick="tinyMCEPopup.pickColor(event,\'' + target_form_element +'\');" onmousedown="return false;" class="pickcolor">';
|
17
|
+
h += '<span id="' + id + '" title="' + tinyMCEPopup.getLang('browse') + '"> </span></a>';
|
18
|
+
|
19
|
+
return h;
|
20
|
+
}
|
21
|
+
|
22
|
+
function updateColor(img_id, form_element_id) {
|
23
|
+
document.getElementById(img_id).style.backgroundColor = document.forms[0].elements[form_element_id].value;
|
24
|
+
}
|
25
|
+
|
26
|
+
function setBrowserDisabled(id, state) {
|
27
|
+
var img = document.getElementById(id);
|
28
|
+
var lnk = document.getElementById(id + "_link");
|
29
|
+
|
30
|
+
if (lnk) {
|
31
|
+
if (state) {
|
32
|
+
lnk.setAttribute("realhref", lnk.getAttribute("href"));
|
33
|
+
lnk.removeAttribute("href");
|
34
|
+
tinyMCEPopup.dom.addClass(img, 'disabled');
|
35
|
+
} else {
|
36
|
+
if (lnk.getAttribute("realhref"))
|
37
|
+
lnk.setAttribute("href", lnk.getAttribute("realhref"));
|
38
|
+
|
39
|
+
tinyMCEPopup.dom.removeClass(img, 'disabled');
|
40
|
+
}
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
function getBrowserHTML(id, target_form_element, type, prefix) {
|
45
|
+
var option = prefix + "_" + type + "_browser_callback", cb, html;
|
46
|
+
|
47
|
+
cb = tinyMCEPopup.getParam(option, tinyMCEPopup.getParam("file_browser_callback"));
|
48
|
+
|
49
|
+
if (!cb)
|
50
|
+
return "";
|
51
|
+
|
52
|
+
html = "";
|
53
|
+
html += '<a id="' + id + '_link" href="javascript:openBrowser(\'' + id + '\',\'' + target_form_element + '\', \'' + type + '\',\'' + option + '\');" onmousedown="return false;" class="browse">';
|
54
|
+
html += '<span id="' + id + '" title="' + tinyMCEPopup.getLang('browse') + '"> </span></a>';
|
55
|
+
|
56
|
+
return html;
|
57
|
+
}
|
58
|
+
|
59
|
+
function openBrowser(img_id, target_form_element, type, option) {
|
60
|
+
var img = document.getElementById(img_id);
|
61
|
+
|
62
|
+
if (img.className != "mceButtonDisabled")
|
63
|
+
tinyMCEPopup.openBrowser(target_form_element, type, option);
|
64
|
+
}
|
65
|
+
|
66
|
+
function selectByValue(form_obj, field_name, value, add_custom, ignore_case) {
|
67
|
+
if (!form_obj || !form_obj.elements[field_name])
|
68
|
+
return;
|
69
|
+
|
70
|
+
var sel = form_obj.elements[field_name];
|
71
|
+
|
72
|
+
var found = false;
|
73
|
+
for (var i=0; i<sel.options.length; i++) {
|
74
|
+
var option = sel.options[i];
|
75
|
+
|
76
|
+
if (option.value == value || (ignore_case && option.value.toLowerCase() == value.toLowerCase())) {
|
77
|
+
option.selected = true;
|
78
|
+
found = true;
|
79
|
+
} else
|
80
|
+
option.selected = false;
|
81
|
+
}
|
82
|
+
|
83
|
+
if (!found && add_custom && value != '') {
|
84
|
+
var option = new Option(value, value);
|
85
|
+
option.selected = true;
|
86
|
+
sel.options[sel.options.length] = option;
|
87
|
+
sel.selectedIndex = sel.options.length - 1;
|
88
|
+
}
|
89
|
+
|
90
|
+
return found;
|
91
|
+
}
|
92
|
+
|
93
|
+
function getSelectValue(form_obj, field_name) {
|
94
|
+
var elm = form_obj.elements[field_name];
|
95
|
+
|
96
|
+
if (elm == null || elm.options == null || elm.selectedIndex === -1)
|
97
|
+
return "";
|
98
|
+
|
99
|
+
return elm.options[elm.selectedIndex].value;
|
100
|
+
}
|
101
|
+
|
102
|
+
function addSelectValue(form_obj, field_name, name, value) {
|
103
|
+
var s = form_obj.elements[field_name];
|
104
|
+
var o = new Option(name, value);
|
105
|
+
s.options[s.options.length] = o;
|
106
|
+
}
|
107
|
+
|
108
|
+
function addClassesToList(list_id, specific_option) {
|
109
|
+
// Setup class droplist
|
110
|
+
var styleSelectElm = document.getElementById(list_id);
|
111
|
+
var styles = tinyMCEPopup.getParam('theme_advanced_styles', false);
|
112
|
+
styles = tinyMCEPopup.getParam(specific_option, styles);
|
113
|
+
|
114
|
+
if (styles) {
|
115
|
+
var stylesAr = styles.split(';');
|
116
|
+
|
117
|
+
for (var i=0; i<stylesAr.length; i++) {
|
118
|
+
if (stylesAr != "") {
|
119
|
+
var key, value;
|
120
|
+
|
121
|
+
key = stylesAr[i].split('=')[0];
|
122
|
+
value = stylesAr[i].split('=')[1];
|
123
|
+
|
124
|
+
styleSelectElm.options[styleSelectElm.length] = new Option(key, value);
|
125
|
+
}
|
126
|
+
}
|
127
|
+
} else {
|
128
|
+
tinymce.each(tinyMCEPopup.editor.dom.getClasses(), function(o) {
|
129
|
+
styleSelectElm.options[styleSelectElm.length] = new Option(o.title || o['class'], o['class']);
|
130
|
+
});
|
131
|
+
}
|
132
|
+
}
|
133
|
+
|
134
|
+
function isVisible(element_id) {
|
135
|
+
var elm = document.getElementById(element_id);
|
136
|
+
|
137
|
+
return elm && elm.style.display != "none";
|
138
|
+
}
|
139
|
+
|
140
|
+
function convertRGBToHex(col) {
|
141
|
+
var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi");
|
142
|
+
|
143
|
+
var rgb = col.replace(re, "$1,$2,$3").split(',');
|
144
|
+
if (rgb.length == 3) {
|
145
|
+
r = parseInt(rgb[0]).toString(16);
|
146
|
+
g = parseInt(rgb[1]).toString(16);
|
147
|
+
b = parseInt(rgb[2]).toString(16);
|
148
|
+
|
149
|
+
r = r.length == 1 ? '0' + r : r;
|
150
|
+
g = g.length == 1 ? '0' + g : g;
|
151
|
+
b = b.length == 1 ? '0' + b : b;
|
152
|
+
|
153
|
+
return "#" + r + g + b;
|
154
|
+
}
|
155
|
+
|
156
|
+
return col;
|
157
|
+
}
|
158
|
+
|
159
|
+
function convertHexToRGB(col) {
|
160
|
+
if (col.indexOf('#') != -1) {
|
161
|
+
col = col.replace(new RegExp('[^0-9A-F]', 'gi'), '');
|
162
|
+
|
163
|
+
r = parseInt(col.substring(0, 2), 16);
|
164
|
+
g = parseInt(col.substring(2, 4), 16);
|
165
|
+
b = parseInt(col.substring(4, 6), 16);
|
166
|
+
|
167
|
+
return "rgb(" + r + "," + g + "," + b + ")";
|
168
|
+
}
|
169
|
+
|
170
|
+
return col;
|
171
|
+
}
|
172
|
+
|
173
|
+
function trimSize(size) {
|
174
|
+
return size.replace(/([0-9\.]+)px|(%|in|cm|mm|em|ex|pt|pc)/, '$1$2');
|
175
|
+
}
|
176
|
+
|
177
|
+
function getCSSSize(size) {
|
178
|
+
size = trimSize(size);
|
179
|
+
|
180
|
+
if (size == "")
|
181
|
+
return "";
|
182
|
+
|
183
|
+
// Add px
|
184
|
+
if (/^[0-9]+$/.test(size))
|
185
|
+
size += 'px';
|
186
|
+
|
187
|
+
return size;
|
188
|
+
}
|
189
|
+
|
190
|
+
function getStyle(elm, attrib, style) {
|
191
|
+
var val = tinyMCEPopup.dom.getAttrib(elm, attrib);
|
192
|
+
|
193
|
+
if (val != '')
|
194
|
+
return '' + val;
|
195
|
+
|
196
|
+
if (typeof(style) == 'undefined')
|
197
|
+
style = attrib;
|
198
|
+
|
199
|
+
return tinyMCEPopup.dom.getStyle(elm, style);
|
200
|
+
}
|
data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/utils/mctabs.js
CHANGED
@@ -1 +1,77 @@
|
|
1
|
-
|
1
|
+
/**
|
2
|
+
* mctabs.js
|
3
|
+
*
|
4
|
+
* Copyright 2009, Moxiecode Systems AB
|
5
|
+
* Released under LGPL License.
|
6
|
+
*
|
7
|
+
* License: http://tinymce.moxiecode.com/license
|
8
|
+
* Contributing: http://tinymce.moxiecode.com/contributing
|
9
|
+
*/
|
10
|
+
|
11
|
+
function MCTabs() {
|
12
|
+
this.settings = [];
|
13
|
+
};
|
14
|
+
|
15
|
+
MCTabs.prototype.init = function(settings) {
|
16
|
+
this.settings = settings;
|
17
|
+
};
|
18
|
+
|
19
|
+
MCTabs.prototype.getParam = function(name, default_value) {
|
20
|
+
var value = null;
|
21
|
+
|
22
|
+
value = (typeof(this.settings[name]) == "undefined") ? default_value : this.settings[name];
|
23
|
+
|
24
|
+
// Fix bool values
|
25
|
+
if (value == "true" || value == "false")
|
26
|
+
return (value == "true");
|
27
|
+
|
28
|
+
return value;
|
29
|
+
};
|
30
|
+
|
31
|
+
MCTabs.prototype.displayTab = function(tab_id, panel_id) {
|
32
|
+
var panelElm, panelContainerElm, tabElm, tabContainerElm, selectionClass, nodes, i;
|
33
|
+
|
34
|
+
panelElm= document.getElementById(panel_id);
|
35
|
+
panelContainerElm = panelElm ? panelElm.parentNode : null;
|
36
|
+
tabElm = document.getElementById(tab_id);
|
37
|
+
tabContainerElm = tabElm ? tabElm.parentNode : null;
|
38
|
+
selectionClass = this.getParam('selection_class', 'current');
|
39
|
+
|
40
|
+
if (tabElm && tabContainerElm) {
|
41
|
+
nodes = tabContainerElm.childNodes;
|
42
|
+
|
43
|
+
// Hide all other tabs
|
44
|
+
for (i = 0; i < nodes.length; i++) {
|
45
|
+
if (nodes[i].nodeName == "LI")
|
46
|
+
nodes[i].className = '';
|
47
|
+
}
|
48
|
+
|
49
|
+
// Show selected tab
|
50
|
+
tabElm.className = 'current';
|
51
|
+
}
|
52
|
+
|
53
|
+
if (panelElm && panelContainerElm) {
|
54
|
+
nodes = panelContainerElm.childNodes;
|
55
|
+
|
56
|
+
// Hide all other panels
|
57
|
+
for (i = 0; i < nodes.length; i++) {
|
58
|
+
if (nodes[i].nodeName == "DIV")
|
59
|
+
nodes[i].className = 'panel';
|
60
|
+
}
|
61
|
+
|
62
|
+
// Show selected panel
|
63
|
+
panelElm.className = 'current';
|
64
|
+
}
|
65
|
+
};
|
66
|
+
|
67
|
+
MCTabs.prototype.getAnchor = function() {
|
68
|
+
var pos, url = document.location.href;
|
69
|
+
|
70
|
+
if ((pos = url.lastIndexOf('#')) != -1)
|
71
|
+
return url.substring(pos + 1);
|
72
|
+
|
73
|
+
return "";
|
74
|
+
};
|
75
|
+
|
76
|
+
// Global instance
|
77
|
+
var mcTabs = new MCTabs();
|
data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/utils/validate.js
CHANGED
@@ -1 +1,220 @@
|
|
1
|
-
|
1
|
+
/**
|
2
|
+
* validate.js
|
3
|
+
*
|
4
|
+
* Copyright 2009, Moxiecode Systems AB
|
5
|
+
* Released under LGPL License.
|
6
|
+
*
|
7
|
+
* License: http://tinymce.moxiecode.com/license
|
8
|
+
* Contributing: http://tinymce.moxiecode.com/contributing
|
9
|
+
*/
|
10
|
+
|
11
|
+
/**
|
12
|
+
// String validation:
|
13
|
+
|
14
|
+
if (!Validator.isEmail('myemail'))
|
15
|
+
alert('Invalid email.');
|
16
|
+
|
17
|
+
// Form validation:
|
18
|
+
|
19
|
+
var f = document.forms['myform'];
|
20
|
+
|
21
|
+
if (!Validator.isEmail(f.myemail))
|
22
|
+
alert('Invalid email.');
|
23
|
+
*/
|
24
|
+
|
25
|
+
var Validator = {
|
26
|
+
isEmail : function(s) {
|
27
|
+
return this.test(s, '^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+@[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$');
|
28
|
+
},
|
29
|
+
|
30
|
+
isAbsUrl : function(s) {
|
31
|
+
return this.test(s, '^(news|telnet|nttp|file|http|ftp|https)://[-A-Za-z0-9\\.]+\\/?.*$');
|
32
|
+
},
|
33
|
+
|
34
|
+
isSize : function(s) {
|
35
|
+
return this.test(s, '^[0-9]+(%|in|cm|mm|em|ex|pt|pc|px)?$');
|
36
|
+
},
|
37
|
+
|
38
|
+
isId : function(s) {
|
39
|
+
return this.test(s, '^[A-Za-z_]([A-Za-z0-9_])*$');
|
40
|
+
},
|
41
|
+
|
42
|
+
isEmpty : function(s) {
|
43
|
+
var nl, i;
|
44
|
+
|
45
|
+
if (s.nodeName == 'SELECT' && s.selectedIndex < 1)
|
46
|
+
return true;
|
47
|
+
|
48
|
+
if (s.type == 'checkbox' && !s.checked)
|
49
|
+
return true;
|
50
|
+
|
51
|
+
if (s.type == 'radio') {
|
52
|
+
for (i=0, nl = s.form.elements; i<nl.length; i++) {
|
53
|
+
if (nl[i].type == "radio" && nl[i].name == s.name && nl[i].checked)
|
54
|
+
return false;
|
55
|
+
}
|
56
|
+
|
57
|
+
return true;
|
58
|
+
}
|
59
|
+
|
60
|
+
return new RegExp('^\\s*$').test(s.nodeType == 1 ? s.value : s);
|
61
|
+
},
|
62
|
+
|
63
|
+
isNumber : function(s, d) {
|
64
|
+
return !isNaN(s.nodeType == 1 ? s.value : s) && (!d || !this.test(s, '^-?[0-9]*\\.[0-9]*$'));
|
65
|
+
},
|
66
|
+
|
67
|
+
test : function(s, p) {
|
68
|
+
s = s.nodeType == 1 ? s.value : s;
|
69
|
+
|
70
|
+
return s == '' || new RegExp(p).test(s);
|
71
|
+
}
|
72
|
+
};
|
73
|
+
|
74
|
+
var AutoValidator = {
|
75
|
+
settings : {
|
76
|
+
id_cls : 'id',
|
77
|
+
int_cls : 'int',
|
78
|
+
url_cls : 'url',
|
79
|
+
number_cls : 'number',
|
80
|
+
email_cls : 'email',
|
81
|
+
size_cls : 'size',
|
82
|
+
required_cls : 'required',
|
83
|
+
invalid_cls : 'invalid',
|
84
|
+
min_cls : 'min',
|
85
|
+
max_cls : 'max'
|
86
|
+
},
|
87
|
+
|
88
|
+
init : function(s) {
|
89
|
+
var n;
|
90
|
+
|
91
|
+
for (n in s)
|
92
|
+
this.settings[n] = s[n];
|
93
|
+
},
|
94
|
+
|
95
|
+
validate : function(f) {
|
96
|
+
var i, nl, s = this.settings, c = 0;
|
97
|
+
|
98
|
+
nl = this.tags(f, 'label');
|
99
|
+
for (i=0; i<nl.length; i++)
|
100
|
+
this.removeClass(nl[i], s.invalid_cls);
|
101
|
+
|
102
|
+
c += this.validateElms(f, 'input');
|
103
|
+
c += this.validateElms(f, 'select');
|
104
|
+
c += this.validateElms(f, 'textarea');
|
105
|
+
|
106
|
+
return c == 3;
|
107
|
+
},
|
108
|
+
|
109
|
+
invalidate : function(n) {
|
110
|
+
this.mark(n.form, n);
|
111
|
+
},
|
112
|
+
|
113
|
+
reset : function(e) {
|
114
|
+
var t = ['label', 'input', 'select', 'textarea'];
|
115
|
+
var i, j, nl, s = this.settings;
|
116
|
+
|
117
|
+
if (e == null)
|
118
|
+
return;
|
119
|
+
|
120
|
+
for (i=0; i<t.length; i++) {
|
121
|
+
nl = this.tags(e.form ? e.form : e, t[i]);
|
122
|
+
for (j=0; j<nl.length; j++)
|
123
|
+
this.removeClass(nl[j], s.invalid_cls);
|
124
|
+
}
|
125
|
+
},
|
126
|
+
|
127
|
+
validateElms : function(f, e) {
|
128
|
+
var nl, i, n, s = this.settings, st = true, va = Validator, v;
|
129
|
+
|
130
|
+
nl = this.tags(f, e);
|
131
|
+
for (i=0; i<nl.length; i++) {
|
132
|
+
n = nl[i];
|
133
|
+
|
134
|
+
this.removeClass(n, s.invalid_cls);
|
135
|
+
|
136
|
+
if (this.hasClass(n, s.required_cls) && va.isEmpty(n))
|
137
|
+
st = this.mark(f, n);
|
138
|
+
|
139
|
+
if (this.hasClass(n, s.number_cls) && !va.isNumber(n))
|
140
|
+
st = this.mark(f, n);
|
141
|
+
|
142
|
+
if (this.hasClass(n, s.int_cls) && !va.isNumber(n, true))
|
143
|
+
st = this.mark(f, n);
|
144
|
+
|
145
|
+
if (this.hasClass(n, s.url_cls) && !va.isAbsUrl(n))
|
146
|
+
st = this.mark(f, n);
|
147
|
+
|
148
|
+
if (this.hasClass(n, s.email_cls) && !va.isEmail(n))
|
149
|
+
st = this.mark(f, n);
|
150
|
+
|
151
|
+
if (this.hasClass(n, s.size_cls) && !va.isSize(n))
|
152
|
+
st = this.mark(f, n);
|
153
|
+
|
154
|
+
if (this.hasClass(n, s.id_cls) && !va.isId(n))
|
155
|
+
st = this.mark(f, n);
|
156
|
+
|
157
|
+
if (this.hasClass(n, s.min_cls, true)) {
|
158
|
+
v = this.getNum(n, s.min_cls);
|
159
|
+
|
160
|
+
if (isNaN(v) || parseInt(n.value) < parseInt(v))
|
161
|
+
st = this.mark(f, n);
|
162
|
+
}
|
163
|
+
|
164
|
+
if (this.hasClass(n, s.max_cls, true)) {
|
165
|
+
v = this.getNum(n, s.max_cls);
|
166
|
+
|
167
|
+
if (isNaN(v) || parseInt(n.value) > parseInt(v))
|
168
|
+
st = this.mark(f, n);
|
169
|
+
}
|
170
|
+
}
|
171
|
+
|
172
|
+
return st;
|
173
|
+
},
|
174
|
+
|
175
|
+
hasClass : function(n, c, d) {
|
176
|
+
return new RegExp('\\b' + c + (d ? '[0-9]+' : '') + '\\b', 'g').test(n.className);
|
177
|
+
},
|
178
|
+
|
179
|
+
getNum : function(n, c) {
|
180
|
+
c = n.className.match(new RegExp('\\b' + c + '([0-9]+)\\b', 'g'))[0];
|
181
|
+
c = c.replace(/[^0-9]/g, '');
|
182
|
+
|
183
|
+
return c;
|
184
|
+
},
|
185
|
+
|
186
|
+
addClass : function(n, c, b) {
|
187
|
+
var o = this.removeClass(n, c);
|
188
|
+
n.className = b ? c + (o != '' ? (' ' + o) : '') : (o != '' ? (o + ' ') : '') + c;
|
189
|
+
},
|
190
|
+
|
191
|
+
removeClass : function(n, c) {
|
192
|
+
c = n.className.replace(new RegExp("(^|\\s+)" + c + "(\\s+|$)"), ' ');
|
193
|
+
return n.className = c != ' ' ? c : '';
|
194
|
+
},
|
195
|
+
|
196
|
+
tags : function(f, s) {
|
197
|
+
return f.getElementsByTagName(s);
|
198
|
+
},
|
199
|
+
|
200
|
+
mark : function(f, n) {
|
201
|
+
var s = this.settings;
|
202
|
+
|
203
|
+
this.addClass(n, s.invalid_cls);
|
204
|
+
this.markLabels(f, n, s.invalid_cls);
|
205
|
+
|
206
|
+
return false;
|
207
|
+
},
|
208
|
+
|
209
|
+
markLabels : function(f, n, ic) {
|
210
|
+
var nl, i;
|
211
|
+
|
212
|
+
nl = this.tags(f, "label");
|
213
|
+
for (i=0; i<nl.length; i++) {
|
214
|
+
if (nl[i].getAttribute("for") == n.id || nl[i].htmlFor == n.id)
|
215
|
+
this.addClass(nl[i], ic);
|
216
|
+
}
|
217
|
+
|
218
|
+
return null;
|
219
|
+
}
|
220
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
tinyMCE.addI18n({en:{common:{edit_confirm:"Do you want to use the WYSIWYG mode for this textarea?",apply:"Apply",insert:"Insert",update:"Update",cancel:"Cancel",close:"Close",browse:"Browse",class_name:"Class",not_set:"-- Not set --",clipboard_msg:"Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?",clipboard_no_support:"Currently not supported by your browser, use keyboard shortcuts instead.",popup_blocked:"Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.",invalid_data:"Error: Invalid values entered, these are marked in red.",more_colors:"More colors"},contextmenu:{align:"Alignment",left:"Left",center:"Center",right:"Right",full:"Full"},insertdatetime:{date_fmt:"%Y-%m-%d",time_fmt:"%H:%M:%S",insertdate_desc:"Insert date",inserttime_desc:"Insert time",months_long:"January,February,March,April,May,June,July,August,September,October,November,December",months_short:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec",day_long:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday",day_short:"Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun"},print:{print_desc:"Print"},preview:{preview_desc:"Preview"},directionality:{ltr_desc:"Direction left to right",rtl_desc:"Direction right to left"},layer:{insertlayer_desc:"Insert new layer",forward_desc:"Move forward",backward_desc:"Move backward",absolute_desc:"Toggle absolute positioning",content:"New layer..."},save:{save_desc:"Save",cancel_desc:"Cancel all changes"},nonbreaking:{nonbreaking_desc:"Insert non-breaking space character"},iespell:{iespell_desc:"Run spell checking",download:"ieSpell not detected. Do you want to install it now?"},advhr:{advhr_desc:"Horizontal rule"},emotions:{emotions_desc:"Emotions"},searchreplace:{search_desc:"Find",replace_desc:"Find/Replace"},advimage:{image_desc:"Insert/edit image"},advlink:{link_desc:"Insert/edit link"},xhtmlxtras:{cite_desc:"Citation",abbr_desc:"Abbreviation",acronym_desc:"Acronym",del_desc:"Deletion",ins_desc:"Insertion",attribs_desc:"Insert/Edit Attributes"},style:{desc:"Edit CSS Style"},paste:{paste_text_desc:"Paste as Plain Text",paste_word_desc:"Paste from Word",selectall_desc:"Select All"},paste_dlg:{text_title:"Use CTRL+V on your keyboard to paste the text into the window.",text_linebreaks:"Keep linebreaks",word_title:"Use CTRL+V on your keyboard to paste the text into the window."},table:{desc:"Inserts a new table",row_before_desc:"Insert row before",row_after_desc:"Insert row after",delete_row_desc:"Delete row",col_before_desc:"Insert column before",col_after_desc:"Insert column after",delete_col_desc:"Remove column",split_cells_desc:"Split merged table cells",merge_cells_desc:"Merge table cells",row_desc:"Table row properties",cell_desc:"Table cell properties",props_desc:"Table properties",paste_row_before_desc:"Paste table row before",paste_row_after_desc:"Paste table row after",cut_row_desc:"Cut table row",copy_row_desc:"Copy table row",del:"Delete table",row:"Row",col:"Column",cell:"Cell"},autosave:{unload_msg:"The changes you made will be lost if you navigate away from this page."},fullscreen:{desc:"Toggle fullscreen mode"},media:{desc:"Insert / edit embedded media",edit:"Edit embedded media"},fullpage:{desc:"Document properties"},template:{desc:"Insert predefined template content"},visualchars:{desc:"Visual control characters on/off."},spellchecker:{desc:"Toggle spellchecker",menu:"Spellchecker settings",ignore_word:"Ignore word",ignore_words:"Ignore all",langs:"Languages",wait:"Please wait...",sug:"Suggestions",no_sug:"No suggestions",no_mpell:"No misspellings found."},pagebreak:{desc:"Insert page break."}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){var i=tinymce.DOM,f=tinymce.dom.Element,g=tinymce.dom.Event,h=tinymce.each,j=tinymce.is;tinymce.create("tinymce.plugins.InlinePopups",{init:function(b,a){b.onBeforeRenderUI.add(function(){b.windowManager=new tinymce.InlineWindowManager(b);i.loadCSS(a+"/skins/"+(b.settings.inlinepopups_skin||"clearlooks2")+"/window.css")})},getInfo:function(){return{longname:"InlinePopups",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.create("tinymce.InlineWindowManager:tinymce.WindowManager",{InlineWindowManager:function(b){var a=this;a.parent(b);a.zIndex=300000;a.count=0;a.windows={}},open:function(a,u){var B=this,w,t="",b=B.editor,A=0,E=0,z,e,d,c,p,D,C;a=a||{};u=u||{};if(!a.inline){return B.parent(a,u)}if(!a.type){B.bookmark=b.selection.getBookmark(1)}w=i.uniqueId();z=i.getViewPort();a.width=parseInt(a.width||320);a.height=parseInt(a.height||240)+(tinymce.isIE?8:0);a.min_width=parseInt(a.min_width||150);a.min_height=parseInt(a.min_height||100);a.max_width=parseInt(a.max_width||2000);a.max_height=parseInt(a.max_height||2000);a.left=a.left||Math.round(Math.max(z.x,z.x+(z.w/2)-(a.width/2)));a.top=a.top||Math.round(Math.max(z.y,z.y+(z.h/2)-(a.height/2)));a.movable=a.resizable=true;u.mce_width=a.width;u.mce_height=a.height;u.mce_inline=true;u.mce_window_id=w;u.mce_auto_focus=a.auto_focus;B.features=a;B.params=u;B.onOpen.dispatch(B,a,u);if(a.type){t+=" mceModal";if(a.type){t+=" mce"+a.type.substring(0,1).toUpperCase()+a.type.substring(1)}a.resizable=false}if(a.statusbar){t+=" mceStatusbar"}if(a.resizable){t+=" mceResizable"}if(a.minimizable){t+=" mceMinimizable"}if(a.maximizable){t+=" mceMaximizable"}if(a.movable){t+=" mceMovable"}B._addAll(i.doc.body,["div",{id:w,"class":b.settings.inlinepopups_skin||"clearlooks2",style:"width:100px;height:100px"},["div",{id:w+"_wrapper","class":"mceWrapper"+t},["div",{id:w+"_top","class":"mceTop"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:w+"_title"},a.title||""]],["div",{id:w+"_middle","class":"mceMiddle"},["div",{id:w+"_left","class":"mceLeft"}],["span",{id:w+"_content"}],["div",{id:w+"_right","class":"mceRight"}]],["div",{id:w+"_bottom","class":"mceBottom"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:w+"_status"},"Content"]],["a",{"class":"mceMove",tabindex:"-1",href:"javascript:;"}],["a",{"class":"mceMin",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMax",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMed",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceClose",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{id:w+"_resize_n","class":"mceResize mceResizeN",tabindex:"-1",href:"javascript:;"}],["a",{id:w+"_resize_s","class":"mceResize mceResizeS",tabindex:"-1",href:"javascript:;"}],["a",{id:w+"_resize_w","class":"mceResize mceResizeW",tabindex:"-1",href:"javascript:;"}],["a",{id:w+"_resize_e","class":"mceResize mceResizeE",tabindex:"-1",href:"javascript:;"}],["a",{id:w+"_resize_nw","class":"mceResize mceResizeNW",tabindex:"-1",href:"javascript:;"}],["a",{id:w+"_resize_ne","class":"mceResize mceResizeNE",tabindex:"-1",href:"javascript:;"}],["a",{id:w+"_resize_sw","class":"mceResize mceResizeSW",tabindex:"-1",href:"javascript:;"}],["a",{id:w+"_resize_se","class":"mceResize mceResizeSE",tabindex:"-1",href:"javascript:;"}]]]);i.setStyles(w,{top:-10000,left:-10000});if(tinymce.isGecko){i.setStyle(w,"overflow","auto")}if(!a.type){A+=i.get(w+"_left").clientWidth;A+=i.get(w+"_right").clientWidth;E+=i.get(w+"_top").clientHeight;E+=i.get(w+"_bottom").clientHeight}i.setStyles(w,{top:a.top,left:a.left,width:a.width+A,height:a.height+E});C=a.url||a.file;if(C){if(tinymce.relaxedDomain){C+=(C.indexOf("?")==-1?"?":"&")+"mce_rdomain="+tinymce.relaxedDomain}C=tinymce._addVer(C)}if(!a.type){i.add(w+"_content","iframe",{id:w+"_ifr",src:'javascript:""',frameBorder:0,style:"border:0;width:10px;height:10px"});i.setStyles(w+"_ifr",{width:a.width,height:a.height});i.setAttrib(w+"_ifr","src",C)}else{i.add(w+"_wrapper","a",{id:w+"_ok","class":"mceButton mceOk",href:"javascript:;",onmousedown:"return false;"},"Ok");if(a.type=="confirm"){i.add(w+"_wrapper","a",{"class":"mceButton mceCancel",href:"javascript:;",onmousedown:"return false;"},"Cancel")}i.add(w+"_middle","div",{"class":"mceIcon"});i.setHTML(w+"_content",a.content.replace("\n","<br />"))}d=g.add(w,"mousedown",function(l){var k=l.target,m,n;m=B.windows[w];B.focus(w);if(k.nodeName=="A"||k.nodeName=="a"){if(k.className=="mceMax"){m.oldPos=m.element.getXY();m.oldSize=m.element.getSize();n=i.getViewPort();n.w-=2;n.h-=2;m.element.moveTo(n.x,n.y);m.element.resizeTo(n.w,n.h);i.setStyles(w+"_ifr",{width:n.w-m.deltaWidth,height:n.h-m.deltaHeight});i.addClass(w+"_wrapper","mceMaximized")}else{if(k.className=="mceMed"){m.element.moveTo(m.oldPos.x,m.oldPos.y);m.element.resizeTo(m.oldSize.w,m.oldSize.h);m.iframeElement.resizeTo(m.oldSize.w-m.deltaWidth,m.oldSize.h-m.deltaHeight);i.removeClass(w+"_wrapper","mceMaximized")}else{if(k.className=="mceMove"){return B._startDrag(w,l,k.className)}else{if(i.hasClass(k,"mceResize")){return B._startDrag(w,l,k.className.substring(13))}}}}}});c=g.add(w,"click",function(k){var l=k.target;B.focus(w);if(l.nodeName=="A"||l.nodeName=="a"){switch(l.className){case"mceClose":B.close(null,w);return g.cancel(k);case"mceButton mceOk":case"mceButton mceCancel":a.button_func(l.className=="mceButton mceOk");return g.cancel(k)}}});D=B.windows[w]={id:w,mousedown_func:d,click_func:c,element:new f(w,{blocker:1,container:b.getContainer()}),iframeElement:new f(w+"_ifr"),features:a,deltaWidth:A,deltaHeight:E};D.iframeElement.on("focus",function(){B.focus(w)});if(B.count==0&&B.editor.getParam("dialog_type","modal")=="modal"){i.add(i.doc.body,"div",{id:"mceModalBlocker","class":(B.editor.settings.inlinepopups_skin||"clearlooks2")+"_modalBlocker",style:{zIndex:B.zIndex-1}});i.show("mceModalBlocker")}else{i.setStyle("mceModalBlocker","z-index",B.zIndex-1)}if(tinymce.isIE6||/Firefox\/2\./.test(navigator.userAgent)||(tinymce.isIE&&!i.boxModel)){i.setStyles("mceModalBlocker",{position:"absolute",left:z.x,top:z.y,width:z.w-2,height:z.h-2})}B.focus(w);B._fixIELayout(w,1);if(i.get(w+"_ok")){i.get(w+"_ok").focus()}B.count++;return D},focus:function(a){var b=this,c;if(c=b.windows[a]){c.zIndex=this.zIndex++;c.element.setStyle("zIndex",c.zIndex);c.element.update();a=a+"_wrapper";i.removeClass(b.lastId,"mceFocus");i.addClass(a,"mceFocus");b.lastId=a}},_addAll:function(b,d){var e,a,m=this,c=tinymce.DOM;if(j(d,"string")){b.appendChild(c.doc.createTextNode(d))}else{if(d.length){b=b.appendChild(c.create(d[0],d[1]));for(e=2;e<d.length;e++){m._addAll(b,d[e])}}}},_startDrag:function(e,d,w){var O=this,t,a,K=i.doc,X,R=O.windows[e],V=R.element,b=V.getXY(),c,M,p,W,N,I,J,T,U,Q,S,P,L;W={x:0,y:0};N=i.getViewPort();N.w-=2;N.h-=2;T=d.screenX;U=d.screenY;Q=S=P=L=0;t=g.add(K,"mouseup",function(k){g.remove(K,"mouseup",t);g.remove(K,"mousemove",a);if(X){X.remove()}V.moveBy(Q,S);V.resizeBy(P,L);M=V.getSize();i.setStyles(e+"_ifr",{width:M.w-R.deltaWidth,height:M.h-R.deltaHeight});O._fixIELayout(e,1);return g.cancel(k)});if(w!="Move"){H()}function H(){if(X){return}O._fixIELayout(e,0);i.add(K.body,"div",{id:"mceEventBlocker","class":"mceEventBlocker "+(O.editor.settings.inlinepopups_skin||"clearlooks2"),style:{zIndex:O.zIndex+1}});if(tinymce.isIE6||(tinymce.isIE&&!i.boxModel)){i.setStyles("mceEventBlocker",{position:"absolute",left:N.x,top:N.y,width:N.w-2,height:N.h-2})}X=new f("mceEventBlocker");X.update();c=V.getXY();M=V.getSize();I=W.x+c.x-N.x;J=W.y+c.y-N.y;i.add(X.get(),"div",{id:"mcePlaceHolder","class":"mcePlaceHolder",style:{left:I,top:J,width:M.w,height:M.h}});p=new f("mcePlaceHolder")}a=g.add(K,"mousemove",function(k){var n,m,l;H();n=k.screenX-T;m=k.screenY-U;switch(w){case"ResizeW":Q=n;P=0-n;break;case"ResizeE":P=n;break;case"ResizeN":case"ResizeNW":case"ResizeNE":if(w=="ResizeNW"){Q=n;P=0-n}else{if(w=="ResizeNE"){P=n}}S=m;L=0-m;break;case"ResizeS":case"ResizeSW":case"ResizeSE":if(w=="ResizeSW"){Q=n;P=0-n}else{if(w=="ResizeSE"){P=n}}L=m;break;case"mceMove":Q=n;S=m;break}if(P<(l=R.features.min_width-M.w)){if(Q!==0){Q+=P-l}P=l}if(L<(l=R.features.min_height-M.h)){if(S!==0){S+=L-l}L=l}P=Math.min(P,R.features.max_width-M.w);L=Math.min(L,R.features.max_height-M.h);Q=Math.max(Q,N.x-(I+N.x));S=Math.max(S,N.y-(J+N.y));Q=Math.min(Q,(N.w+N.x)-(I+M.w+N.x));S=Math.min(S,(N.h+N.y)-(J+M.h+N.y));if(Q+S!==0){if(I+Q<0){Q=0}if(J+S<0){S=0}p.moveTo(I+Q,J+S)}if(P+L!==0){p.resizeTo(M.w+P,M.h+L)}return g.cancel(k)});return g.cancel(d)},resizeBy:function(c,b,a){var d=this.windows[a];if(d){d.element.resizeBy(c,b);d.iframeElement.resizeBy(c,b)}},close:function(c,a){var e=this,m,b=i.doc,n=0,d,a;a=e._findId(a||c);if(!e.windows[a]){e.parent(c);return}e.count--;if(e.count==0){i.remove("mceModalBlocker")}if(m=e.windows[a]){e.onClose.dispatch(e);g.remove(b,"mousedown",m.mousedownFunc);g.remove(b,"click",m.clickFunc);g.clear(a);g.clear(a+"_ifr");i.setAttrib(a+"_ifr","src",'javascript:""');m.element.remove();delete e.windows[a];h(e.windows,function(k){if(k.zIndex>n){d=k;n=k.zIndex}});if(d){e.focus(d.id)}}},setTitle:function(c,b){var a;c=this._findId(c);if(a=i.get(c+"_title")){a.innerHTML=i.encode(b)}},alert:function(d,e,a){var b=this,c;c=b.open({title:b,type:"alert",button_func:function(l){if(e){e.call(l||b,l)}b.close(null,c.id)},content:i.encode(b.editor.getLang(d,d)),inline:1,width:400,height:130})},confirm:function(d,e,a){var b=this,c;c=b.open({title:b,type:"confirm",button_func:function(l){if(e){e.call(l||b,l)}b.close(null,c.id)},content:i.encode(b.editor.getLang(d,d)),inline:1,width:400,height:130})},_findId:function(b){var a=this;if(typeof(b)=="string"){return b}h(a.windows,function(d){var c=i.get(d.id+"_ifr");if(c&&b==c.contentWindow){b=d.id;return false}});return b},_fixIELayout:function(a,b){var d,c;if(!tinymce.isIE6){return}h(["n","s","w","e","nw","ne","sw","se"],function(l){var e=i.get(a+"_resize_"+l);i.setStyles(e,{width:b?e.clientWidth:"",height:b?e.clientHeight:"",cursor:i.getStyle(e,"cursor",1)});i.setStyle(a+"_bottom","bottom","-1px");e=0});if(d=this.windows[a]){d.element.hide();d.element.show();h(i.select("div,a",a),function(e,l){if(e.currentStyle.backgroundImage!="none"){c=new Image();c.src=e.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/,"$1")}});i.get(a).style.filter=""}}});tinymce.PluginManager.add("inlinepopups",tinymce.plugins.InlinePopups)})();
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|