* Upgraded TinyMCE to version 2.0RC3. This fixes a conflict with
[citadel.git] / webcit / tiny_mce / plugins / insertdatetime / editor_plugin_src.js
index 386ae8783e0b308a0292d29c495d80512520fe3f..d4c0eeb4ab5671f46b1f470fc0b5c8eaccf18ce9 100644 (file)
@@ -1,5 +1,5 @@
 /* Import plugin specific language pack */
-tinyMCE.importPluginLanguagePack('insertdatetime', 'cs,el,en,fr_ca,it,ko,sv,zh_cn,fa,fr,de,pl,pt_br,nl');
+tinyMCE.importPluginLanguagePack('insertdatetime', 'cs,el,en,fr_ca,it,ko,sv,zh_cn,fa,fr,de,pl,pt_br,nl,da,he,no');
 
 function TinyMCE_insertdatetime_getInfo() {
        return {
@@ -17,10 +17,10 @@ function TinyMCE_insertdatetime_getInfo() {
 function TinyMCE_insertdatetime_getControlHTML(control_name) {
        switch (control_name) {
                case "insertdate":
-                       return '<a href="javascript:tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceInsertDate\');" onmousedown="return false;"><img id="{$editor_id}_insertdate" src="{$pluginurl}/images/insertdate.gif" title="{$lang_insertdate_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';
+                       return '<a href="javascript:tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceInsertDate\');" target="_self" onmousedown="return false;"><img id="{$editor_id}_insertdate" src="{$pluginurl}/images/insertdate.gif" title="{$lang_insertdate_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';
 
                case "inserttime":
-                       return '<a href="javascript:tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceInsertTime\');" onmousedown="return false;"><img id="{$editor_id}_inserttime" src="{$pluginurl}/images/inserttime.gif" title="{$lang_inserttime_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';
+                       return '<a href="javascript:tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceInsertTime\');" target="_self" onmousedown="return false;"><img id="{$editor_id}_inserttime" src="{$pluginurl}/images/inserttime.gif" title="{$lang_inserttime_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';
        }
 
        return "";
@@ -53,7 +53,7 @@ function TinyMCE_insertdatetime_execCommand(editor_id, element, command, user_in
                format = tinyMCE.regexpReplace(format, "%H", "" + addZeros(date.getHours(), 2));
                format = tinyMCE.regexpReplace(format, "%M", "" + addZeros(date.getMinutes(), 2));
                format = tinyMCE.regexpReplace(format, "%S", "" + addZeros(date.getSeconds(), 2));
-               format = tinyMCE.regexpReplace(format, "%I", "" + (date.getHours() < 12 ? (date.getHours()+1) : 24-date.getHours()));
+               format = tinyMCE.regexpReplace(format, "%I", "" + ((date.getHours() + 11) % 12 + 1));
                format = tinyMCE.regexpReplace(format, "%p", "" + (date.getHours() < 12 ? "AM" : "PM"));
                format = tinyMCE.regexpReplace(format, "%B", "" + tinyMCE.getLang("lang_inserttime_months_long")[date.getMonth()]);
                format = tinyMCE.regexpReplace(format, "%b", "" + tinyMCE.getLang("lang_inserttime_months_short")[date.getMonth()]);