diff --git a/controllers/contact_categories_controller.php b/controllers/contact_categories_controller.php new file mode 100644 index 00000000..5e4b7f2e --- /dev/null +++ b/controllers/contact_categories_controller.php @@ -0,0 +1,53 @@ +ContactCategory->recursive = 0; + $this->set('contactCategories', $this->paginate()); + } + + function view($id = null) { + if (!$id) { + $this->Session->setFlash(__('Invalid ContactCategory.', true)); + $this->redirect(array('action'=>'index')); + } + $this->set('contactCategory', $this->ContactCategory->read(null, $id)); + } + + function add() { + if (!empty($this->data)) { + $this->ContactCategory->create(); + if ($this->ContactCategory->save($this->data)) { + $this->Session->setFlash(__('The ContactCategory has been saved', true)); + $this->redirect(array('action'=>'index')); + } else { + $this->Session->setFlash(__('The ContactCategory could not be saved. Please, try again.', true)); + } + } + } + + function edit($id = null) { + if (!$id && empty($this->data)) { + $this->Session->setFlash(__('Invalid ContactCategory', true)); + $this->redirect(array('action'=>'index')); + } + if (!empty($this->data)) { + if ($this->ContactCategory->save($this->data)) { + $this->Session->setFlash(__('The ContactCategory has been saved', true)); + $this->redirect(array('action'=>'index')); + } else { + $this->Session->setFlash(__('The ContactCategory could not be saved. Please, try again.', true)); + } + } + if (empty($this->data)) { + $this->data = $this->ContactCategory->read(null, $id); + } + } + + + +} +?> diff --git a/controllers/principle_addresses_controller.php b/controllers/principle_addresses_controller.php new file mode 100644 index 00000000..b5d517e4 --- /dev/null +++ b/controllers/principle_addresses_controller.php @@ -0,0 +1,79 @@ +PrincipleAddress->recursive = 0; + $this->set('principleAddresses', $this->paginate()); + } + + function view($id = null) { + if (!$id) { + $this->Session->setFlash(__('Invalid PrincipleAddress.', true)); + $this->redirect(array('action'=>'index')); + } + $this->set('principleAddress', $this->PrincipleAddress->read(null, $id)); + } + + function add($principleid = null) { + + if(isset($this->params['named']['principleid'])) { + $principleid = $this->params['named']['principleid']; + } + if (!$principleid && empty($this->data)) { + $this->Session->setFlash(__('Invalid Principle ID', true)); + $this->redirect(array('controller'=>'Principles', 'action'=>'index')); + } + + if (!empty($this->data)) { + $this->PrincipleAddress->create(); + if ($this->PrincipleAddress->save($this->data)) { + $principleid = $this->data['PrincipleAddress']['principle_id']; + $this->Session->setFlash(__('The Principle Address has been saved', true)); + $this->redirect(array('controller' => 'Principles', 'action'=>'view/'.$principleid)); + } else { + $this->Session->setFlash(__('The Principle Address could not be saved. Please, try again.', true)); + } + } + $principle = $this->PrincipleAddress->Principle->findById($principleid); + $countries = $this->PrincipleAddress->Country->find('list'); + $this->set(compact('principle', 'countries')); + } + + function edit($id = null) { + if (!$id && empty($this->data)) { + $this->Session->setFlash(__('Invalid Principle Address', true)); + $this->redirect(array('action'=>'index')); + } + if (!empty($this->data)) { + if ($this->PrincipleAddress->save($this->data)) { + $principleid = $this->data['PrincipleAddress']['principle_id']; + $this->Session->setFlash(__('The Principle Address has been saved', true)); + $this->redirect(array('controller' => 'Principles', 'action'=>'view/'.$principleid)); + } else { + $this->Session->setFlash(__('The Principle Address could not be saved. Please, try again.', true)); + } + } + if (empty($this->data)) { + $this->data = $this->PrincipleAddress->read(null, $id); + } + $principle = $this->PrincipleAddress->Principle->findById($id); + $countries = $this->PrincipleAddress->Country->find('list'); + $this->set(compact('principle','countries')); + } + + function delete($id = null) { + if (!$id) { + $this->Session->setFlash(__('Invalid id for PrincipleAddress', true)); + $this->redirect(array('action'=>'index')); + } + if ($this->PrincipleAddress->del($id)) { + $this->Session->setFlash(__('PrincipleAddress deleted', true)); + $this->redirect(array('action'=>'index')); + } + } + +} +?> diff --git a/controllers/principle_contacts_controller.php b/controllers/principle_contacts_controller.php new file mode 100644 index 00000000..a79347b8 --- /dev/null +++ b/controllers/principle_contacts_controller.php @@ -0,0 +1,78 @@ +PrincipleContact->recursive = 0; + $this->set('principleContacts', $this->paginate()); + } + + function view($id = null) { + if (!$id) { + $this->Session->setFlash(__('Invalid PrincipleContact.', true)); + $this->redirect(array('action'=>'index')); + } + $this->set('principleContact', $this->PrincipleContact->read(null, $id)); + } + + function add() { + + if(isset($this->params['named']['principleid'])) { + $principleid = $this->params['named']['principleid']; + } + + if (!(isset($principleid)) && empty($this->data)) { + $this->Session->setFlash(__('Invalid Principle ID', true)); + $this->redirect(array('controller'=>'Principles', 'action'=>'index')); + } + + + if (!empty($this->data)) { + $this->PrincipleContact->create(); + if ($this->PrincipleContact->save($this->data)) { + $this->Session->setFlash(__('The PrincipleContact has been saved', true)); + $principleid = $this->data['PrincipleContact']['principle_id']; + $this->redirect(array('controller'=>'Principles', 'action'=>'index')); + } else { + $this->Session->setFlash(__('The PrincipleContact could not be saved. Please, try again.', true)); + } + } + $principle = $this->PrincipleContact->Principle->findById($principleid); + $this->set(compact('principle')); + } + + function edit($id = null) { + if (!$id && empty($this->data)) { + $this->Session->setFlash(__('Invalid PrincipleContact', true)); + $this->redirect(array('action'=>'index')); + } + if (!empty($this->data)) { + if ($this->PrincipleContact->save($this->data)) { + $this->Session->setFlash(__('The PrincipleContact has been saved', true)); + $this->redirect(array('action'=>'index')); + } else { + $this->Session->setFlash(__('The PrincipleContact could not be saved. Please, try again.', true)); + } + } + if (empty($this->data)) { + $this->data = $this->PrincipleContact->read(null, $id); + } + $principles = $this->PrincipleContact->Principle->find('list'); + $this->set(compact('principles')); + } + + function delete($id = null) { + if (!$id) { + $this->Session->setFlash(__('Invalid id for PrincipleContact', true)); + $this->redirect(array('action'=>'index')); + } + if ($this->PrincipleContact->del($id)) { + $this->Session->setFlash(__('PrincipleContact deleted', true)); + $this->redirect(array('action'=>'index')); + } + } + +} +?> diff --git a/models/contact_category.php b/models/contact_category.php new file mode 100644 index 00000000..80dbf0e4 --- /dev/null +++ b/models/contact_category.php @@ -0,0 +1,13 @@ +array('className'=>'Contact', + 'foreignKey'=>'contact_category_id')); + + + +} + +?> diff --git a/models/principle_address.php b/models/principle_address.php new file mode 100644 index 00000000..04e98042 --- /dev/null +++ b/models/principle_address.php @@ -0,0 +1,23 @@ + array('className' => 'Principle', + 'foreignKey' => 'principle_id', + 'conditions' => '', + 'fields' => '', + 'order' => '' + ), + + 'Country' => array('className' => 'Country', + 'foreignKey' => 'country_id', + 'conditions' => '', + 'fields' => '', + 'order' => '')); + + + +} diff --git a/models/principle_contact.php b/models/principle_contact.php new file mode 100644 index 00000000..1c4ac1fa --- /dev/null +++ b/models/principle_contact.php @@ -0,0 +1,17 @@ + array('className' => 'Principle', + 'foreignKey' => 'principle_id', + 'conditions' => '', + 'fields' => '', + 'order' => '' + ) + ); + +} +?> \ No newline at end of file diff --git a/views/contact_categories/add.ctp b/views/contact_categories/add.ctp new file mode 100644 index 00000000..6d1dbc94 --- /dev/null +++ b/views/contact_categories/add.ctp @@ -0,0 +1,17 @@ +
+counter(array( +'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true) +)); +?>
+| sort('id');?> | +sort('name');?> | ++ |
|---|---|---|
| + + | ++ + | ++ link(__('View', true), array('action'=>'view', $contactCategory['ContactCategory']['id'])); ?> + link(__('Edit', true), array('action'=>'edit', $contactCategory['ContactCategory']['id'])); ?> + link(__('Delete', true), array('action'=>'delete', $contactCategory['ContactCategory']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $contactCategory['ContactCategory']['id'])); ?> + | +
| + | + | + | + | + | + |
|---|---|---|---|---|---|
| + | + | + | link(__($address['Country']['name'], true), array('controller'=>'countries', 'action' => 'view', $address['Country']['id']));?> | ++ | + link(__('View', true), array('controller'=> 'principle_addresses', 'action'=>'view', $address['PrincipleAddress']['id'])); ?> + link(__('Edit', true), array('controller'=> 'principle_addresses', 'action'=>'edit', $address['PrincipleAddress']['id'])); ?> + + | +
| + | + | + | + | + | + | + |
|---|---|---|---|---|---|---|
| + + | ++ + | ++ + | ++ + | ++ + | ++ + | ++ link(__('View', true), array('controller' => 'principle_contacts', 'action'=>'view', $principleContact['PrincipleContact']['id'])); ?> + link(__('Edit', true), array('controller' => 'principle_contacts', 'action'=>'edit', $principleContact['PrincipleContact']['id'])); ?> + + | +
+counter(array( +'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true) +)); +?>
+| sort('id');?> | +sort('address');?> | +sort('city');?> | +sort('state');?> | +sort('country_id');?> | +sort('principle_id');?> | +sort('type');?> | +sort('postcode');?> | ++ |
|---|---|---|---|---|---|---|---|---|
| + + | ++ + | ++ + | ++ + | ++ link($principleAddress['Country']['name'], array('controller'=> 'countries', 'action'=>'view', $principleAddress['Country']['id'])); ?> + | ++ + | ++ + | ++ + | ++ link(__('View', true), array('action'=>'view', $principleAddress['PrincipleAddress']['id'])); ?> + link(__('Edit', true), array('action'=>'edit', $principleAddress['PrincipleAddress']['id'])); ?> + link(__('Delete', true), array('action'=>'delete', $principleAddress['PrincipleAddress']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $principleAddress['PrincipleAddress']['id'])); ?> + | +
+counter(array( +'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true) +)); +?>
+| sort('first_name');?> | +sort('last_name');?> | +sort('job_title');?> | +sort('email');?> | +sort('phone');?> | +sort('fax');?> | +sort('notes');?> | ++ |
|---|---|---|---|---|---|---|---|
| + + | ++ + | ++ + | ++ + | ++ + | ++ + | ++ + | ++ link(__('View', true), array('action'=>'view', $principleContact['PrincipleContact']['id'])); ?> + link(__('Edit', true), array('action'=>'edit', $principleContact['PrincipleContact']['id'])); ?> + link(__('Delete', true), array('action'=>'delete', $principleContact['PrincipleContact']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $principleContact['PrincipleContact']['id'])); ?> + | +
]*>/gi,"[quote]");rep(/<\/blockquote>/gi,"[/quote]");rep(/
/gi,"\n");rep(/
/gi,"\n");rep(/
/gi,"\n");rep(//gi,"");rep(/<\/p>/gi,"\n");rep(/ /gi," ");rep(/"/gi,"\"");rep(/</gi,"<");rep(/>/gi,">");rep(/&/gi,"&");return s;},_punbb_bbcode2html:function(s){s=tinymce.trim(s);function rep(re,str){s=s.replace(re,str);};rep(/\n/gi,"
");rep(/\[b\]/gi,"");rep(/\[\/b\]/gi,"");rep(/\[i\]/gi,"");rep(/\[\/i\]/gi,"");rep(/\[u\]/gi,"");rep(/\[\/u\]/gi,"");rep(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,"$2");rep(/\[url\](.*?)\[\/url\]/gi,"$1");rep(/\[img\](.*?)\[\/img\]/gi,"");rep(/\[color=(.*?)\](.*?)\[\/color\]/gi,"$2");rep(/\[code\](.*?)\[\/code\]/gi,"$1 ");rep(/\[quote.*?\](.*?)\[\/quote\]/gi,"$1 ");return s;}});tinymce.PluginManager.add('bbcode',tinymce.plugins.BBCodePlugin);})(); \ No newline at end of file diff --git a/webroot/js/tiny_mce/plugins/bbcode/editor_plugin_src.js b/webroot/js/tiny_mce/plugins/bbcode/editor_plugin_src.js new file mode 100644 index 00000000..1d7493e2 --- /dev/null +++ b/webroot/js/tiny_mce/plugins/bbcode/editor_plugin_src.js @@ -0,0 +1,117 @@ +/** + * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + */ + +(function() { + tinymce.create('tinymce.plugins.BBCodePlugin', { + init : function(ed, url) { + var t = this, dialect = ed.getParam('bbcode_dialect', 'punbb').toLowerCase(); + + ed.onBeforeSetContent.add(function(ed, o) { + o.content = t['_' + dialect + '_bbcode2html'](o.content); + }); + + ed.onPostProcess.add(function(ed, o) { + if (o.set) + o.content = t['_' + dialect + '_bbcode2html'](o.content); + + if (o.get) + o.content = t['_' + dialect + '_html2bbcode'](o.content); + }); + }, + + getInfo : function() { + return { + longname : 'BBCode Plugin', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/bbcode', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + // Private methods + + // HTML -> BBCode in PunBB dialect + _punbb_html2bbcode : function(s) { + s = tinymce.trim(s); + + function rep(re, str) { + s = s.replace(re, str); + }; + + // example: to [b] + rep(/
(.*?)<\/a>/gi,"[url=$1]$2[/url]"); + rep(/ (.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"); + rep(/ (.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"); + rep(/ (.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"); + rep(/ (.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"); + rep(/(.*?)<\/span>/gi,"[color=$1]$2[/color]"); + rep(/ (.*?)<\/font>/gi,"[color=$1]$2[/color]"); + rep(/(.*?)<\/span>/gi,"[size=$1]$2[/size]"); + rep(/(.*?)<\/font>/gi,"$1"); + rep(/ /gi,"[img]$1[/img]"); + rep(/(.*?)<\/span>/gi,"[code]$1[/code]"); + rep(/(.*?)<\/span>/gi,"[quote]$1[/quote]"); + rep(/(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]"); + rep(/(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]"); + rep(/(.*?)<\/em>/gi,"[code][i]$1[/i][/code]"); + rep(/(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]"); + rep(/(.*?)<\/u>/gi,"[code][u]$1[/u][/code]"); + rep(/(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]"); + rep(/<\/(strong|b)>/gi,"[/b]"); + rep(/<(strong|b)>/gi,"[b]"); + rep(/<\/(em|i)>/gi,"[/i]"); + rep(/<(em|i)>/gi,"[i]"); + rep(/<\/u>/gi,"[/u]"); + rep(/(.*?)<\/span>/gi,"[u]$1[/u]"); + rep(//gi,"[u]"); + rep(/ ]*>/gi,"[quote]"); + rep(/<\/blockquote>/gi,"[/quote]"); + rep(/
/gi,"\n"); + rep(/
/gi,"\n"); + rep(/
/gi,"\n"); + rep(//gi,""); + rep(/<\/p>/gi,"\n"); + rep(/ /gi," "); + rep(/"/gi,"\""); + rep(/</gi,"<"); + rep(/>/gi,">"); + rep(/&/gi,"&"); + + return s; + }, + + // BBCode -> HTML from PunBB dialect + _punbb_bbcode2html : function(s) { + s = tinymce.trim(s); + + function rep(re, str) { + s = s.replace(re, str); + }; + + // example: [b] to + rep(/\n/gi,"
"); + rep(/\[b\]/gi,""); + rep(/\[\/b\]/gi,""); + rep(/\[i\]/gi,""); + rep(/\[\/i\]/gi,""); + rep(/\[u\]/gi,""); + rep(/\[\/u\]/gi,""); + rep(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,"$2"); + rep(/\[url\](.*?)\[\/url\]/gi,"$1"); + rep(/\[img\](.*?)\[\/img\]/gi,""); + rep(/\[color=(.*?)\](.*?)\[\/color\]/gi,"$2"); + rep(/\[code\](.*?)\[\/code\]/gi,"$1 "); + rep(/\[quote.*?\](.*?)\[\/quote\]/gi,"$1 "); + + return s; + } + }); + + // Register plugin + tinymce.PluginManager.add('bbcode', tinymce.plugins.BBCodePlugin); +})(); \ No newline at end of file diff --git a/webroot/js/tiny_mce/plugins/compat2x/editor_plugin.js b/webroot/js/tiny_mce/plugins/compat2x/editor_plugin.js new file mode 100644 index 00000000..02a1da8b --- /dev/null +++ b/webroot/js/tiny_mce/plugins/compat2x/editor_plugin.js @@ -0,0 +1 @@ +(function(){var DOM=tinymce.DOM,Event=tinymce.dom.Event,each=tinymce.each,is=tinymce.is;tinymce.create('tinymce.plugins.Compat2x',{getInfo:function(){return{longname:'Compat2x',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/compat2x',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};}});(function(){tinymce.extend(tinyMCE,{addToLang:function(p,l){each(l,function(v,k){tinyMCE.i18n[(tinyMCE.settings.language||'en')+'.'+(p?p+'_':'')+k]=v;});},getInstanceById:function(n){return this.get(n);}});})();(function(){var EditorManager=tinymce.EditorManager;tinyMCE.instances={};tinyMCE.plugins={};tinymce.PluginManager.onAdd.add(function(pm,n,p){tinyMCE.plugins[n]=p;});tinyMCE.majorVersion=tinymce.majorVersion;tinyMCE.minorVersion=tinymce.minorVersion;tinyMCE.releaseDate=tinymce.releaseDate;tinyMCE.baseURL=tinymce.baseURL;tinyMCE.isIE=tinyMCE.isMSIE=tinymce.isIE||tinymce.isOpera;tinyMCE.isMSIE5=tinymce.isIE;tinyMCE.isMSIE5_0=tinymce.isIE;tinyMCE.isMSIE7=tinymce.isIE;tinyMCE.isGecko=tinymce.isGecko;tinyMCE.isSafari=tinymce.isWebKit;tinyMCE.isOpera=tinymce.isOpera;tinyMCE.isMac=false;tinyMCE.isNS7=false;tinyMCE.isNS71=false;tinyMCE.compat=true;TinyMCE_Engine=tinyMCE;tinymce.extend(tinyMCE,{getParam:function(n,dv){return this.activeEditor.getParam(n,dv);},addEvent:function(e,na,f,sc){tinymce.dom.Event.add(e,na,f,sc||this);},getControlHTML:function(n){return EditorManager.activeEditor.controlManager.createControl(n);},loadCSS:function(u){tinymce.DOM.loadCSS(u);},importCSS:function(doc,u){if(doc==document)this.loadCSS(u);else new tinymce.dom.DOMUtils(doc).loadCSS(u);},log:function(){console.debug.apply(console,arguments);},getLang:function(n,dv){var v=EditorManager.activeEditor.getLang(n.replace(/^lang_/g,''),dv);if(/^[0-9\-.]+$/g.test(v))return parseInt(v);return v;},isInstance:function(o){return o!=null&&typeof(o)=="object"&&o.execCommand;},triggerNodeChange:function(){EditorManager.activeEditor.nodeChanged();},regexpReplace:function(in_str,reg_exp,replace_str,opts){var re;if(in_str==null)return in_str;if(typeof(opts)=="undefined")opts='g';re=new RegExp(reg_exp,opts);return in_str.replace(re,replace_str);},trim:function(s){return tinymce.trim(s);},xmlEncode:function(s){return tinymce.DOM.encode(s);},explode:function(s,d){var o=[];tinymce.each(s.split(d),function(v){if(v!='')o.push(v);});return o;},switchClass:function(id,cls){var b;if(/^mceButton/.test(cls)){b=EditorManager.activeEditor.controlManager.get(id);if(!b)return;switch(cls){case"mceButtonNormal":b.setDisabled(false);b.setActive(false);return;case"mceButtonDisabled":b.setDisabled(true);return;case"mceButtonSelected":b.setActive(true);b.setDisabled(false);return;}}},addCSSClass:function(e,n,b){return tinymce.DOM.addClass(e,n,b);},hasCSSClass:function(e,n){return tinymce.DOM.hasClass(e,n);},removeCSSClass:function(e,n){return tinymce.DOM.removeClass(e,n);},getCSSClasses:function(){var cl=EditorManager.activeEditor.dom.getClasses(),o=[];each(cl,function(c){o.push(c['class']);});return o;},setWindowArg:function(n,v){EditorManager.activeEditor.windowManager.params[n]=v;},getWindowArg:function(n,dv){var wm=EditorManager.activeEditor.windowManager,v;v=wm.getParam(n);if(v==='')return'';return v||wm.getFeature(n)||dv;},getParentNode:function(n,f){return this._getDOM().getParent(n,f);},selectElements:function(n,na,f){var i,a=[],nl,x;for(x=0,na=na.split(',');x
+ + + {#emotions_dlg.title} + + ++ + + + + diff --git a/webroot/js/tiny_mce/plugins/emotions/img/smiley-cool.gif b/webroot/js/tiny_mce/plugins/emotions/img/smiley-cool.gif new file mode 100644 index 00000000..ba90cc36 Binary files /dev/null and b/webroot/js/tiny_mce/plugins/emotions/img/smiley-cool.gif differ diff --git a/webroot/js/tiny_mce/plugins/emotions/img/smiley-cry.gif b/webroot/js/tiny_mce/plugins/emotions/img/smiley-cry.gif new file mode 100644 index 00000000..74d897a4 Binary files /dev/null and b/webroot/js/tiny_mce/plugins/emotions/img/smiley-cry.gif differ diff --git a/webroot/js/tiny_mce/plugins/emotions/img/smiley-embarassed.gif b/webroot/js/tiny_mce/plugins/emotions/img/smiley-embarassed.gif new file mode 100644 index 00000000..963a96b8 Binary files /dev/null and b/webroot/js/tiny_mce/plugins/emotions/img/smiley-embarassed.gif differ diff --git a/webroot/js/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif b/webroot/js/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif new file mode 100644 index 00000000..16f68cc1 Binary files /dev/null and b/webroot/js/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif differ diff --git a/webroot/js/tiny_mce/plugins/emotions/img/smiley-frown.gif b/webroot/js/tiny_mce/plugins/emotions/img/smiley-frown.gif new file mode 100644 index 00000000..716f55e1 Binary files /dev/null and b/webroot/js/tiny_mce/plugins/emotions/img/smiley-frown.gif differ diff --git a/webroot/js/tiny_mce/plugins/emotions/img/smiley-innocent.gif b/webroot/js/tiny_mce/plugins/emotions/img/smiley-innocent.gif new file mode 100644 index 00000000..334d49e0 Binary files /dev/null and b/webroot/js/tiny_mce/plugins/emotions/img/smiley-innocent.gif differ diff --git a/webroot/js/tiny_mce/plugins/emotions/img/smiley-kiss.gif b/webroot/js/tiny_mce/plugins/emotions/img/smiley-kiss.gif new file mode 100644 index 00000000..4efd549e Binary files /dev/null and b/webroot/js/tiny_mce/plugins/emotions/img/smiley-kiss.gif differ diff --git a/webroot/js/tiny_mce/plugins/emotions/img/smiley-laughing.gif b/webroot/js/tiny_mce/plugins/emotions/img/smiley-laughing.gif new file mode 100644 index 00000000..1606c119 Binary files /dev/null and b/webroot/js/tiny_mce/plugins/emotions/img/smiley-laughing.gif differ diff --git a/webroot/js/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif b/webroot/js/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif new file mode 100644 index 00000000..ca2451e1 Binary files /dev/null and b/webroot/js/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif differ diff --git a/webroot/js/tiny_mce/plugins/emotions/img/smiley-sealed.gif b/webroot/js/tiny_mce/plugins/emotions/img/smiley-sealed.gif new file mode 100644 index 00000000..b33d3cca Binary files /dev/null and b/webroot/js/tiny_mce/plugins/emotions/img/smiley-sealed.gif differ diff --git a/webroot/js/tiny_mce/plugins/emotions/img/smiley-smile.gif b/webroot/js/tiny_mce/plugins/emotions/img/smiley-smile.gif new file mode 100644 index 00000000..e6a9e60d Binary files /dev/null and b/webroot/js/tiny_mce/plugins/emotions/img/smiley-smile.gif differ diff --git a/webroot/js/tiny_mce/plugins/emotions/img/smiley-surprised.gif b/webroot/js/tiny_mce/plugins/emotions/img/smiley-surprised.gif new file mode 100644 index 00000000..cb99cdd9 Binary files /dev/null and b/webroot/js/tiny_mce/plugins/emotions/img/smiley-surprised.gif differ diff --git a/webroot/js/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif b/webroot/js/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif new file mode 100644 index 00000000..2075dc16 Binary files /dev/null and b/webroot/js/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif differ diff --git a/webroot/js/tiny_mce/plugins/emotions/img/smiley-undecided.gif b/webroot/js/tiny_mce/plugins/emotions/img/smiley-undecided.gif new file mode 100644 index 00000000..bef7e257 Binary files /dev/null and b/webroot/js/tiny_mce/plugins/emotions/img/smiley-undecided.gif differ diff --git a/webroot/js/tiny_mce/plugins/emotions/img/smiley-wink.gif b/webroot/js/tiny_mce/plugins/emotions/img/smiley-wink.gif new file mode 100644 index 00000000..9faf1aff Binary files /dev/null and b/webroot/js/tiny_mce/plugins/emotions/img/smiley-wink.gif differ diff --git a/webroot/js/tiny_mce/plugins/emotions/img/smiley-yell.gif b/webroot/js/tiny_mce/plugins/emotions/img/smiley-yell.gif new file mode 100644 index 00000000..648e6e87 Binary files /dev/null and b/webroot/js/tiny_mce/plugins/emotions/img/smiley-yell.gif differ diff --git a/webroot/js/tiny_mce/plugins/emotions/js/emotions.js b/webroot/js/tiny_mce/plugins/emotions/js/emotions.js new file mode 100644 index 00000000..c5493670 --- /dev/null +++ b/webroot/js/tiny_mce/plugins/emotions/js/emotions.js @@ -0,0 +1,22 @@ +tinyMCEPopup.requireLangPack(); + +var EmotionsDialog = { + init : function(ed) { + tinyMCEPopup.resizeToInnerSize(); + }, + + insert : function(file, title) { + var ed = tinyMCEPopup.editor, dom = ed.dom; + + tinyMCEPopup.execCommand('mceInsertContent', false, dom.createHTML('img', { + src : tinyMCEPopup.getWindowArg('plugin_url') + '/img/' + file, + alt : ed.getLang(title), + title : ed.getLang(title), + border : 0 + })); + + tinyMCEPopup.close(); + } +}; + +tinyMCEPopup.onInit.add(EmotionsDialog.init, EmotionsDialog); diff --git a/webroot/js/tiny_mce/plugins/emotions/langs/en_dlg.js b/webroot/js/tiny_mce/plugins/emotions/langs/en_dlg.js new file mode 100644 index 00000000..3b57ad9e --- /dev/null +++ b/webroot/js/tiny_mce/plugins/emotions/langs/en_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('en.emotions_dlg',{ +title:"Insert emotion", +desc:"Emotions", +cool:"Cool", +cry:"Cry", +embarassed:"Embarassed", +foot_in_mouth:"Foot in mouth", +frown:"Frown", +innocent:"Innocent", +kiss:"Kiss", +laughing:"Laughing", +money_mouth:"Money mouth", +sealed:"Sealed", +smile:"Smile", +surprised:"Surprised", +tongue_out:"Tongue out", +undecided:"Undecided", +wink:"Wink", +yell:"Yell" +}); \ No newline at end of file diff --git a/webroot/js/tiny_mce/plugins/example/dialog.htm b/webroot/js/tiny_mce/plugins/example/dialog.htm new file mode 100644 index 00000000..b4c62840 --- /dev/null +++ b/webroot/js/tiny_mce/plugins/example/dialog.htm @@ -0,0 +1,27 @@ + + + + {#example_dlg.title} + + + + + + + + + diff --git a/webroot/js/tiny_mce/plugins/example/editor_plugin.js b/webroot/js/tiny_mce/plugins/example/editor_plugin.js new file mode 100644 index 00000000..cb7010d1 --- /dev/null +++ b/webroot/js/tiny_mce/plugins/example/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.PluginManager.requireLangPack('example');tinymce.create('tinymce.plugins.ExamplePlugin',{init:function(ed,url){ed.addCommand('mceExample',function(){ed.windowManager.open({file:url+'/dialog.htm',width:320+parseInt(ed.getLang('example.delta_width',0)),height:120+parseInt(ed.getLang('example.delta_height',0)),inline:1},{plugin_url:url,some_custom_arg:'custom arg'});});ed.addButton('example',{title:'example.desc',cmd:'mceExample',image:url+'/img/example.gif'});ed.onNodeChange.add(function(ed,cm,n){cm.setActive('example',n.nodeName=='IMG');});},createControl:function(n,cm){return null;},getInfo:function(){return{longname:'Example plugin',author:'Some author',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example',version:"1.0"};}});tinymce.PluginManager.add('example',tinymce.plugins.ExamplePlugin);})(); \ No newline at end of file diff --git a/webroot/js/tiny_mce/plugins/example/editor_plugin_src.js b/webroot/js/tiny_mce/plugins/example/editor_plugin_src.js new file mode 100644 index 00000000..50505504 --- /dev/null +++ b/webroot/js/tiny_mce/plugins/example/editor_plugin_src.js @@ -0,0 +1,81 @@ +/** + * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + */ + +(function() { + // Load plugin specific language pack + tinymce.PluginManager.requireLangPack('example'); + + tinymce.create('tinymce.plugins.ExamplePlugin', { + /** + * Initializes the plugin, this will be executed after the plugin has been created. + * This call is done before the editor instance has finished it's initialization so use the onInit event + * of the editor instance to intercept that event. + * + * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in. + * @param {string} url Absolute URL to where the plugin is located. + */ + init : function(ed, url) { + // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample'); + ed.addCommand('mceExample', function() { + ed.windowManager.open({ + file : url + '/dialog.htm', + width : 320 + parseInt(ed.getLang('example.delta_width', 0)), + height : 120 + parseInt(ed.getLang('example.delta_height', 0)), + inline : 1 + }, { + plugin_url : url, // Plugin absolute URL + some_custom_arg : 'custom arg' // Custom argument + }); + }); + + // Register example button + ed.addButton('example', { + title : 'example.desc', + cmd : 'mceExample', + image : url + '/img/example.gif' + }); + + // Add a node change handler, selects the button in the UI when a image is selected + ed.onNodeChange.add(function(ed, cm, n) { + cm.setActive('example', n.nodeName == 'IMG'); + }); + }, + + /** + * Creates control instances based in the incomming name. This method is normally not + * needed since the addButton method of the tinymce.Editor class is a more easy way of adding buttons + * but you sometimes need to create more complex controls like listboxes, split buttons etc then this + * method can be used to create those. + * + * @param {String} n Name of the control to create. + * @param {tinymce.ControlManager} cm Control manager to use inorder to create new control. + * @return {tinymce.ui.Control} New control instance or null if no control was created. + */ + createControl : function(n, cm) { + return null; + }, + + /** + * Returns information about the plugin as a name/value array. + * The current keys are longname, author, authorurl, infourl and version. + * + * @return {Object} Name/value array containing information about the plugin. + */ + getInfo : function() { + return { + longname : 'Example plugin', + author : 'Some author', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example', + version : "1.0" + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('example', tinymce.plugins.ExamplePlugin); +})(); \ No newline at end of file diff --git a/webroot/js/tiny_mce/plugins/example/img/example.gif b/webroot/js/tiny_mce/plugins/example/img/example.gif new file mode 100644 index 00000000..1ab5da44 Binary files /dev/null and b/webroot/js/tiny_mce/plugins/example/img/example.gif differ diff --git a/webroot/js/tiny_mce/plugins/example/js/dialog.js b/webroot/js/tiny_mce/plugins/example/js/dialog.js new file mode 100644 index 00000000..fa834113 --- /dev/null +++ b/webroot/js/tiny_mce/plugins/example/js/dialog.js @@ -0,0 +1,19 @@ +tinyMCEPopup.requireLangPack(); + +var ExampleDialog = { + init : function() { + var f = document.forms[0]; + + // Get the selected contents as text and place it in the input + f.someval.value = tinyMCEPopup.editor.selection.getContent({format : 'text'}); + f.somearg.value = tinyMCEPopup.getWindowArg('some_custom_arg'); + }, + + insert : function() { + // Insert the contents from the input into the document + tinyMCEPopup.editor.execCommand('mceInsertContent', false, document.forms[0].someval.value); + tinyMCEPopup.close(); + } +}; + +tinyMCEPopup.onInit.add(ExampleDialog.init, ExampleDialog); diff --git a/webroot/js/tiny_mce/plugins/example/langs/en.js b/webroot/js/tiny_mce/plugins/example/langs/en.js new file mode 100644 index 00000000..e0784f80 --- /dev/null +++ b/webroot/js/tiny_mce/plugins/example/langs/en.js @@ -0,0 +1,3 @@ +tinyMCE.addI18n('en.example',{ + desc : 'This is just a template button' +}); diff --git a/webroot/js/tiny_mce/plugins/example/langs/en_dlg.js b/webroot/js/tiny_mce/plugins/example/langs/en_dlg.js new file mode 100644 index 00000000..ebcf948d --- /dev/null +++ b/webroot/js/tiny_mce/plugins/example/langs/en_dlg.js @@ -0,0 +1,3 @@ +tinyMCE.addI18n('en.example_dlg',{ + title : 'This is just a example title' +}); diff --git a/webroot/js/tiny_mce/plugins/fullpage/css/fullpage.css b/webroot/js/tiny_mce/plugins/fullpage/css/fullpage.css new file mode 100644 index 00000000..7a3334f0 --- /dev/null +++ b/webroot/js/tiny_mce/plugins/fullpage/css/fullpage.css @@ -0,0 +1,182 @@ +/* Hide the advanced tab */ +#advanced_tab { + display: none; +} + +#metatitle, #metakeywords, #metadescription, #metaauthor, #metacopyright { + width: 280px; +} + +#doctype, #docencoding { + width: 200px; +} + +#langcode { + width: 30px; +} + +#bgimage { + width: 220px; +} + +#fontface { + width: 240px; +} + +#leftmargin, #rightmargin, #topmargin, #bottommargin { + width: 50px; +} + +.panel_wrapper div.current { + height: 400px; +} + +#stylesheet, #style { + width: 240px; +} + +/* Head list classes */ + +.headlistwrapper { + width: 100%; +} + +.addbutton, .removebutton, .moveupbutton, .movedownbutton { + border-top: 1px solid; + border-left: 1px solid; + border-bottom: 1px solid; + border-right: 1px solid; + border-color: #F0F0EE; + cursor: default; + display: block; + width: 20px; + height: 20px; +} + +#doctypes { + width: 200px; +} + +.addbutton:hover, .removebutton:hover, .moveupbutton:hover, .movedownbutton:hover { + border: 1px solid #0A246A; + background-color: #B6BDD2; +} + +.addbutton { + background-image: url('../images/add.gif'); + float: left; + margin-right: 3px; +} + +.removebutton { + background-image: url('../images/remove.gif'); + float: left; +} + +.moveupbutton { + background-image: url('../images/move_up.gif'); + float: left; + margin-right: 3px; +} + +.movedownbutton { + background-image: url('../images/move_down.gif'); + float: left; +} + +.selected { + border: 1px solid #0A246A; + background-color: #B6BDD2; +} + +.toolbar { + width: 100%; +} + +#headlist { + width: 100%; + margin-top: 3px; + font-size: 11px; +} + +#info, #title_element, #meta_element, #script_element, #style_element, #base_element, #link_element, #comment_element, #unknown_element { + display: none; +} + +#addmenu { + position: absolute; + border: 1px solid gray; + display: none; + z-index: 100; + background-color: white; +} + +#addmenu a { + display: block; + width: 100%; + line-height: 20px; + text-decoration: none; + background-color: white; +} + +#addmenu a:hover { + background-color: #B6BDD2; + color: black; +} + +#addmenu span { + padding-left: 10px; + padding-right: 10px; +} + +#updateElementPanel { + display: none; +} + +#script_element .panel_wrapper div.current { + height: 108px; +} + +#style_element .panel_wrapper div.current { + height: 108px; +} + +#link_element .panel_wrapper div.current { + height: 140px; +} + +#element_script_value { + width: 100%; + height: 100px; +} + +#element_comment_value { + width: 100%; + height: 120px; +} + +#element_style_value { + width: 100%; + height: 100px; +} + +#element_title, #element_script_src, #element_meta_name, #element_meta_content, #element_base_href, #element_link_href, #element_link_title { + width: 250px; +} + +.updateElementButton { + margin-top: 3px; +} + +/* MSIE specific styles */ + +* html .addbutton, * html .removebutton, * html .moveupbutton, * html .movedownbutton { + width: 22px; + height: 22px; +} + +textarea { + height: 55px; +} + +.panel_wrapper div.current {height:420px;} \ No newline at end of file diff --git a/webroot/js/tiny_mce/plugins/fullpage/editor_plugin.js b/webroot/js/tiny_mce/plugins/fullpage/editor_plugin.js new file mode 100644 index 00000000..727beb57 --- /dev/null +++ b/webroot/js/tiny_mce/plugins/fullpage/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create('tinymce.plugins.FullPagePlugin',{init:function(ed,url){var t=this;t.editor=ed;ed.addCommand('mceFullPageProperties',function(){ed.windowManager.open({file:url+'/fullpage.htm',width:430+parseInt(ed.getLang('fullpage.delta_width',0)),height:495+parseInt(ed.getLang('fullpage.delta_height',0)),inline:1},{plugin_url:url,head_html:t.head});});ed.addButton('fullpage',{title:'fullpage.desc',cmd:'mceFullPageProperties'});ed.onBeforeSetContent.add(t._setContent,t);ed.onSetContent.add(t._setBodyAttribs,t);ed.onGetContent.add(t._getContent,t);},getInfo:function(){return{longname:'Fullpage',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullpage',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_setBodyAttribs:function(ed,o){var bdattr,i,len,kv,k,v,t,attr=this.head.match(/body(.*?)>/i);if(attr&&attr[1]){bdattr=attr[1].match(/\s*(\w+\s*=\s*".*?"|\w+\s*=\s*'.*?'|\w+\s*=\s*\w+|\w+)\s*/g);if(bdattr){for(i=0,len=bdattr.length;i',sp);t.head=c.substring(0,sp+1);ep=c.indexOf('
\n';t.head+=ed.getParam('fullpage_default_doctype','');t.head+='\n\n
\n
\n';if(v=ed.getParam('fullpage_default_encoding'))t.head+='\n';if(v=ed.getParam('fullpage_default_font_family'))st+='font-family: '+v+';';if(v=ed.getParam('fullpage_default_font_size'))st+='font-size: '+v+';';if(v=ed.getParam('fullpage_default_text_color'))st+='color: '+v+';';t.head+='\n
\n