summaryrefslogtreecommitdiff
path: root/public/javascripts/tiny_mce/plugins/inlinepopups
diff options
context:
space:
mode:
Diffstat (limited to 'public/javascripts/tiny_mce/plugins/inlinepopups')
-rwxr-xr-xpublic/javascripts/tiny_mce/plugins/inlinepopups/editor_plugin.js1
-rwxr-xr-xpublic/javascripts/tiny_mce/plugins/inlinepopups/editor_plugin_src.js632
-rwxr-xr-xpublic/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gifbin0 -> 818 bytes
-rwxr-xr-xpublic/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gifbin0 -> 280 bytes
-rwxr-xr-xpublic/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gifbin0 -> 1195 bytes
-rwxr-xr-xpublic/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gifbin0 -> 915 bytes
-rwxr-xr-xpublic/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gifbin0 -> 911 bytes
-rwxr-xr-xpublic/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gifbin0 -> 769 bytes
-rwxr-xr-xpublic/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gifbin0 -> 92 bytes
-rwxr-xr-xpublic/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css90
-rwxr-xr-xpublic/javascripts/tiny_mce/plugins/inlinepopups/template.htm387
11 files changed, 1110 insertions, 0 deletions
diff --git a/public/javascripts/tiny_mce/plugins/inlinepopups/editor_plugin.js b/public/javascripts/tiny_mce/plugins/inlinepopups/editor_plugin.js
new file mode 100755
index 0000000..5560b6b
--- /dev/null
+++ b/public/javascripts/tiny_mce/plugins/inlinepopups/editor_plugin.js
@@ -0,0 +1 @@
(function(){var DOM=tinymce.DOM,Element=tinymce.dom.Element,Event=tinymce.dom.Event,each=tinymce.each,is=tinymce.is;tinymce.create('tinymce.plugins.InlinePopups',{init:function(ed,url){ed.onBeforeRenderUI.add(function(){ed.windowManager=new tinymce.InlineWindowManager(ed);DOM.loadCSS(url+'/skins/'+(ed.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(ed){var t=this;t.parent(ed);t.zIndex=300000;t.count=0;t.windows={};},open:function(f,p){var t=this,id,opt='',ed=t.editor,dw=0,dh=0,vp,po,mdf,clf,we,w,u;f=f||{};p=p||{};if(!f.inline)return t.parent(f,p);if(!f.type)t.bookmark=ed.selection.getBookmark('simple');id=DOM.uniqueId();vp=DOM.getViewPort();f.width=parseInt(f.width||320);f.height=parseInt(f.height||240)+(tinymce.isIE?8:0);f.min_width=parseInt(f.min_width||150);f.min_height=parseInt(f.min_height||100);f.max_width=parseInt(f.max_width||2000);f.max_height=parseInt(f.max_height||2000);f.left=f.left||Math.round(Math.max(vp.x,vp.x+(vp.w/ 2.0) - (f.width /2.0)));f.top=f.top||Math.round(Math.max(vp.y,vp.y+(vp.h/ 2.0) - (f.height /2.0)));f.movable=f.resizable=true;p.mce_width=f.width;p.mce_height=f.height;p.mce_inline=true;p.mce_window_id=id;p.mce_auto_focus=f.auto_focus;t.features=f;t.params=p;t.onOpen.dispatch(t,f,p);if(f.type){opt+=' mceModal';if(f.type)opt+=' mce'+f.type.substring(0,1).toUpperCase()+f.type.substring(1);f.resizable=false;}if(f.statusbar)opt+=' mceStatusbar';if(f.resizable)opt+=' mceResizable';if(f.minimizable)opt+=' mceMinimizable';if(f.maximizable)opt+=' mceMaximizable';if(f.movable)opt+=' mceMovable';t._addAll(DOM.doc.body,['div',{id:id,'class':ed.settings.inlinepopups_skin||'clearlooks2',style:'width:100px;height:100px'},['div',{id:id+'_wrapper','class':'mceWrapper'+opt},['div',{id:id+'_top','class':'mceTop'},['div',{'class':'mceLeft'}],['div',{'class':'mceCenter'}],['div',{'class':'mceRight'}],['span',{id:id+'_title'},f.title||'']],['div',{id:id+'_middle','class':'mceMiddle'},['div',{id:id+'_left','class':'mceLeft'}],['span',{id:id+'_content'}],['div',{id:id+'_right','class':'mceRight'}]],['div',{id:id+'_bottom','class':'mceBottom'},['div',{'class':'mceLeft'}],['div',{'class':'mceCenter'}],['div',{'class':'mceRight'}],['span',{id:id+'_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:id+'_resize_n','class':'mceResize mceResizeN',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_s','class':'mceResize mceResizeS',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_w','class':'mceResize mceResizeW',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_e','class':'mceResize mceResizeE',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_nw','class':'mceResize mceResizeNW',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_ne','class':'mceResize mceResizeNE',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_sw','class':'mceResize mceResizeSW',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_se','class':'mceResize mceResizeSE',tabindex:'-1',href:'javascript:;'}]]]);DOM.setStyles(id,{top:-10000,left:-10000});if(tinymce.isGecko)DOM.setStyle(id,'overflow','auto');if(!f.type){dw+=DOM.get(id+'_left').clientWidth;dw+=DOM.get(id+'_right').clientWidth;dh+=DOM.get(id+'_top').clientHeight;dh+=DOM.get(id+'_bottom').clientHeight;}DOM.setStyles(id,{top:f.top,left:f.left,width:f.width+dw,height:f.height+dh});u=f.url||f.file;if(u){if(tinymce.relaxedDomain)u+=(u.indexOf('?')==-1?'?':'&')+'mce_rdomain='+tinymce.relaxedDomain;u=tinymce._addVer(u);}if(!f.type){DOM.add(id+'_content','iframe',{id:id+'_ifr',src:'javascript:""',frameBorder:0,style:'border:0;width:10px;height:10px'});DOM.setStyles(id+'_ifr',{width:f.width,height:f.height});DOM.setAttrib(id+'_ifr','src',u);}else{DOM.add(id+'_wrapper','a',{id:id+'_ok','class':'mceButton mceOk',href:'javascript:;',onmousedown:'return false;'},'Ok');if(f.type=='confirm')DOM.add(id+'_wrapper','a',{'class':'mceButton mceCancel',href:'javascript:;',onmousedown:'return false;'},'Cancel');DOM.add(id+'_middle','div',{'class':'mceIcon'});DOM.setHTML(id+'_content',f.content.replace('\n','<br />'));}mdf=Event.add(id,'mousedown',function(e){var n=e.target,w,vp;w=t.windows[id];t.focus(id);if(n.nodeName=='A'||n.nodeName=='a'){if(n.className=='mceMax'){w.oldPos=w.element.getXY();w.oldSize=w.element.getSize();vp=DOM.getViewPort();vp.w-=2;vp.h-=2;w.element.moveTo(vp.x,vp.y);w.element.resizeTo(vp.w,vp.h);DOM.setStyles(id+'_ifr',{width:vp.w-w.deltaWidth,height:vp.h-w.deltaHeight});DOM.addClass(id+'_wrapper','mceMaximized');}else if(n.className=='mceMed'){w.element.moveTo(w.oldPos.x,w.oldPos.y);w.element.resizeTo(w.oldSize.w,w.oldSize.h);w.iframeElement.resizeTo(w.oldSize.w-w.deltaWidth,w.oldSize.h-w.deltaHeight);DOM.removeClass(id+'_wrapper','mceMaximized');}else if(n.className=='mceMove')return t._startDrag(id,e,n.className);else if(DOM.hasClass(n,'mceResize'))return t._startDrag(id,e,n.className.substring(13));}});clf=Event.add(id,'click',function(e){var n=e.target;t.focus(id);if(n.nodeName=='A'||n.nodeName=='a'){switch(n.className){case'mceClose':t.close(null,id);return Event.cancel(e);case'mceButton mceOk':case'mceButton mceCancel':f.button_func(n.className=='mceButton mceOk');return Event.cancel(e);}}});w=t.windows[id]={id:id,mousedown_func:mdf,click_func:clf,element:new Element(id,{blocker:1,container:ed.getContainer()}),iframeElement:new Element(id+'_ifr'),features:f,deltaWidth:dw,deltaHeight:dh};w.iframeElement.on('focus',function(){t.focus(id);});if(t.count==0&&t.editor.getParam('dialog_type','modal')=='modal'){DOM.add(DOM.doc.body,'div',{id:'mceModalBlocker','class':(t.editor.settings.inlinepopups_skin||'clearlooks2')+'_modalBlocker',style:{zIndex:t.zIndex-1}});DOM.show('mceModalBlocker');}else DOM.setStyle('mceModalBlocker','z-index',t.zIndex-1);if(tinymce.isIE6||/Firefox\/2\./.test(navigator.userAgent)||(tinymce.isIE&&!DOM.boxModel))DOM.setStyles('mceModalBlocker',{position:'absolute',width:vp.w-2,height:vp.h-2});t.focus(id);t._fixIELayout(id,1);if(DOM.get(id+'_ok'))DOM.get(id+'_ok').focus();t.count++;return w;},focus:function(id){var t=this,w;if(w=t.windows[id]){w.zIndex=this.zIndex++;w.element.setStyle('zIndex',w.zIndex);w.element.update();id=id+'_wrapper';DOM.removeClass(t.lastId,'mceFocus');DOM.addClass(id,'mceFocus');t.lastId=id;}},_addAll:function(te,ne){var i,n,t=this,dom=tinymce.DOM;if(is(ne,'string'))te.appendChild(dom.doc.createTextNode(ne));else if(ne.length){te=te.appendChild(dom.create(ne[0],ne[1]));for(i=2;i<ne.length;i++)t._addAll(te,ne[i]);}},_startDrag:function(id,se,ac){var t=this,mu,mm,d=DOM.doc,eb,w=t.windows[id],we=w.element,sp=we.getXY(),p,sz,ph,cp,vp,sx,sy,sex,sey,dx,dy,dw,dh;cp={x:0,y:0};vp=DOM.getViewPort();vp.w-=2;vp.h-=2;sex=se.screenX;sey=se.screenY;dx=dy=dw=dh=0;mu=Event.add(d,'mouseup',function(e){Event.remove(d,'mouseup',mu);Event.remove(d,'mousemove',mm);if(eb)eb.remove();we.moveBy(dx,dy);we.resizeBy(dw,dh);sz=we.getSize();DOM.setStyles(id+'_ifr',{width:sz.w-w.deltaWidth,height:sz.h-w.deltaHeight});t._fixIELayout(id,1);return Event.cancel(e);});if(ac!='Move')startMove();function startMove(){if(eb)return;t._fixIELayout(id,0);DOM.add(d.body,'div',{id:'mceEventBlocker','class':'mceEventBlocker '+(t.editor.settings.inlinepopups_skin||'clearlooks2'),style:{zIndex:t.zIndex+1}});if(tinymce.isIE6||(tinymce.isIE&&!DOM.boxModel))DOM.setStyles('mceEventBlocker',{position:'absolute',width:vp.w-2,height:vp.h-2});eb=new Element('mceEventBlocker');eb.update();p=we.getXY();sz=we.getSize();sx=cp.x+p.x-vp.x;sy=cp.y+p.y-vp.y;DOM.add(eb.get(),'div',{id:'mcePlaceHolder','class':'mcePlaceHolder',style:{left:sx,top:sy,width:sz.w,height:sz.h}});ph=new Element('mcePlaceHolder');};mm=Event.add(d,'mousemove',function(e){var x,y,v;startMove();x=e.screenX-sex;y=e.screenY-sey;switch(ac){case'ResizeW':dx=x;dw=0-x;break;case'ResizeE':dw=x;break;case'ResizeN':case'ResizeNW':case'ResizeNE':if(ac=="ResizeNW"){dx=x;dw=0-x;}else if(ac=="ResizeNE")dw=x;dy=y;dh=0-y;break;case'ResizeS':case'ResizeSW':case'ResizeSE':if(ac=="ResizeSW"){dx=x;dw=0-x;}else if(ac=="ResizeSE")dw=x;dh=y;break;case'mceMove':dx=x;dy=y;break;}if(dw<(v=w.features.min_width-sz.w)){if(dx!==0)dx+=dw-v;dw=v;}if(dh<(v=w.features.min_height-sz.h)){if(dy!==0)dy+=dh-v;dh=v;}dw=Math.min(dw,w.features.max_width-sz.w);dh=Math.min(dh,w.features.max_height-sz.h);dx=Math.max(dx,vp.x-(sx+vp.x));dy=Math.max(dy,vp.y-(sy+vp.y));dx=Math.min(dx,(vp.w+vp.x)-(sx+sz.w+vp.x));dy=Math.min(dy,(vp.h+vp.y)-(sy+sz.h+vp.y));if(dx+dy!==0){if(sx+dx<0)dx=0;if(sy+dy<0)dy=0;ph.moveTo(sx+dx,sy+dy);}if(dw+dh!==0)ph.resizeTo(sz.w+dw,sz.h+dh);return Event.cancel(e);});return Event.cancel(se);},resizeBy:function(dw,dh,id){var w=this.windows[id];if(w){w.element.resizeBy(dw,dh);w.iframeElement.resizeBy(dw,dh);}},close:function(win,id){var t=this,w,d=DOM.doc,ix=0,fw,id;id=t._findId(id||win);if(!t.windows[id]){t.parent(win);return;}t.count--;if(t.count==0)DOM.remove('mceModalBlocker');if(w=t.windows[id]){t.onClose.dispatch(t);Event.remove(d,'mousedown',w.mousedownFunc);Event.remove(d,'click',w.clickFunc);Event.clear(id);Event.clear(id+'_ifr');DOM.setAttrib(id+'_ifr','src','javascript:""');w.element.remove();delete t.windows[id];each(t.windows,function(w){if(w.zIndex>ix){fw=w;ix=w.zIndex;}});if(fw)t.focus(fw.id);}},setTitle:function(w,ti){var e;w=this._findId(w);if(e=DOM.get(w+'_title'))e.innerHTML=DOM.encode(ti);},alert:function(txt,cb,s){var t=this,w;w=t.open({title:t,type:'alert',button_func:function(s){if(cb)cb.call(s||t,s);t.close(null,w.id);},content:DOM.encode(t.editor.getLang(txt,txt)),inline:1,width:400,height:130});},confirm:function(txt,cb,s){var t=this,w;w=t.open({title:t,type:'confirm',button_func:function(s){if(cb)cb.call(s||t,s);t.close(null,w.id);},content:DOM.encode(t.editor.getLang(txt,txt)),inline:1,width:400,height:130});},_findId:function(w){var t=this;if(typeof(w)=='string')return w;each(t.windows,function(wo){var ifr=DOM.get(wo.id+'_ifr');if(ifr&&w==ifr.contentWindow){w=wo.id;return false;}});return w;},_fixIELayout:function(id,s){var w,img;if(!tinymce.isIE6)return;each(['n','s','w','e','nw','ne','sw','se'],function(v){var e=DOM.get(id+'_resize_'+v);DOM.setStyles(e,{width:s?e.clientWidth:'',height:s?e.clientHeight:'',cursor:DOM.getStyle(e,'cursor',1)});DOM.setStyle(id+"_bottom",'bottom','-1px');e=0;});if(w=this.windows[id]){w.element.hide();w.element.show();each(DOM.select('div,a',id),function(e,i){if(e.currentStyle.backgroundImage!='none'){img=new Image();img.src=e.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/,'$1');}});DOM.get(id).style.filter='';}}});tinymce.PluginManager.add('inlinepopups',tinymce.plugins.InlinePopups);})(); \ No newline at end of file
diff --git a/public/javascripts/tiny_mce/plugins/inlinepopups/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/inlinepopups/editor_plugin_src.js
new file mode 100755
index 0000000..027a23c
--- /dev/null
+++ b/public/javascripts/tiny_mce/plugins/inlinepopups/editor_plugin_src.js
@@ -0,0 +1,632 @@
1/**
2 * $Id: editor_plugin_src.js 961 2008-11-14 10:31:07Z spocke $
3 *
4 * @author Moxiecode
5 * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
6 */
7
8(function() {
9 var DOM = tinymce.DOM, Element = tinymce.dom.Element, Event = tinymce.dom.Event, each = tinymce.each, is = tinymce.is;
10
11 tinymce.create('tinymce.plugins.InlinePopups', {
12 init : function(ed, url) {
13 // Replace window manager
14 ed.onBeforeRenderUI.add(function() {
15 ed.windowManager = new tinymce.InlineWindowManager(ed);
16 DOM.loadCSS(url + '/skins/' + (ed.settings.inlinepopups_skin || 'clearlooks2') + "/window.css");
17 });
18 },
19
20 getInfo : function() {
21 return {
22 longname : 'InlinePopups',
23 author : 'Moxiecode Systems AB',
24 authorurl : 'http://tinymce.moxiecode.com',
25 infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups',
26 version : tinymce.majorVersion + "." + tinymce.minorVersion
27 };
28 }
29 });
30
31 tinymce.create('tinymce.InlineWindowManager:tinymce.WindowManager', {
32 InlineWindowManager : function(ed) {
33 var t = this;
34
35 t.parent(ed);
36 t.zIndex = 300000;
37 t.count = 0;
38 t.windows = {};
39 },
40
41 open : function(f, p) {
42 var t = this, id, opt = '', ed = t.editor, dw = 0, dh = 0, vp, po, mdf, clf, we, w, u;
43
44 f = f || {};
45 p = p || {};
46
47 // Run native windows
48 if (!f.inline)
49 return t.parent(f, p);
50
51 // Only store selection if the type is a normal window
52 if (!f.type)
53 t.bookmark = ed.selection.getBookmark('simple');
54
55 id = DOM.uniqueId();
56 vp = DOM.getViewPort();
57 f.width = parseInt(f.width || 320);
58 f.height = parseInt(f.height || 240) + (tinymce.isIE ? 8 : 0);
59 f.min_width = parseInt(f.min_width || 150);
60 f.min_height = parseInt(f.min_height || 100);
61 f.max_width = parseInt(f.max_width || 2000);
62 f.max_height = parseInt(f.max_height || 2000);
63 f.left = f.left || Math.round(Math.max(vp.x, vp.x + (vp.w / 2.0) - (f.width / 2.0)));
64 f.top = f.top || Math.round(Math.max(vp.y, vp.y + (vp.h / 2.0) - (f.height / 2.0)));
65 f.movable = f.resizable = true;
66 p.mce_width = f.width;
67 p.mce_height = f.height;
68 p.mce_inline = true;
69 p.mce_window_id = id;
70 p.mce_auto_focus = f.auto_focus;
71
72 // Transpose
73// po = DOM.getPos(ed.getContainer());
74// f.left -= po.x;
75// f.top -= po.y;
76
77 t.features = f;
78 t.params = p;
79 t.onOpen.dispatch(t, f, p);
80
81 if (f.type) {
82 opt += ' mceModal';
83
84 if (f.type)
85 opt += ' mce' + f.type.substring(0, 1).toUpperCase() + f.type.substring(1);
86
87 f.resizable = false;
88 }
89
90 if (f.statusbar)
91 opt += ' mceStatusbar';
92
93 if (f.resizable)
94 opt += ' mceResizable';
95
96 if (f.minimizable)
97 opt += ' mceMinimizable';
98
99 if (f.maximizable)
100 opt += ' mceMaximizable';
101
102 if (f.movable)
103 opt += ' mceMovable';
104
105 // Create DOM objects
106 t._addAll(DOM.doc.body,
107 ['div', {id : id, 'class' : ed.settings.inlinepopups_skin || 'clearlooks2', style : 'width:100px;height:100px'},
108 ['div', {id : id + '_wrapper', 'class' : 'mceWrapper' + opt},
109 ['div', {id : id + '_top', 'class' : 'mceTop'},
110 ['div', {'class' : 'mceLeft'}],
111 ['div', {'class' : 'mceCenter'}],
112 ['div', {'class' : 'mceRight'}],
113 ['span', {id : id + '_title'}, f.title || '']
114 ],
115
116 ['div', {id : id + '_middle', 'class' : 'mceMiddle'},
117 ['div', {id : id + '_left', 'class' : 'mceLeft'}],
118 ['span', {id : id + '_content'}],
119 ['div', {id : id + '_right', 'class' : 'mceRight'}]
120 ],
121
122 ['div', {id : id + '_bottom', 'class' : 'mceBottom'},
123 ['div', {'class' : 'mceLeft'}],
124 ['div', {'class' : 'mceCenter'}],
125 ['div', {'class' : 'mceRight'}],
126 ['span', {id : id + '_status'}, 'Content']
127 ],
128
129 ['a', {'class' : 'mceMove', tabindex : '-1', href : 'javascript:;'}],
130 ['a', {'class' : 'mceMin', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}],
131 ['a', {'class' : 'mceMax', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}],
132 ['a', {'class' : 'mceMed', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}],
133 ['a', {'class' : 'mceClose', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}],
134 ['a', {id : id + '_resize_n', 'class' : 'mceResize mceResizeN', tabindex : '-1', href : 'javascript:;'}],
135 ['a', {id : id + '_resize_s', 'class' : 'mceResize mceResizeS', tabindex : '-1', href : 'javascript:;'}],
136 ['a', {id : id + '_resize_w', 'class' : 'mceResize mceResizeW', tabindex : '-1', href : 'javascript:;'}],
137 ['a', {id : id + '_resize_e', 'class' : 'mceResize mceResizeE', tabindex : '-1', href : 'javascript:;'}],
138 ['a', {id : id + '_resize_nw', 'class' : 'mceResize mceResizeNW', tabindex : '-1', href : 'javascript:;'}],
139 ['a', {id : id + '_resize_ne', 'class' : 'mceResize mceResizeNE', tabindex : '-1', href : 'javascript:;'}],
140 ['a', {id : id + '_resize_sw', 'class' : 'mceResize mceResizeSW', tabindex : '-1', href : 'javascript:;'}],
141 ['a', {id : id + '_resize_se', 'class' : 'mceResize mceResizeSE', tabindex : '-1', href : 'javascript:;'}]
142 ]
143 ]
144 );
145
146 DOM.setStyles(id, {top : -10000, left : -10000});
147
148 // Fix gecko rendering bug, where the editors iframe messed with window contents
149 if (tinymce.isGecko)
150 DOM.setStyle(id, 'overflow', 'auto');
151
152 // Measure borders
153 if (!f.type) {
154 dw += DOM.get(id + '_left').clientWidth;
155 dw += DOM.get(id + '_right').clientWidth;
156 dh += DOM.get(id + '_top').clientHeight;
157 dh += DOM.get(id + '_bottom').clientHeight;
158 }
159
160 // Resize window
161 DOM.setStyles(id, {top : f.top, left : f.left, width : f.width + dw, height : f.height + dh});
162
163 u = f.url || f.file;
164 if (u) {
165 if (tinymce.relaxedDomain)
166 u += (u.indexOf('?') == -1 ? '?' : '&') + 'mce_rdomain=' + tinymce.relaxedDomain;
167
168 u = tinymce._addVer(u);
169 }
170
171 if (!f.type) {
172 DOM.add(id + '_content', 'iframe', {id : id + '_ifr', src : 'javascript:""', frameBorder : 0, style : 'border:0;width:10px;height:10px'});
173 DOM.setStyles(id + '_ifr', {width : f.width, height : f.height});
174 DOM.setAttrib(id + '_ifr', 'src', u);
175 } else {
176 DOM.add(id + '_wrapper', 'a', {id : id + '_ok', 'class' : 'mceButton mceOk', href : 'javascript:;', onmousedown : 'return false;'}, 'Ok');
177
178 if (f.type == 'confirm')
179 DOM.add(id + '_wrapper', 'a', {'class' : 'mceButton mceCancel', href : 'javascript:;', onmousedown : 'return false;'}, 'Cancel');
180
181 DOM.add(id + '_middle', 'div', {'class' : 'mceIcon'});
182 DOM.setHTML(id + '_content', f.content.replace('\n', '<br />'));
183 }
184
185 // Register events
186 mdf = Event.add(id, 'mousedown', function(e) {
187 var n = e.target, w, vp;
188
189 w = t.windows[id];
190 t.focus(id);
191
192 if (n.nodeName == 'A' || n.nodeName == 'a') {
193 if (n.className == 'mceMax') {
194 w.oldPos = w.element.getXY();
195 w.oldSize = w.element.getSize();
196
197 vp = DOM.getViewPort();
198
199 // Reduce viewport size to avoid scrollbars
200 vp.w -= 2;
201 vp.h -= 2;
202
203 w.element.moveTo(vp.x, vp.y);
204 w.element.resizeTo(vp.w, vp.h);
205 DOM.setStyles(id + '_ifr', {width : vp.w - w.deltaWidth, height : vp.h - w.deltaHeight});
206 DOM.addClass(id + '_wrapper', 'mceMaximized');
207 } else if (n.className == 'mceMed') {
208 // Reset to old size
209 w.element.moveTo(w.oldPos.x, w.oldPos.y);
210 w.element.resizeTo(w.oldSize.w, w.oldSize.h);
211 w.iframeElement.resizeTo(w.oldSize.w - w.deltaWidth, w.oldSize.h - w.deltaHeight);
212
213 DOM.removeClass(id + '_wrapper', 'mceMaximized');
214 } else if (n.className == 'mceMove')
215 return t._startDrag(id, e, n.className);
216 else if (DOM.hasClass(n, 'mceResize'))
217 return t._startDrag(id, e, n.className.substring(13));
218 }
219 });
220
221 clf = Event.add(id, 'click', function(e) {
222 var n = e.target;
223
224 t.focus(id);
225
226 if (n.nodeName == 'A' || n.nodeName == 'a') {
227 switch (n.className) {
228 case 'mceClose':
229 t.close(null, id);
230 return Event.cancel(e);
231
232 case 'mceButton mceOk':
233 case 'mceButton mceCancel':
234 f.button_func(n.className == 'mceButton mceOk');
235 return Event.cancel(e);
236 }
237 }
238 });
239
240 // Add window
241 w = t.windows[id] = {
242 id : id,
243 mousedown_func : mdf,
244 click_func : clf,
245 element : new Element(id, {blocker : 1, container : ed.getContainer()}),
246 iframeElement : new Element(id + '_ifr'),
247 features : f,
248 deltaWidth : dw,
249 deltaHeight : dh
250 };
251
252 w.iframeElement.on('focus', function() {
253 t.focus(id);
254 });
255
256 // Setup blocker
257 if (t.count == 0 && t.editor.getParam('dialog_type', 'modal') == 'modal') {
258 DOM.add(DOM.doc.body, 'div', {
259 id : 'mceModalBlocker',
260 'class' : (t.editor.settings.inlinepopups_skin || 'clearlooks2') + '_modalBlocker',
261 style : {zIndex : t.zIndex - 1}
262 });
263
264 DOM.show('mceModalBlocker'); // Reduces flicker in IE
265 } else
266 DOM.setStyle('mceModalBlocker', 'z-index', t.zIndex - 1);
267
268 if (tinymce.isIE6 || /Firefox\/2\./.test(navigator.userAgent) || (tinymce.isIE && !DOM.boxModel))
269 DOM.setStyles('mceModalBlocker', {position : 'absolute', width : vp.w - 2, height : vp.h - 2});
270
271 t.focus(id);
272 t._fixIELayout(id, 1);
273
274 // Focus ok button
275 if (DOM.get(id + '_ok'))
276 DOM.get(id + '_ok').focus();
277
278 t.count++;
279
280 return w;
281 },
282
283 focus : function(id) {
284 var t = this, w;
285
286 if (w = t.windows[id]) {
287 w.zIndex = this.zIndex++;
288 w.element.setStyle('zIndex', w.zIndex);
289 w.element.update();
290
291 id = id + '_wrapper';
292 DOM.removeClass(t.lastId, 'mceFocus');
293 DOM.addClass(id, 'mceFocus');
294 t.lastId = id;
295 }
296 },
297
298 _addAll : function(te, ne) {
299 var i, n, t = this, dom = tinymce.DOM;
300
301 if (is(ne, 'string'))
302 te.appendChild(dom.doc.createTextNode(ne));
303 else if (ne.length) {
304 te = te.appendChild(dom.create(ne[0], ne[1]));
305
306 for (i=2; i<ne.length; i++)
307 t._addAll(te, ne[i]);
308 }
309 },
310
311 _startDrag : function(id, se, ac) {
312 var t = this, mu, mm, d = DOM.doc, eb, w = t.windows[id], we = w.element, sp = we.getXY(), p, sz, ph, cp, vp, sx, sy, sex, sey, dx, dy, dw, dh;
313
314 // Get positons and sizes
315// cp = DOM.getPos(t.editor.getContainer());
316 cp = {x : 0, y : 0};
317 vp = DOM.getViewPort();
318
319 // Reduce viewport size to avoid scrollbars while dragging
320 vp.w -= 2;
321 vp.h -= 2;
322
323 sex = se.screenX;
324 sey = se.screenY;
325 dx = dy = dw = dh = 0;
326
327 // Handle mouse up
328 mu = Event.add(d, 'mouseup', function(e) {
329 Event.remove(d, 'mouseup', mu);
330 Event.remove(d, 'mousemove', mm);
331
332 if (eb)
333 eb.remove();
334
335 we.moveBy(dx, dy);
336 we.resizeBy(dw, dh);
337 sz = we.getSize();
338 DOM.setStyles(id + '_ifr', {width : sz.w - w.deltaWidth, height : sz.h - w.deltaHeight});
339 t._fixIELayout(id, 1);
340
341 return Event.cancel(e);
342 });
343
344 if (ac != 'Move')
345 startMove();
346
347 function startMove() {
348 if (eb)
349 return;
350
351 t._fixIELayout(id, 0);
352
353 // Setup event blocker
354 DOM.add(d.body, 'div', {
355 id : 'mceEventBlocker',
356 'class' : 'mceEventBlocker ' + (t.editor.settings.inlinepopups_skin || 'clearlooks2'),
357 style : {zIndex : t.zIndex + 1}
358 });
359
360 if (tinymce.isIE6 || (tinymce.isIE && !DOM.boxModel))
361 DOM.setStyles('mceEventBlocker', {position : 'absolute', width : vp.w - 2, height : vp.h - 2});
362
363 eb = new Element('mceEventBlocker');
364 eb.update();
365
366 // Setup placeholder
367 p = we.getXY();
368 sz = we.getSize();
369 sx = cp.x + p.x - vp.x;
370 sy = cp.y + p.y - vp.y;
371 DOM.add(eb.get(), 'div', {id : 'mcePlaceHolder', 'class' : 'mcePlaceHolder', style : {left : sx, top : sy, width : sz.w, height : sz.h}});
372 ph = new Element('mcePlaceHolder');
373 };
374
375 // Handle mouse move/drag
376 mm = Event.add(d, 'mousemove', function(e) {
377 var x, y, v;
378
379 startMove();
380
381 x = e.screenX - sex;
382 y = e.screenY - sey;
383
384 switch (ac) {
385 case 'ResizeW':
386 dx = x;
387 dw = 0 - x;
388 break;
389
390 case 'ResizeE':
391 dw = x;
392 break;
393
394 case 'ResizeN':
395 case 'ResizeNW':
396 case 'ResizeNE':
397 if (ac == "ResizeNW") {
398 dx = x;
399 dw = 0 - x;
400 } else if (ac == "ResizeNE")
401 dw = x;
402
403 dy = y;
404 dh = 0 - y;
405 break;
406
407 case 'ResizeS':
408 case 'ResizeSW':
409 case 'ResizeSE':
410 if (ac == "ResizeSW") {
411 dx = x;
412 dw = 0 - x;
413 } else if (ac == "ResizeSE")
414 dw = x;
415
416 dh = y;
417 break;
418
419 case 'mceMove':
420 dx = x;
421 dy = y;
422 break;
423 }
424
425 // Boundary check
426 if (dw < (v = w.features.min_width - sz.w)) {
427 if (dx !== 0)
428 dx += dw - v;
429
430 dw = v;
431 }
432
433 if (dh < (v = w.features.min_height - sz.h)) {
434 if (dy !== 0)
435 dy += dh - v;
436
437 dh = v;
438 }
439
440 dw = Math.min(dw, w.features.max_width - sz.w);
441 dh = Math.min(dh, w.features.max_height - sz.h);
442 dx = Math.max(dx, vp.x - (sx + vp.x));
443 dy = Math.max(dy, vp.y - (sy + vp.y));
444 dx = Math.min(dx, (vp.w + vp.x) - (sx + sz.w + vp.x));
445 dy = Math.min(dy, (vp.h + vp.y) - (sy + sz.h + vp.y));
446
447 // Move if needed
448 if (dx + dy !== 0) {
449 if (sx + dx < 0)
450 dx = 0;
451
452 if (sy + dy < 0)
453 dy = 0;
454
455 ph.moveTo(sx + dx, sy + dy);
456 }
457
458 // Resize if needed
459 if (dw + dh !== 0)
460 ph.resizeTo(sz.w + dw, sz.h + dh);
461
462 return Event.cancel(e);
463 });
464
465 return Event.cancel(se);
466 },
467
468 resizeBy : function(dw, dh, id) {
469 var w = this.windows[id];
470
471 if (w) {
472 w.element.resizeBy(dw, dh);
473 w.iframeElement.resizeBy(dw, dh);
474 }
475 },
476
477 close : function(win, id) {
478 var t = this, w, d = DOM.doc, ix = 0, fw, id;
479
480 id = t._findId(id || win);
481
482 // Probably not inline
483 if (!t.windows[id]) {
484 t.parent(win);
485 return;
486 }
487
488 t.count--;
489
490 if (t.count == 0)
491 DOM.remove('mceModalBlocker');
492
493 if (w = t.windows[id]) {
494 t.onClose.dispatch(t);
495 Event.remove(d, 'mousedown', w.mousedownFunc);
496 Event.remove(d, 'click', w.clickFunc);
497 Event.clear(id);
498 Event.clear(id + '_ifr');
499
500 DOM.setAttrib(id + '_ifr', 'src', 'javascript:""'); // Prevent leak
501 w.element.remove();
502 delete t.windows[id];
503
504 // Find front most window and focus that
505 each (t.windows, function(w) {
506 if (w.zIndex > ix) {
507 fw = w;
508 ix = w.zIndex;
509 }
510 });
511
512 if (fw)
513 t.focus(fw.id);
514 }
515 },
516
517 setTitle : function(w, ti) {
518 var e;
519
520 w = this._findId(w);
521
522 if (e = DOM.get(w + '_title'))
523 e.innerHTML = DOM.encode(ti);
524 },
525
526 alert : function(txt, cb, s) {
527 var t = this, w;
528
529 w = t.open({
530 title : t,
531 type : 'alert',
532 button_func : function(s) {
533 if (cb)
534 cb.call(s || t, s);
535
536 t.close(null, w.id);
537 },
538 content : DOM.encode(t.editor.getLang(txt, txt)),
539 inline : 1,
540 width : 400,
541 height : 130
542 });
543 },
544
545 confirm : function(txt, cb, s) {
546 var t = this, w;
547
548 w = t.open({
549 title : t,
550 type : 'confirm',
551 button_func : function(s) {
552 if (cb)
553 cb.call(s || t, s);
554
555 t.close(null, w.id);
556 },
557 content : DOM.encode(t.editor.getLang(txt, txt)),
558 inline : 1,
559 width : 400,
560 height : 130
561 });
562 },
563
564 // Internal functions
565
566 _findId : function(w) {
567 var t = this;
568
569 if (typeof(w) == 'string')
570 return w;
571
572 each(t.windows, function(wo) {
573 var ifr = DOM.get(wo.id + '_ifr');
574
575 if (ifr && w == ifr.contentWindow) {
576 w = wo.id;
577 return false;
578 }
579 });
580
581 return w;
582 },
583
584 _fixIELayout : function(id, s) {
585 var w, img;
586
587 if (!tinymce.isIE6)
588 return;
589
590 // Fixes the bug where hover flickers and does odd things in IE6
591 each(['n','s','w','e','nw','ne','sw','se'], function(v) {
592 var e = DOM.get(id + '_resize_' + v);
593
594 DOM.setStyles(e, {
595 width : s ? e.clientWidth : '',
596 height : s ? e.clientHeight : '',
597 cursor : DOM.getStyle(e, 'cursor', 1)
598 });
599
600 DOM.setStyle(id + "_bottom", 'bottom', '-1px');
601
602 e = 0;
603 });
604
605 // Fixes graphics glitch
606 if (w = this.windows[id]) {
607 // Fixes rendering bug after resize
608 w.element.hide();
609 w.element.show();
610
611 // Forced a repaint of the window
612 //DOM.get(id).style.filter = '';
613
614 // IE has a bug where images used in CSS won't get loaded
615 // sometimes when the cache in the browser is disabled
616 // This fix tries to solve it by loading the images using the image object
617 each(DOM.select('div,a', id), function(e, i) {
618 if (e.currentStyle.backgroundImage != 'none') {
619 img = new Image();
620 img.src = e.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/, '$1');
621 }
622 });
623
624 DOM.get(id).style.filter = '';
625 }
626 }
627 });
628
629 // Register plugin
630 tinymce.PluginManager.add('inlinepopups', tinymce.plugins.InlinePopups);
631})();
632
diff --git a/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif b/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif
new file mode 100755
index 0000000..94abd08
--- /dev/null
+++ b/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif
Binary files differ
diff --git a/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif b/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif
new file mode 100755
index 0000000..e671094
--- /dev/null
+++ b/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif
Binary files differ
diff --git a/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif b/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif
new file mode 100755
index 0000000..6baf64a
--- /dev/null
+++ b/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif
Binary files differ
diff --git a/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif b/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif
new file mode 100755
index 0000000..497307a
--- /dev/null
+++ b/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif
Binary files differ
diff --git a/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif b/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif
new file mode 100755
index 0000000..c894b2e
--- /dev/null
+++ b/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif
Binary files differ
diff --git a/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif b/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif
new file mode 100755
index 0000000..c2a2ad4
--- /dev/null
+++ b/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif
Binary files differ
diff --git a/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif b/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif
new file mode 100755
index 0000000..43a735f
--- /dev/null
+++ b/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif
Binary files differ
diff --git a/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css b/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css
new file mode 100755
index 0000000..5e6fd7d
--- /dev/null
+++ b/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css
@@ -0,0 +1,90 @@
1/* Clearlooks 2 */
2
3/* Reset */
4.clearlooks2, .clearlooks2 div, .clearlooks2 span, .clearlooks2 a {vertical-align:baseline; text-align:left; position:absolute; border:0; padding:0; margin:0; background:transparent; font-family:Arial,Verdana; font-size:11px; color:#000; text-decoration:none; font-weight:normal; width:auto; height:auto; overflow:hidden; display:block}
5
6/* General */
7.clearlooks2 {position:absolute; direction:ltr}
8.clearlooks2 .mceWrapper {position:static}
9.mceEventBlocker {position:fixed; left:0; top:0; background:url(img/horizontal.gif) no-repeat 0 -75px; width:100%; height:100%}
10.clearlooks2 .mcePlaceHolder {border:1px solid #000; background:#888; top:0; left:0; opacity:0.5; -ms-filter:'alpha(opacity=50)'; filter:alpha(opacity=50)}
11.clearlooks2_modalBlocker {position:fixed; left:0; top:0; width:100%; height:100%; background:#FFF; opacity:0.6; -ms-filter:'alpha(opacity=60)'; filter:alpha(opacity=60); display:none}
12
13/* Top */
14.clearlooks2 .mceTop, .clearlooks2 .mceTop div {top:0; width:100%; height:23px}
15.clearlooks2 .mceTop .mceLeft {width:6px; background:url(img/corners.gif)}
16.clearlooks2 .mceTop .mceCenter {right:6px; width:100%; height:23px; background:url(img/horizontal.gif) 12px 0; clip:rect(auto auto auto 12px)}
17.clearlooks2 .mceTop .mceRight {right:0; width:6px; height:23px; background:url(img/corners.gif) -12px 0}
18.clearlooks2 .mceTop span {width:100%; text-align:center; vertical-align:middle; line-height:23px; font-weight:bold}
19.clearlooks2 .mceFocus .mceTop .mceLeft {background:url(img/corners.gif) -6px 0}
20.clearlooks2 .mceFocus .mceTop .mceCenter {background:url(img/horizontal.gif) 0 -23px}
21.clearlooks2 .mceFocus .mceTop .mceRight {background:url(img/corners.gif) -18px 0}
22.clearlooks2 .mceFocus .mceTop span {color:#FFF}
23
24/* Middle */
25.clearlooks2 .mceMiddle, .clearlooks2 .mceMiddle div {top:0}
26.clearlooks2 .mceMiddle {width:100%; height:100%; clip:rect(23px auto auto auto)}
27.clearlooks2 .mceMiddle .mceLeft {left:0; width:5px; height:100%; background:url(img/vertical.gif) -5px 0}
28.clearlooks2 .mceMiddle span {top:23px; left:5px; width:100%; height:100%; background:#FFF}
29.clearlooks2 .mceMiddle .mceRight {right:0; width:5px; height:100%; background:url(img/vertical.gif)}
30
31/* Bottom */
32.clearlooks2 .mceBottom, .clearlooks2 .mceBottom div {height:6px}
33.clearlooks2 .mceBottom {left:0; bottom:0; width:100%}
34.clearlooks2 .mceBottom div {top:0}
35.clearlooks2 .mceBottom .mceLeft {left:0; width:5px; background:url(img/corners.gif) -34px -6px}
36.clearlooks2 .mceBottom .mceCenter {left:5px; width:100%; background:url(img/horizontal.gif) 0 -46px}
37.clearlooks2 .mceBottom .mceRight {right:0; width:5px; background: url(img/corners.gif) -34px 0}
38.clearlooks2 .mceBottom span {display:none}
39.clearlooks2 .mceStatusbar .mceBottom, .clearlooks2 .mceStatusbar .mceBottom div {height:23px}
40.clearlooks2 .mceStatusbar .mceBottom .mceLeft {background:url(img/corners.gif) -29px 0}
41.clearlooks2 .mceStatusbar .mceBottom .mceCenter {background:url(img/horizontal.gif) 0 -52px}
42.clearlooks2 .mceStatusbar .mceBottom .mceRight {background:url(img/corners.gif) -24px 0}
43.clearlooks2 .mceStatusbar .mceBottom span {display:block; left:7px; font-family:Arial, Verdana; font-size:11px; line-height:23px}
44
45/* Actions */
46.clearlooks2 a {width:29px; height:16px; top:3px;}
47.clearlooks2 .mceClose {right:6px; background:url(img/buttons.gif) -87px 0}
48.clearlooks2 .mceMin {display:none; right:68px; background:url(img/buttons.gif) 0 0}
49.clearlooks2 .mceMed {display:none; right:37px; background:url(img/buttons.gif) -29px 0}
50.clearlooks2 .mceMax {display:none; right:37px; background:url(img/buttons.gif) -58px 0}
51.clearlooks2 .mceMove {display:none;width:100%;cursor:move;background:url(img/corners.gif) no-repeat -100px -100px}
52.clearlooks2 .mceMovable .mceMove {display:block}
53.clearlooks2 .mceFocus .mceClose {right:6px; background:url(img/buttons.gif) -87px -16px}
54.clearlooks2 .mceFocus .mceMin {right:68px; background:url(img/buttons.gif) 0 -16px}
55.clearlooks2 .mceFocus .mceMed {right:37px; background:url(img/buttons.gif) -29px -16px}
56.clearlooks2 .mceFocus .mceMax {right:37px; background:url(img/buttons.gif) -58px -16px}
57.clearlooks2 .mceFocus .mceClose:hover {right:6px; background:url(img/buttons.gif) -87px -32px}
58.clearlooks2 .mceFocus .mceClose:hover {right:6px; background:url(img/buttons.gif) -87px -32px}
59.clearlooks2 .mceFocus .mceMin:hover {right:68px; background:url(img/buttons.gif) 0 -32px}
60.clearlooks2 .mceFocus .mceMed:hover {right:37px; background:url(img/buttons.gif) -29px -32px}
61.clearlooks2 .mceFocus .mceMax:hover {right:37px; background:url(img/buttons.gif) -58px -32px}
62
63/* Resize */
64.clearlooks2 .mceResize {top:auto; left:auto; display:none; width:5px; height:5px; background:url(img/horizontal.gif) no-repeat 0 -75px}
65.clearlooks2 .mceResizable .mceResize {display:block}
66.clearlooks2 .mceResizable .mceMin, .clearlooks2 .mceMax {display:none}
67.clearlooks2 .mceMinimizable .mceMin {display:block}
68.clearlooks2 .mceMaximizable .mceMax {display:block}
69.clearlooks2 .mceMaximized .mceMed {display:block}
70.clearlooks2 .mceMaximized .mceMax {display:none}
71.clearlooks2 a.mceResizeN {top:0; left:0; width:100%; cursor:n-resize}
72.clearlooks2 a.mceResizeNW {top:0; left:0; cursor:nw-resize}
73.clearlooks2 a.mceResizeNE {top:0; right:0; cursor:ne-resize}
74.clearlooks2 a.mceResizeW {top:0; left:0; height:100%; cursor:w-resize;}
75.clearlooks2 a.mceResizeE {top:0; right:0; height:100%; cursor:e-resize}
76.clearlooks2 a.mceResizeS {bottom:0; left:0; width:100%; cursor:s-resize}
77.clearlooks2 a.mceResizeSW {bottom:0; left:0; cursor:sw-resize}
78.clearlooks2 a.mceResizeSE {bottom:0; right:0; cursor:se-resize}
79
80/* Alert/Confirm */
81.clearlooks2 .mceButton {font-weight:bold; bottom:10px; width:80px; height:30px; background:url(img/button.gif); line-height:30px; vertical-align:middle; text-align:center; outline:0}
82.clearlooks2 .mceMiddle .mceIcon {left:15px; top:35px; width:32px; height:32px}
83.clearlooks2 .mceAlert .mceMiddle span, .clearlooks2 .mceConfirm .mceMiddle span {background:transparent;left:60px; top:35px; width:320px; height:50px; font-weight:bold; overflow:auto; white-space:normal}
84.clearlooks2 a:hover {font-weight:bold;}
85.clearlooks2 .mceAlert .mceMiddle, .clearlooks2 .mceConfirm .mceMiddle {background:#D6D7D5}
86.clearlooks2 .mceAlert .mceOk {left:50%; top:auto; margin-left: -40px}
87.clearlooks2 .mceAlert .mceIcon {background:url(img/alert.gif)}
88.clearlooks2 .mceConfirm .mceOk {left:50%; top:auto; margin-left: -90px}
89.clearlooks2 .mceConfirm .mceCancel {left:50%; top:auto}
90.clearlooks2 .mceConfirm .mceIcon {background:url(img/confirm.gif)} \ No newline at end of file
diff --git a/public/javascripts/tiny_mce/plugins/inlinepopups/template.htm b/public/javascripts/tiny_mce/plugins/inlinepopups/template.htm
new file mode 100755
index 0000000..f9ec642
--- /dev/null
+++ b/public/javascripts/tiny_mce/plugins/inlinepopups/template.htm
@@ -0,0 +1,387 @@
1<!-- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -->
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<title>Template for dialogs</title>
5<link rel="stylesheet" type="text/css" href="skins/clearlooks2/window.css" />
6</head>
7<body>
8
9<div class="mceEditor">
10 <div class="clearlooks2" style="width:400px; height:100px; left:10px;">
11 <div class="mceWrapper">
12 <div class="mceTop">
13 <div class="mceLeft"></div>
14 <div class="mceCenter"></div>
15 <div class="mceRight"></div>
16 <span>Blured</span>
17 </div>
18
19 <div class="mceMiddle">
20 <div class="mceLeft"></div>
21 <span>Content</span>
22 <div class="mceRight"></div>
23 </div>
24
25 <div class="mceBottom">
26 <div class="mceLeft"></div>
27 <div class="mceCenter"></div>
28 <div class="mceRight"></div>
29 <span>Statusbar text.</span>
30 </div>
31
32 <a class="mceMove" href="#"></a>
33 <a class="mceMin" href="#"></a>
34 <a class="mceMax" href="#"></a>
35 <a class="mceMed" href="#"></a>
36 <a class="mceClose" href="#"></a>
37 <a class="mceResize mceResizeN" href="#"></a>
38 <a class="mceResize mceResizeS" href="#"></a>
39 <a class="mceResize mceResizeW" href="#"></a>
40 <a class="mceResize mceResizeE" href="#"></a>
41 <a class="mceResize mceResizeNW" href="#"></a>
42 <a class="mceResize mceResizeNE" href="#"></a>
43 <a class="mceResize mceResizeSW" href="#"></a>
44 <a class="mceResize mceResizeSE" href="#"></a>
45 </div>
46 </div>
47
48 <div class="clearlooks2" style="width:400px; height:100px; left:420px;">
49 <div class="mceWrapper mceMovable mceFocus">
50 <div class="mceTop">
51 <div class="mceLeft"></div>
52 <div class="mceCenter"></div>
53 <div class="mceRight"></div>
54 <span>Focused</span>
55 </div>
56
57 <div class="mceMiddle">
58 <div class="mceLeft"></div>
59 <span>Content</span>
60 <div class="mceRight"></div>
61 </div>
62
63 <div class="mceBottom">
64 <div class="mceLeft"></div>
65 <div class="mceCenter"></div>
66 <div class="mceRight"></div>
67 <span>Statusbar text.</span>
68 </div>
69
70 <a class="mceMove" href="#"></a>
71 <a class="mceMin" href="#"></a>
72 <a class="mceMax" href="#"></a>
73 <a class="mceMed" href="#"></a>
74 <a class="mceClose" href="#"></a>
75 <a class="mceResize mceResizeN" href="#"></a>
76 <a class="mceResize mceResizeS" href="#"></a>
77 <a class="mceResize mceResizeW" href="#"></a>
78 <a class="mceResize mceResizeE" href="#"></a>
79 <a class="mceResize mceResizeNW" href="#"></a>
80 <a class="mceResize mceResizeNE" href="#"></a>
81 <a class="mceResize mceResizeSW" href="#"></a>
82 <a class="mceResize mceResizeSE" href="#"></a>
83 </div>
84 </div>
85
86 <div class="clearlooks2" style="width:400px; height:100px; left:10px; top:120px;">
87 <div class="mceWrapper mceMovable mceFocus mceStatusbar">
88 <div class="mceTop">
89 <div class="mceLeft"></div>
90 <div class="mceCenter"></div>
91 <div class="mceRight"></div>
92 <span>Statusbar</span>
93 </div>
94
95 <div class="mceMiddle">
96 <div class="mceLeft"></div>
97 <span>Content</span>
98 <div class="mceRight"></div>
99 </div>
100
101 <div class="mceBottom">
102 <div class="mceLeft"></div>
103 <div class="mceCenter"></div>
104 <div class="mceRight"></div>
105 <span>Statusbar text.</span>
106 </div>
107
108 <a class="mceMove" href="#"></a>
109 <a class="mceMin" href="#"></a>
110 <a class="mceMax" href="#"></a>
111 <a class="mceMed" href="#"></a>
112 <a class="mceClose" href="#"></a>
113 <a class="mceResize mceResizeN" href="#"></a>
114 <a class="mceResize mceResizeS" href="#"></a>
115 <a class="mceResize mceResizeW" href="#"></a>
116 <a class="mceResize mceResizeE" href="#"></a>
117 <a class="mceResize mceResizeNW" href="#"></a>
118 <a class="mceResize mceResizeNE" href="#"></a>
119 <a class="mceResize mceResizeSW" href="#"></a>
120 <a class="mceResize mceResizeSE" href="#"></a>
121 </div>
122 </div>
123
124 <div class="clearlooks2" style="width:400px; height:100px; left:420px; top:120px;">
125 <div class="mceWrapper mceMovable mceFocus mceStatusbar mceResizable">
126 <div class="mceTop">
127 <div class="mceLeft"></div>
128 <div class="mceCenter"></div>
129 <div class="mceRight"></div>
130 <span>Statusbar, Resizable</span>
131 </div>
132
133 <div class="mceMiddle">
134 <div class="mceLeft"></div>
135 <span>Content</span>
136 <div class="mceRight"></div>
137 </div>
138
139 <div class="mceBottom">
140 <div class="mceLeft"></div>
141 <div class="mceCenter"></div>
142 <div class="mceRight"></div>
143 <span>Statusbar text.</span>
144 </div>
145
146 <a class="mceMove" href="#"></a>
147 <a class="mceMin" href="#"></a>
148 <a class="mceMax" href="#"></a>
149 <a class="mceMed" href="#"></a>
150 <a class="mceClose" href="#"></a>
151 <a class="mceResize mceResizeN" href="#"></a>
152 <a class="mceResize mceResizeS" href="#"></a>
153 <a class="mceResize mceResizeW" href="#"></a>
154 <a class="mceResize mceResizeE" href="#"></a>
155 <a class="mceResize mceResizeNW" href="#"></a>
156 <a class="mceResize mceResizeNE" href="#"></a>
157 <a class="mceResize mceResizeSW" href="#"></a>
158 <a class="mceResize mceResizeSE" href="#"></a>
159 </div>
160 </div>
161
162 <div class="clearlooks2" style="width:400px; height:100px; left:10px; top:230px;">
163 <div class="mceWrapper mceMovable mceFocus mceResizable mceMaximizable">
164 <div class="mceTop">
165 <div class="mceLeft"></div>
166 <div class="mceCenter"></div>
167 <div class="mceRight"></div>
168 <span>Resizable, Maximizable</span>
169 </div>
170
171 <div class="mceMiddle">
172 <div class="mceLeft"></div>
173 <span>Content</span>
174 <div class="mceRight"></div>
175 </div>
176
177 <div class="mceBottom">
178 <div class="mceLeft"></div>
179 <div class="mceCenter"></div>
180 <div class="mceRight"></div>
181 <span>Statusbar text.</span>
182 </div>
183
184 <a class="mceMove" href="#"></a>
185 <a class="mceMin" href="#"></a>
186 <a class="mceMax" href="#"></a>
187 <a class="mceMed" href="#"></a>
188 <a class="mceClose" href="#"></a>
189 <a class="mceResize mceResizeN" href="#"></a>
190 <a class="mceResize mceResizeS" href="#"></a>
191 <a class="mceResize mceResizeW" href="#"></a>
192 <a class="mceResize mceResizeE" href="#"></a>
193 <a class="mceResize mceResizeNW" href="#"></a>
194 <a class="mceResize mceResizeNE" href="#"></a>
195 <a class="mceResize mceResizeSW" href="#"></a>
196 <a class="mceResize mceResizeSE" href="#"></a>
197 </div>
198 </div>
199
200 <div class="clearlooks2" style="width:400px; height:100px; left:420px; top:230px;">
201 <div class="mceWrapper mceMovable mceStatusbar mceResizable mceMaximizable">
202 <div class="mceTop">
203 <div class="mceLeft"></div>
204 <div class="mceCenter"></div>
205 <div class="mceRight"></div>
206 <span>Blurred, Maximizable, Statusbar, Resizable</span>
207 </div>
208
209 <div class="mceMiddle">
210 <div class="mceLeft"></div>
211 <span>Content</span>
212 <div class="mceRight"></div>
213 </div>
214
215 <div class="mceBottom">
216 <div class="mceLeft"></div>
217 <div class="mceCenter"></div>
218 <div class="mceRight"></div>
219 <span>Statusbar text.</span>
220 </div>
221
222 <a class="mceMove" href="#"></a>
223 <a class="mceMin" href="#"></a>
224 <a class="mceMax" href="#"></a>
225 <a class="mceMed" href="#"></a>
226 <a class="mceClose" href="#"></a>
227 <a class="mceResize mceResizeN" href="#"></a>
228 <a class="mceResize mceResizeS" href="#"></a>
229 <a class="mceResize mceResizeW" href="#"></a>
230 <a class="mceResize mceResizeE" href="#"></a>
231 <a class="mceResize mceResizeNW" href="#"></a>
232 <a class="mceResize mceResizeNE" href="#"></a>
233 <a class="mceResize mceResizeSW" href="#"></a>
234 <a class="mceResize mceResizeSE" href="#"></a>
235 </div>
236 </div>
237
238 <div class="clearlooks2" style="width:400px; height:100px; left:10px; top:340px;">
239 <div class="mceWrapper mceMovable mceFocus mceResizable mceMaximized mceMinimizable mceMaximizable">
240 <div class="mceTop">
241 <div class="mceLeft"></div>
242 <div class="mceCenter"></div>
243 <div class="mceRight"></div>
244 <span>Maximized, Maximizable, Minimizable</span>
245 </div>
246
247 <div class="mceMiddle">
248 <div class="mceLeft"></div>
249 <span>Content</span>
250 <div class="mceRight"></div>
251 </div>
252
253 <div class="mceBottom">
254 <div class="mceLeft"></div>
255 <div class="mceCenter"></div>
256 <div class="mceRight"></div>
257 <span>Statusbar text.</span>
258 </div>
259
260 <a class="mceMove" href="#"></a>
261 <a class="mceMin" href="#"></a>
262 <a class="mceMax" href="#"></a>
263 <a class="mceMed" href="#"></a>
264 <a class="mceClose" href="#"></a>
265 <a class="mceResize mceResizeN" href="#"></a>
266 <a class="mceResize mceResizeS" href="#"></a>
267 <a class="mceResize mceResizeW" href="#"></a>
268 <a class="mceResize mceResizeE" href="#"></a>
269 <a class="mceResize mceResizeNW" href="#"></a>
270 <a class="mceResize mceResizeNE" href="#"></a>
271 <a class="mceResize mceResizeSW" href="#"></a>
272 <a class="mceResize mceResizeSE" href="#"></a>
273 </div>
274 </div>
275
276 <div class="clearlooks2" style="width:400px; height:100px; left:420px; top:340px;">
277 <div class="mceWrapper mceMovable mceStatusbar mceResizable mceMaximized mceMinimizable mceMaximizable">
278 <div class="mceTop">
279 <div class="mceLeft"></div>
280 <div class="mceCenter"></div>
281 <div class="mceRight"></div>
282 <span>Blured</span>
283 </div>
284
285 <div class="mceMiddle">
286 <div class="mceLeft"></div>
287 <span>Content</span>
288 <div class="mceRight"></div>
289 </div>
290
291 <div class="mceBottom">
292 <div class="mceLeft"></div>
293 <div class="mceCenter"></div>
294 <div class="mceRight"></div>
295 <span>Statusbar text.</span>
296 </div>
297
298 <a class="mceMove" href="#"></a>
299 <a class="mceMin" href="#"></a>
300 <a class="mceMax" href="#"></a>
301 <a class="mceMed" href="#"></a>
302 <a class="mceClose" href="#"></a>
303 <a class="mceResize mceResizeN" href="#"></a>
304 <a class="mceResize mceResizeS" href="#"></a>
305 <a class="mceResize mceResizeW" href="#"></a>
306 <a class="mceResize mceResizeE" href="#"></a>
307 <a class="mceResize mceResizeNW" href="#"></a>
308 <a class="mceResize mceResizeNE" href="#"></a>
309 <a class="mceResize mceResizeSW" href="#"></a>
310 <a class="mceResize mceResizeSE" href="#"></a>
311 </div>
312 </div>
313
314 <div class="clearlooks2" style="width:400px; height:130px; left:10px; top:450px;">
315 <div class="mceWrapper mceMovable mceFocus mceModal mceAlert">
316 <div class="mceTop">
317 <div class="mceLeft"></div>
318 <div class="mceCenter"></div>
319 <div class="mceRight"></div>
320 <span>Alert</span>
321 </div>
322
323 <div class="mceMiddle">
324 <div class="mceLeft"></div>
325 <span>
326 This is a very long error message. This is a very long error message.
327 This is a very long error message. This is a very long error message.
328 This is a very long error message. This is a very long error message.
329 This is a very long error message. This is a very long error message.
330 This is a very long error message. This is a very long error message.
331 This is a very long error message. This is a very long error message.
332 </span>
333 <div class="mceRight"></div>
334 <div class="mceIcon"></div>
335 </div>
336
337 <div class="mceBottom">
338 <div class="mceLeft"></div>
339 <div class="mceCenter"></div>
340 <div class="mceRight"></div>
341 </div>
342
343 <a class="mceMove" href="#"></a>
344 <a class="mceButton mceOk" href="#">Ok</a>
345 <a class="mceClose" href="#"></a>
346 </div>
347 </div>
348
349 <div class="clearlooks2" style="width:400px; height:130px; left:420px; top:450px;">
350 <div class="mceWrapper mceMovable mceFocus mceModal mceConfirm">
351 <div class="mceTop">
352 <div class="mceLeft"></div>
353 <div class="mceCenter"></div>
354 <div class="mceRight"></div>
355 <span>Confirm</span>
356 </div>
357
358 <div class="mceMiddle">
359 <div class="mceLeft"></div>
360 <span>
361 This is a very long error message. This is a very long error message.
362 This is a very long error message. This is a very long error message.
363 This is a very long error message. This is a very long error message.
364 This is a very long error message. This is a very long error message.
365 This is a very long error message. This is a very long error message.
366 This is a very long error message. This is a very long error message.
367 </span>
368 <div class="mceRight"></div>
369 <div class="mceIcon"></div>
370 </div>
371
372 <div class="mceBottom">
373 <div class="mceLeft"></div>
374 <div class="mceCenter"></div>
375 <div class="mceRight"></div>
376 </div>
377
378 <a class="mceMove" href="#"></a>
379 <a class="mceButton mceOk" href="#">Ok</a>
380 <a class="mceButton mceCancel" href="#">Cancel</a>
381 <a class="mceClose" href="#"></a>
382 </div>
383 </div>
384</div>
385
386</body>
387</html>