includes/clientside/tinymce/themes/advanced/editor_template_src.js
changeset 1193 e3b94bd055dc
parent 778 57ce13805b6f
equal deleted inserted replaced
1192:5882f0eebb34 1193:e3b94bd055dc
     1 /**
     1 /**
     2  * $Id: editor_template_src.js 960 2008-11-12 18:30:32Z spocke $
     2  * $Id: editor_template_src.js 1045 2009-03-04 20:03:18Z spocke $
     3  *
     3  *
     4  * @author Moxiecode
     4  * @author Moxiecode
     5  * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
     5  * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
     6  */
     6  */
     7 
     7 
     8 (function() {
     8 (function(tinymce) {
     9 	var DOM = tinymce.DOM, Event = tinymce.dom.Event, extend = tinymce.extend, each = tinymce.each, Cookie = tinymce.util.Cookie, lastExtID, explode = tinymce.explode;
     9 	var DOM = tinymce.DOM, Event = tinymce.dom.Event, extend = tinymce.extend, each = tinymce.each, Cookie = tinymce.util.Cookie, lastExtID, explode = tinymce.explode;
    10 
    10 
    11 	// Tell it to load theme specific language pack(s)
    11 	// Tell it to load theme specific language pack(s)
    12 	tinymce.ThemeManager.requireLangPack('advanced');
    12 	tinymce.ThemeManager.requireLangPack('advanced');
    13 
    13 
   102 							cl = s.font_size_classes[v - 1];
   102 							cl = s.font_size_classes[v - 1];
   103 							v = s.font_size_style_values[v - 1] || (t.sizes[v - 1] + 'pt');
   103 							v = s.font_size_style_values[v - 1] || (t.sizes[v - 1] + 'pt');
   104 						}
   104 						}
   105 					}
   105 					}
   106 
   106 
   107 					if (/\s*\./.test(v))
   107 					if (/^\s*\./.test(v))
   108 						cl = v.replace(/\./g, '');
   108 						cl = v.replace(/\./g, '');
   109 
   109 
   110 					o[k] = cl ? {'class' : cl} : {fontSize : v};
   110 					o[k] = cl ? {'class' : cl} : {fontSize : v};
   111 				});
   111 				});
   112 
   112 
   438 					}
   438 					}
   439 				});
   439 				});
   440 			}
   440 			}
   441 */
   441 */
   442 
   442 
   443 			if (!ed.getParam('accessibility_focus') || ed.getParam('tab_focus'))
   443 			if (!ed.getParam('accessibility_focus'))
   444 				Event.add(DOM.add(p, 'a', {href : '#'}, '<!-- IE -->'), 'focus', function() {tinyMCE.get(ed.id).focus();});
   444 				Event.add(DOM.add(p, 'a', {href : '#'}, '<!-- IE -->'), 'focus', function() {tinyMCE.get(ed.id).focus();});
   445 
   445 
   446 			if (s.theme_advanced_toolbar_location == 'external')
   446 			if (s.theme_advanced_toolbar_location == 'external')
   447 				o.deltaHeight = 0;
   447 				o.deltaHeight = 0;
   448 
   448 
   653 			a = s.theme_advanced_toolbar_align.toLowerCase();
   653 			a = s.theme_advanced_toolbar_align.toLowerCase();
   654 			a = 'mce' + t._ufirst(a);
   654 			a = 'mce' + t._ufirst(a);
   655 
   655 
   656 			n = DOM.add(DOM.add(c, 'tr'), 'td', {'class' : 'mceToolbar ' + a});
   656 			n = DOM.add(DOM.add(c, 'tr'), 'td', {'class' : 'mceToolbar ' + a});
   657 
   657 
   658 			if (!ed.getParam('accessibility_focus') || ed.getParam('tab_focus'))
   658 			if (!ed.getParam('accessibility_focus'))
   659 				h.push(DOM.createHTML('a', {href : '#', onfocus : 'tinyMCE.get(\'' + ed.id + '\').focus();'}, '<!-- IE -->'));
   659 				h.push(DOM.createHTML('a', {href : '#', onfocus : 'tinyMCE.get(\'' + ed.id + '\').focus();'}, '<!-- IE -->'));
   660 
   660 
   661 			h.push(DOM.createHTML('a', {href : '#', accesskey : 'q', title : ed.getLang("advanced.toolbar_focus")}, '<!-- IE -->'));
   661 			h.push(DOM.createHTML('a', {href : '#', accesskey : 'q', title : ed.getLang("advanced.toolbar_focus")}, '<!-- IE -->'));
   662 
   662 
   663 			// Create toolbar and add the controls
   663 			// Create toolbar and add the controls
   685 		_addStatusBar : function(tb, o) {
   685 		_addStatusBar : function(tb, o) {
   686 			var n, t = this, ed = t.editor, s = t.settings, r, mf, me, td;
   686 			var n, t = this, ed = t.editor, s = t.settings, r, mf, me, td;
   687 
   687 
   688 			n = DOM.add(tb, 'tr');
   688 			n = DOM.add(tb, 'tr');
   689 			n = td = DOM.add(n, 'td', {'class' : 'mceStatusbar'});
   689 			n = td = DOM.add(n, 'td', {'class' : 'mceStatusbar'});
   690 			n = DOM.add(n, 'div', {id : ed.id + '_path_row'}, s.theme_advanced_path ? ed.translate('advanced.path') + ': ' : '&nbsp;');
   690 			n = DOM.add(n, 'div', {id : ed.id + '_path_row'}, s.theme_advanced_path ? ed.translate('advanced.path') + ': ' : '&#160;');
   691 			DOM.add(n, 'a', {href : '#', accesskey : 'x'});
   691 			DOM.add(n, 'a', {href : '#', accesskey : 'x'});
   692 
   692 
   693 			if (s.theme_advanced_resizing && !tinymce.isOldWebKit) {
   693 			if (s.theme_advanced_resizing) {
   694 				DOM.add(td, 'a', {id : ed.id + '_resize', href : 'javascript:;', onclick : "return false;", 'class' : 'mceResize'});
   694 				DOM.add(td, 'a', {id : ed.id + '_resize', href : 'javascript:;', onclick : "return false;", 'class' : 'mceResize'});
   695 
   695 
   696 				if (s.theme_advanced_resizing_use_cookie) {
   696 				if (s.theme_advanced_resizing_use_cookie) {
   697 					ed.onPostRender.add(function() {
   697 					ed.onPostRender.add(function() {
   698 						var o = Cookie.getHash("TinyMCE_" + ed.id + "_size"), c = DOM.get(ed.id + '_tbl');
   698 						var o = Cookie.getHash("TinyMCE_" + ed.id + "_size"), c = DOM.get(ed.id + '_tbl');
  1148 			return s.substring(0, 1).toUpperCase() + s.substring(1);
  1148 			return s.substring(0, 1).toUpperCase() + s.substring(1);
  1149 		}
  1149 		}
  1150 	});
  1150 	});
  1151 
  1151 
  1152 	tinymce.ThemeManager.add('advanced', tinymce.themes.AdvancedTheme);
  1152 	tinymce.ThemeManager.add('advanced', tinymce.themes.AdvancedTheme);
  1153 }());
  1153 }(tinymce));