Sha256: 48fb10a80c6649258719b7e3ffd401b7a4b4c0daa2dd1cec22547088bab28b72

Contents?: true

Size: 1.89 KB

Versions: 806

Compression:

Stored size: 1.89 KB

Contents

(function(){tinymce.create("tinymce.plugins.InsertDateTime",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceInsertDate",function(){var d=c._getDateTime(new Date(),a.getParam("plugin_insertdate_dateFormat",a.getLang("insertdatetime.date_fmt")));a.execCommand("mceInsertContent",false,d)});a.addCommand("mceInsertTime",function(){var d=c._getDateTime(new Date(),a.getParam("plugin_insertdate_timeFormat",a.getLang("insertdatetime.time_fmt")));a.execCommand("mceInsertContent",false,d)});a.addButton("insertdate",{title:"insertdatetime.insertdate_desc",cmd:"mceInsertDate"});a.addButton("inserttime",{title:"insertdatetime.inserttime_desc",cmd:"mceInsertTime"})},getInfo:function(){return{longname:"Insert date/time",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/insertdatetime",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_getDateTime:function(e,a){var c=this.editor;function b(g,d){g=""+g;if(g.length<d){for(var f=0;f<(d-g.length);f++){g="0"+g}}return g}a=a.replace("%D","%m/%d/%y");a=a.replace("%r","%I:%M:%S %p");a=a.replace("%Y",""+e.getFullYear());a=a.replace("%y",""+e.getYear());a=a.replace("%m",b(e.getMonth()+1,2));a=a.replace("%d",b(e.getDate(),2));a=a.replace("%H",""+b(e.getHours(),2));a=a.replace("%M",""+b(e.getMinutes(),2));a=a.replace("%S",""+b(e.getSeconds(),2));a=a.replace("%I",""+((e.getHours()+11)%12+1));a=a.replace("%p",""+(e.getHours()<12?"AM":"PM"));a=a.replace("%B",""+c.getLang("insertdatetime.months_long").split(",")[e.getMonth()]);a=a.replace("%b",""+c.getLang("insertdatetime.months_short").split(",")[e.getMonth()]);a=a.replace("%A",""+c.getLang("insertdatetime.day_long").split(",")[e.getDay()]);a=a.replace("%a",""+c.getLang("insertdatetime.day_short").split(",")[e.getDay()]);a=a.replace("%%","%");return a}});tinymce.PluginManager.add("insertdatetime",tinymce.plugins.InsertDateTime)})();

Version data entries

806 entries across 753 versions & 51 rubygems

Version Path
goldencobra-2.3.4 app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/insertdatetime/editor_plugin.js
goldencobra-2.3.3 app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/insertdatetime/editor_plugin.js
wagn-1.21.1 rails/assets/tinymce/plugins/insertdatetime/editor_plugin.js
decko-0.3.2 rails/assets/tinymce/plugins/insertdatetime/editor_plugin.js
decko-0.3.1 rails/assets/tinymce/plugins/insertdatetime/editor_plugin.js
decko-0.3.0 rails/assets/tinymce/plugins/insertdatetime/editor_plugin.js
decko-0.2.2 rails/assets/tinymce/plugins/insertdatetime/editor_plugin.js
decko-0.2.1 rails/assets/tinymce/plugins/insertdatetime/editor_plugin.js
decko-0.2 rails/assets/tinymce/plugins/insertdatetime/editor_plugin.js
decko-0.1 rails/assets/tinymce/plugins/insertdatetime/editor_plugin.js
wagn-1.21.0 rails/assets/tinymce/plugins/insertdatetime/editor_plugin.js
wagn-1.20.4 rails/assets/tinymce/plugins/insertdatetime/editor_plugin.js
wagn-1.20.3 rails/assets/tinymce/plugins/insertdatetime/editor_plugin.js
wagn-1.20.2 rails/assets/tinymce/plugins/insertdatetime/editor_plugin.js
wagn-1.20.1 rails/assets/tinymce/plugins/insertdatetime/editor_plugin.js
wagn-1.20.0 rails/assets/tinymce/plugins/insertdatetime/editor_plugin.js
ish_lib-0.0.8 vendor/assets/themeforest/alpona/html/js/tiny_mce/plugins/insertdatetime/editor_plugin.js
ish_lib-0.0.8 vendor/assets/javascripts/.trash/tinymce/plugins/insertdatetime/editor_plugin.js
wagn-1.19.6 rails/assets/tinymce/plugins/insertdatetime/editor_plugin.js
wagn-1.19.5 rails/assets/tinymce/plugins/insertdatetime/editor_plugin.js