├── test └── index.js ├── controllers ├── tag.js ├── index.js ├── site.js ├── mail.js ├── compose.js └── sign.js ├── views ├── mail │ ├── content.html │ ├── index.html │ ├── side.html │ ├── list.html │ ├── mail.html │ └── compose.html ├── landing.html ├── index.html ├── sign │ ├── sidebar.html │ └── signin.html └── layout.html ├── .travis.yml ├── public ├── libs │ ├── bootstrap │ │ ├── .gitignore │ │ └── img │ │ │ ├── glyphicons-halflings.png │ │ │ └── glyphicons-halflings-white.png │ ├── tiny-mce │ │ ├── plugins │ │ │ ├── example │ │ │ │ ├── langs │ │ │ │ │ ├── en.js │ │ │ │ │ └── en_dlg.js │ │ │ │ ├── img │ │ │ │ │ └── example.gif │ │ │ │ ├── js │ │ │ │ │ └── dialog.js │ │ │ │ └── dialog.htm │ │ │ ├── media │ │ │ │ ├── moxieplayer.swf │ │ │ │ ├── css │ │ │ │ │ └── media.css │ │ │ │ ├── js │ │ │ │ │ └── embed.js │ │ │ │ └── langs │ │ │ │ │ └── en_dlg.js │ │ │ ├── visualblocks │ │ │ │ ├── img │ │ │ │ │ ├── p.gif │ │ │ │ │ ├── div.gif │ │ │ │ │ ├── h1.gif │ │ │ │ │ ├── h2.gif │ │ │ │ │ ├── h3.gif │ │ │ │ │ ├── h4.gif │ │ │ │ │ ├── h5.gif │ │ │ │ │ ├── h6.gif │ │ │ │ │ ├── pre.gif │ │ │ │ │ ├── aside.gif │ │ │ │ │ ├── figure.gif │ │ │ │ │ ├── hgroup.gif │ │ │ │ │ ├── address.gif │ │ │ │ │ ├── article.gif │ │ │ │ │ ├── section.gif │ │ │ │ │ └── blockquote.gif │ │ │ │ └── editor_plugin_src.js │ │ │ ├── advimage │ │ │ │ ├── img │ │ │ │ │ └── sample.gif │ │ │ │ ├── css │ │ │ │ │ └── advimage.css │ │ │ │ ├── langs │ │ │ │ │ └── en_dlg.js │ │ │ │ └── editor_plugin_src.js │ │ │ ├── spellchecker │ │ │ │ ├── css │ │ │ │ │ └── content.css │ │ │ │ ├── img │ │ │ │ │ └── wline.gif │ │ │ │ └── editor_plugin_src.js │ │ │ ├── advhr │ │ │ │ ├── langs │ │ │ │ │ └── en_dlg.js │ │ │ │ ├── css │ │ │ │ │ └── advhr.css │ │ │ │ ├── js │ │ │ │ │ └── rule.js │ │ │ │ ├── editor_plugin_src.js │ │ │ │ └── rule.htm │ │ │ ├── emotions │ │ │ │ ├── img │ │ │ │ │ ├── smiley-cry.gif │ │ │ │ │ ├── smiley-cool.gif │ │ │ │ │ ├── smiley-frown.gif │ │ │ │ │ ├── smiley-kiss.gif │ │ │ │ │ ├── smiley-smile.gif │ │ │ │ │ ├── smiley-wink.gif │ │ │ │ │ ├── smiley-yell.gif │ │ │ │ │ ├── smiley-innocent.gif │ │ │ │ │ ├── smiley-laughing.gif │ │ │ │ │ ├── smiley-sealed.gif │ │ │ │ │ ├── smiley-embarassed.gif │ │ │ │ │ ├── smiley-surprised.gif │ │ │ │ │ ├── smiley-tongue-out.gif │ │ │ │ │ ├── smiley-undecided.gif │ │ │ │ │ ├── smiley-foot-in-mouth.gif │ │ │ │ │ └── smiley-money-mouth.gif │ │ │ │ ├── langs │ │ │ │ │ └── en_dlg.js │ │ │ │ ├── js │ │ │ │ │ └── emotions.js │ │ │ │ └── editor_plugin_src.js │ │ │ ├── inlinepopups │ │ │ │ └── skins │ │ │ │ │ └── clearlooks2 │ │ │ │ │ └── img │ │ │ │ │ ├── alert.gif │ │ │ │ │ ├── button.gif │ │ │ │ │ ├── buttons.gif │ │ │ │ │ ├── confirm.gif │ │ │ │ │ ├── corners.gif │ │ │ │ │ ├── vertical.gif │ │ │ │ │ └── horizontal.gif │ │ │ ├── searchreplace │ │ │ │ ├── css │ │ │ │ │ └── searchreplace.css │ │ │ │ ├── langs │ │ │ │ │ └── en_dlg.js │ │ │ │ └── editor_plugin_src.js │ │ │ ├── paste │ │ │ │ ├── langs │ │ │ │ │ └── en_dlg.js │ │ │ │ ├── pasteword.htm │ │ │ │ ├── js │ │ │ │ │ ├── pastetext.js │ │ │ │ │ └── pasteword.js │ │ │ │ └── pastetext.htm │ │ │ ├── table │ │ │ │ ├── css │ │ │ │ │ ├── table.css │ │ │ │ │ ├── cell.css │ │ │ │ │ └── row.css │ │ │ │ ├── js │ │ │ │ │ └── merge_cells.js │ │ │ │ ├── merge_cells.htm │ │ │ │ └── langs │ │ │ │ │ └── en_dlg.js │ │ │ ├── xhtmlxtras │ │ │ │ ├── css │ │ │ │ │ ├── attributes.css │ │ │ │ │ └── popup.css │ │ │ │ ├── js │ │ │ │ │ ├── abbr.js │ │ │ │ │ ├── cite.js │ │ │ │ │ ├── acronym.js │ │ │ │ │ ├── del.js │ │ │ │ │ └── ins.js │ │ │ │ └── langs │ │ │ │ │ └── en_dlg.js │ │ │ ├── autosave │ │ │ │ └── langs │ │ │ │ │ └── en.js │ │ │ ├── template │ │ │ │ ├── blank.htm │ │ │ │ ├── css │ │ │ │ │ └── template.css │ │ │ │ ├── langs │ │ │ │ │ └── en_dlg.js │ │ │ │ └── template.htm │ │ │ ├── advlink │ │ │ │ ├── css │ │ │ │ │ └── advlink.css │ │ │ │ ├── langs │ │ │ │ │ └── en_dlg.js │ │ │ │ └── editor_plugin_src.js │ │ │ ├── preview │ │ │ │ ├── preview.html │ │ │ │ ├── example.html │ │ │ │ ├── editor_plugin_src.js │ │ │ │ └── jscripts │ │ │ │ │ └── embed.js │ │ │ ├── style │ │ │ │ ├── css │ │ │ │ │ └── props.css │ │ │ │ ├── readme.txt │ │ │ │ ├── langs │ │ │ │ │ └── en_dlg.js │ │ │ │ └── editor_plugin_src.js │ │ │ ├── print │ │ │ │ └── editor_plugin_src.js │ │ │ ├── iespell │ │ │ │ └── editor_plugin_src.js │ │ │ ├── nonbreaking │ │ │ │ └── editor_plugin_src.js │ │ │ ├── example_dependency │ │ │ │ └── editor_plugin_src.js │ │ │ ├── fullpage │ │ │ │ └── langs │ │ │ │ │ └── en_dlg.js │ │ │ ├── pagebreak │ │ │ │ └── editor_plugin_src.js │ │ │ ├── visualchars │ │ │ │ └── editor_plugin_src.js │ │ │ └── directionality │ │ │ │ └── editor_plugin_src.js │ │ ├── themes │ │ │ ├── simple │ │ │ │ ├── img │ │ │ │ │ └── icons.gif │ │ │ │ ├── skins │ │ │ │ │ ├── o2k7 │ │ │ │ │ │ ├── img │ │ │ │ │ │ │ └── button_bg.png │ │ │ │ │ │ ├── content.css │ │ │ │ │ │ └── ui.css │ │ │ │ │ └── default │ │ │ │ │ │ ├── content.css │ │ │ │ │ │ └── ui.css │ │ │ │ └── langs │ │ │ │ │ └── en.js │ │ │ └── advanced │ │ │ │ ├── img │ │ │ │ ├── flash.gif │ │ │ │ ├── icons.gif │ │ │ │ ├── iframe.gif │ │ │ │ ├── trans.gif │ │ │ │ ├── video.gif │ │ │ │ ├── colorpicker.jpg │ │ │ │ ├── pagebreak.gif │ │ │ │ ├── quicktime.gif │ │ │ │ ├── realmedia.gif │ │ │ │ ├── shockwave.gif │ │ │ │ └── windowsmedia.gif │ │ │ │ ├── skins │ │ │ │ ├── default │ │ │ │ │ ├── img │ │ │ │ │ │ ├── tabs.gif │ │ │ │ │ │ ├── buttons.png │ │ │ │ │ │ ├── items.gif │ │ │ │ │ │ ├── progress.gif │ │ │ │ │ │ ├── menu_arrow.gif │ │ │ │ │ │ └── menu_check.gif │ │ │ │ │ └── content.css │ │ │ │ ├── o2k7 │ │ │ │ │ ├── img │ │ │ │ │ │ ├── button_bg.png │ │ │ │ │ │ ├── button_bg_black.png │ │ │ │ │ │ └── button_bg_silver.png │ │ │ │ │ ├── ui_silver.css │ │ │ │ │ ├── ui_black.css │ │ │ │ │ └── content.css │ │ │ │ └── highcontrast │ │ │ │ │ └── content.css │ │ │ │ ├── anchor.htm │ │ │ │ ├── source_editor.htm │ │ │ │ ├── js │ │ │ │ ├── anchor.js │ │ │ │ ├── source_editor.js │ │ │ │ └── about.js │ │ │ │ ├── langs │ │ │ │ ├── en_dlg.js │ │ │ │ └── en.js │ │ │ │ ├── shortcuts.htm │ │ │ │ ├── charmap.htm │ │ │ │ ├── link.htm │ │ │ │ └── about.htm │ │ ├── classes │ │ │ ├── util │ │ │ │ ├── JSONP.js │ │ │ │ ├── VK.js │ │ │ │ ├── XHR.js │ │ │ │ └── JSON.js │ │ │ ├── adapter │ │ │ │ └── prototype │ │ │ │ │ └── adapter.js │ │ │ ├── ui │ │ │ │ ├── Separator.js │ │ │ │ ├── Container.js │ │ │ │ ├── MenuItem.js │ │ │ │ └── ToolbarGroup.js │ │ │ ├── firebug │ │ │ │ └── FIREBUG.LICENSE │ │ │ ├── LegacyInput.js │ │ │ └── dom │ │ │ │ └── TreeWalker.js │ │ └── utils │ │ │ └── editable_selects.js │ └── moment │ │ └── lang │ │ └── zh-cn.js ├── favicon.ico ├── images │ ├── shot.png │ ├── shot2.png │ ├── octocat-icon.png │ ├── forkme_left_gray_6d6d6d.png │ └── forkme_right_gray_6d6d6d.png └── javascripts │ ├── index.js │ ├── signin.js │ ├── inbox.js │ └── mail.js ├── demo ├── mailparser │ ├── demo1 │ │ ├── qq.eml │ │ ├── test.js │ │ └── 163.eml │ └── demo2 │ │ ├── email.eml │ │ └── mail-parser.js ├── attachments │ ├── inspectocat.jpg │ └── notes.txt ├── imap.js └── send-mail.js ├── index.html ├── models ├── temp.js ├── user.js ├── mail.js └── index.js ├── config.js ├── Makefile ├── LICENSE ├── package.json ├── app.js ├── README.md ├── routes.js └── .gitignore /test/index.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /controllers/tag.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /views/mail/content.html: -------------------------------------------------------------------------------- 1 | <%-html%> 2 | -------------------------------------------------------------------------------- /views/landing.html: -------------------------------------------------------------------------------- 1 | Sign in now. -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.8 4 | -------------------------------------------------------------------------------- /public/libs/bootstrap/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | .DS_Store 3 | thumbs.db 4 | js/min -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/favicon.ico -------------------------------------------------------------------------------- /controllers/index.js: -------------------------------------------------------------------------------- 1 | module.exports = function(req, res) { 2 | res.partial('landing.html'); 3 | }; 4 | -------------------------------------------------------------------------------- /public/images/shot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/images/shot.png -------------------------------------------------------------------------------- /public/images/shot2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/images/shot2.png -------------------------------------------------------------------------------- /demo/mailparser/demo1/qq.eml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/demo/mailparser/demo1/qq.eml -------------------------------------------------------------------------------- /demo/mailparser/demo2/email.eml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/demo/mailparser/demo2/email.eml -------------------------------------------------------------------------------- /public/images/octocat-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/images/octocat-icon.png -------------------------------------------------------------------------------- /demo/attachments/inspectocat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/demo/attachments/inspectocat.jpg -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /controllers/site.js: -------------------------------------------------------------------------------- 1 | exports.index = function(req, res) { 2 | res.locals.tag = ''; 3 | res.render('mail/index.html'); 4 | }; 5 | -------------------------------------------------------------------------------- /controllers/mail.js: -------------------------------------------------------------------------------- 1 | exports.index = function(req, res, next) { 2 | res.locals.tag = ''; 3 | res.render('mail/index.html'); 4 | }; 5 | -------------------------------------------------------------------------------- /public/images/forkme_left_gray_6d6d6d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/images/forkme_left_gray_6d6d6d.png -------------------------------------------------------------------------------- /public/images/forkme_right_gray_6d6d6d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/images/forkme_right_gray_6d6d6d.png -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/example/langs/en.js: -------------------------------------------------------------------------------- 1 | tinyMCE.addI18n('en.example',{ 2 | desc : 'This is just a template button' 3 | }); 4 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/example/langs/en_dlg.js: -------------------------------------------------------------------------------- 1 | tinyMCE.addI18n('en.example_dlg',{ 2 | title : 'This is just a example title' 3 | }); 4 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/themes/simple/img/icons.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/themes/simple/img/icons.gif -------------------------------------------------------------------------------- /public/javascripts/index.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | $.get('/ajax/mail/index').done(function(result) { 3 | $('#J_content').html(result); 4 | }); 5 | }); 6 | -------------------------------------------------------------------------------- /public/libs/bootstrap/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/bootstrap/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/media/moxieplayer.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/plugins/media/moxieplayer.swf -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/visualblocks/img/p.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/plugins/visualblocks/img/p.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/themes/advanced/img/flash.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/themes/advanced/img/flash.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/themes/advanced/img/icons.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/themes/advanced/img/icons.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/themes/advanced/img/iframe.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/themes/advanced/img/iframe.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/themes/advanced/img/trans.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/themes/advanced/img/trans.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/themes/advanced/img/video.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/themes/advanced/img/video.gif -------------------------------------------------------------------------------- /views/index.html: -------------------------------------------------------------------------------- 1 | <% if(locals.currentUser) { %> 2 |

name:<%=locals.currentUser.name%>

3 |

pass:<%=locals.currentUser.pass%>

4 | <% } %> -------------------------------------------------------------------------------- /views/mail/index.html: -------------------------------------------------------------------------------- 1 | <%- include side.html %> 2 | 3 |
4 | 5 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/advimage/img/sample.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/plugins/advimage/img/sample.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/example/img/example.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/plugins/example/img/example.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/spellchecker/css/content.css: -------------------------------------------------------------------------------- 1 | .mceItemHiddenSpellWord {background:url(../img/wline.gif) repeat-x bottom left; cursor:default;} 2 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/visualblocks/img/div.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/plugins/visualblocks/img/div.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/visualblocks/img/h1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/plugins/visualblocks/img/h1.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/visualblocks/img/h2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/plugins/visualblocks/img/h2.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/visualblocks/img/h3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/plugins/visualblocks/img/h3.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/visualblocks/img/h4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/plugins/visualblocks/img/h4.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/visualblocks/img/h5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/plugins/visualblocks/img/h5.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/visualblocks/img/h6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/plugins/visualblocks/img/h6.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/visualblocks/img/pre.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/plugins/visualblocks/img/pre.gif -------------------------------------------------------------------------------- /public/libs/bootstrap/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/bootstrap/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/advhr/langs/en_dlg.js: -------------------------------------------------------------------------------- 1 | tinyMCE.addI18n('en.advhr_dlg',{size:"Height",noshade:"No Shadow",width:"Width",normal:"Normal",widthunits:"Units"}); -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/emotions/img/smiley-cry.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/plugins/emotions/img/smiley-cry.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/spellchecker/img/wline.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/plugins/spellchecker/img/wline.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/visualblocks/img/aside.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/plugins/visualblocks/img/aside.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/visualblocks/img/figure.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/plugins/visualblocks/img/figure.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/visualblocks/img/hgroup.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/plugins/visualblocks/img/hgroup.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/themes/advanced/img/colorpicker.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/themes/advanced/img/colorpicker.jpg -------------------------------------------------------------------------------- /public/libs/tiny-mce/themes/advanced/img/pagebreak.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/themes/advanced/img/pagebreak.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/themes/advanced/img/quicktime.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/themes/advanced/img/quicktime.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/themes/advanced/img/realmedia.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/themes/advanced/img/realmedia.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/themes/advanced/img/shockwave.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/themes/advanced/img/shockwave.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/emotions/img/smiley-cool.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/plugins/emotions/img/smiley-cool.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/emotions/img/smiley-frown.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/plugins/emotions/img/smiley-frown.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/emotions/img/smiley-kiss.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/plugins/emotions/img/smiley-kiss.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/emotions/img/smiley-smile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/plugins/emotions/img/smiley-smile.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/emotions/img/smiley-wink.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/plugins/emotions/img/smiley-wink.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/emotions/img/smiley-yell.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/plugins/emotions/img/smiley-yell.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/visualblocks/img/address.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/plugins/visualblocks/img/address.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/visualblocks/img/article.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/plugins/visualblocks/img/article.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/visualblocks/img/section.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/plugins/visualblocks/img/section.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/themes/advanced/img/windowsmedia.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/themes/advanced/img/windowsmedia.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/emotions/img/smiley-innocent.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/plugins/emotions/img/smiley-innocent.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/emotions/img/smiley-laughing.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/plugins/emotions/img/smiley-laughing.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/emotions/img/smiley-sealed.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/plugins/emotions/img/smiley-sealed.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/visualblocks/img/blockquote.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/plugins/visualblocks/img/blockquote.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/emotions/img/smiley-embarassed.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/plugins/emotions/img/smiley-embarassed.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/emotions/img/smiley-surprised.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/plugins/emotions/img/smiley-surprised.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/emotions/img/smiley-tongue-out.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/plugins/emotions/img/smiley-tongue-out.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/emotions/img/smiley-undecided.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/plugins/emotions/img/smiley-undecided.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/spellchecker/editor_plugin_src.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/plugins/spellchecker/editor_plugin_src.js -------------------------------------------------------------------------------- /public/libs/tiny-mce/themes/advanced/skins/default/img/tabs.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/themes/advanced/skins/default/img/tabs.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/themes/simple/skins/o2k7/img/button_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/themes/simple/skins/o2k7/img/button_bg.png -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/emotions/img/smiley-foot-in-mouth.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/plugins/emotions/img/smiley-foot-in-mouth.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/emotions/img/smiley-money-mouth.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/plugins/emotions/img/smiley-money-mouth.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/themes/advanced/skins/default/img/buttons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/themes/advanced/skins/default/img/buttons.png -------------------------------------------------------------------------------- /public/libs/tiny-mce/themes/advanced/skins/default/img/items.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/themes/advanced/skins/default/img/items.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/themes/advanced/skins/o2k7/img/button_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/themes/advanced/skins/o2k7/img/button_bg.png -------------------------------------------------------------------------------- /public/libs/tiny-mce/themes/advanced/skins/default/img/progress.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/themes/advanced/skins/default/img/progress.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/themes/advanced/skins/default/img/menu_arrow.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/themes/advanced/skins/default/img/menu_arrow.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/themes/advanced/skins/default/img/menu_check.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/themes/advanced/skins/default/img/menu_check.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/themes/advanced/skins/o2k7/img/button_bg_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/themes/advanced/skins/o2k7/img/button_bg_black.png -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/themes/advanced/skins/o2k7/img/button_bg_silver.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/themes/advanced/skins/o2k7/img/button_bg_silver.png -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamghill/nodemail/master/public/libs/tiny-mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif -------------------------------------------------------------------------------- /models/temp.js: -------------------------------------------------------------------------------- 1 | var mongoose = require('mongoose'); 2 | var Schema = mongoose.Schema; 3 | 4 | var TempSchema = new Schema({ 5 | imap: {type: Object}, 6 | createAt: {type: Date, default: Date.now} 7 | }); 8 | 9 | mongoose.model('Temp', TempSchema); 10 | -------------------------------------------------------------------------------- /models/user.js: -------------------------------------------------------------------------------- 1 | var mongoose = require('mongoose'); 2 | var Schema = mongoose.Schema; 3 | 4 | var UserSchema = new Schema({ 5 | name: {type: String}, 6 | createAt: {type: Date, default: Date.now} 7 | }); 8 | 9 | mongoose.model('User', UserSchema); 10 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/searchreplace/css/searchreplace.css: -------------------------------------------------------------------------------- 1 | .panel_wrapper {height:85px;} 2 | .panel_wrapper div.current {height:85px;} 3 | 4 | /* IE */ 5 | * html .panel_wrapper {height:100px;} 6 | * html .panel_wrapper div.current {height:100px;} 7 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/paste/langs/en_dlg.js: -------------------------------------------------------------------------------- 1 | tinyMCE.addI18n('en.paste_dlg',{"word_title":"Use Ctrl+V on your keyboard to paste the text into the window.","text_linebreaks":"Keep Linebreaks","text_title":"Use Ctrl+V on your keyboard to paste the text into the window."}); -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/table/css/table.css: -------------------------------------------------------------------------------- 1 | /* CSS file for table dialog in the table plugin */ 2 | 3 | .panel_wrapper div.current { 4 | height: 245px; 5 | } 6 | 7 | .advfield { 8 | width: 200px; 9 | } 10 | 11 | #class { 12 | width: 150px; 13 | } 14 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/advhr/css/advhr.css: -------------------------------------------------------------------------------- 1 | input.radio {border:1px none #000; background:transparent; vertical-align:middle;} 2 | .panel_wrapper div.current {height:80px;} 3 | #width {width:50px; vertical-align:middle;} 4 | #width2 {width:50px; vertical-align:middle;} 5 | #size {width:100px;} 6 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/xhtmlxtras/css/attributes.css: -------------------------------------------------------------------------------- 1 | .panel_wrapper div.current { 2 | height: 290px; 3 | } 4 | 5 | #id, #style, #title, #dir, #hreflang, #lang, #classlist, #tabindex, #accesskey { 6 | width: 200px; 7 | } 8 | 9 | #events_panel input { 10 | width: 200px; 11 | } 12 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/autosave/langs/en.js: -------------------------------------------------------------------------------- 1 | tinyMCE.addI18n('en.autosave',{ 2 | restore_content: "Restore auto-saved content", 3 | warning_message: "If you restore the saved content, you will lose all the content that is currently in the editor.\n\nAre you sure you want to restore the saved content?" 4 | }); -------------------------------------------------------------------------------- /public/javascripts/signin.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | 'use strict'; 3 | var $form = $('#signin_form'); 4 | $form.validate({ 5 | rules: { 6 | name: { 7 | required: true, 8 | email: true 9 | }, 10 | pass: { 11 | required: true 12 | } 13 | } 14 | }); 15 | }); 16 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/table/css/cell.css: -------------------------------------------------------------------------------- 1 | /* CSS file for cell dialog in the table plugin */ 2 | 3 | .panel_wrapper div.current { 4 | height: 200px; 5 | } 6 | 7 | .advfield { 8 | width: 200px; 9 | } 10 | 11 | #action { 12 | margin-bottom: 3px; 13 | } 14 | 15 | #class { 16 | width: 150px; 17 | } -------------------------------------------------------------------------------- /demo/mailparser/demo1/test.js: -------------------------------------------------------------------------------- 1 | var MailParser = require("mailparser").MailParser, 2 | mailparser = new MailParser(), 3 | fs = require("fs"); 4 | 5 | mailparser.on("end", function(mail_object) { 6 | console.log(mail_object); 7 | // console.log("Subject:", mail_object.subject); 8 | }); 9 | 10 | fs.createReadStream("163.eml").pipe(mailparser); -------------------------------------------------------------------------------- /config.js: -------------------------------------------------------------------------------- 1 | // var path = require('path'); 2 | exports.config = { 3 | debug: true, 4 | name: 'nodemail', 5 | description: 'NodeJS-based web-mail', 6 | version: '0.1.7', 7 | 8 | sessionSecret: 'nodemail', 9 | authCookieName: 'nodemail', 10 | host: '127.0.0.1', 11 | port: 3001, 12 | 13 | db: 'mongodb://127.0.0.1/nodemail' 14 | }; 15 | -------------------------------------------------------------------------------- /demo/attachments/notes.txt: -------------------------------------------------------------------------------- 1 | nodemail 2 | ======== 3 | 4 | 简易 web 邮箱 5 | 6 | ##相关链接 7 | [nodeMailer](https://github.com/andris9/Nodemailer) 8 | [simplesmtp](https://github.com/andris9/simplesmtp) 9 | [mailparser](https://github.com/andris9/mailparser) 10 | [node-email-templates](https://github.com/niftylettuce/node-email-templates) 11 | 12 | -------------------------------------------------------------------------------- /models/mail.js: -------------------------------------------------------------------------------- 1 | var mongoose = require('mongoose'); 2 | var Schema = mongoose.Schema; 3 | var ObjectId = Schema.ObjectId; 4 | 5 | var MailSchema = new Schema({ 6 | id: {type: String}, 7 | username: {type: String}, 8 | page: {type: Number}, 9 | data: {type: Object}, 10 | createAt: {type: Date, default: Date.now} 11 | }); 12 | 13 | mongoose.model('Mail', MailSchema); 14 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/themes/simple/langs/en.js: -------------------------------------------------------------------------------- 1 | tinyMCE.addI18n('en.simple',{"cleanup_desc":"Cleanup Messy Code","redo_desc":"Redo (Ctrl+Y)","undo_desc":"Undo (Ctrl+Z)","numlist_desc":"Insert/Remove Numbered List","bullist_desc":"Insert/Remove Bulleted List","striketrough_desc":"Strikethrough","underline_desc":"Underline (Ctrl+U)","italic_desc":"Italic (Ctrl+I)","bold_desc":"Bold (Ctrl+B)"}); -------------------------------------------------------------------------------- /views/sign/sidebar.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/template/blank.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | blank_page 4 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/template/css/template.css: -------------------------------------------------------------------------------- 1 | #frmbody { 2 | padding: 10px; 3 | background-color: #FFF; 4 | border: 1px solid #CCC; 5 | } 6 | 7 | .frmRow { 8 | margin-bottom: 10px; 9 | } 10 | 11 | #templatesrc { 12 | border: none; 13 | width: 320px; 14 | height: 240px; 15 | } 16 | 17 | .title { 18 | padding-bottom: 5px; 19 | } 20 | 21 | .mceActionPanel { 22 | padding-top: 5px; 23 | } 24 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/emotions/langs/en_dlg.js: -------------------------------------------------------------------------------- 1 | tinyMCE.addI18n('en.emotions_dlg',{cry:"Cry",cool:"Cool",desc:"Emotions",title:"Insert Emotion",usage:"Use left and right arrows to navigate.",yell:"Yell",wink:"Wink",undecided:"Undecided","tongue_out":"Tongue Out",surprised:"Surprised",smile:"Smile",sealed:"Sealed","money_mouth":"Money Mouth",laughing:"Laughing",kiss:"Kiss",innocent:"Innocent",frown:"Frown","foot_in_mouth":"Foot in Mouth",embarassed:"Embarassed"}); 2 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/table/css/row.css: -------------------------------------------------------------------------------- 1 | /* CSS file for row dialog in the table plugin */ 2 | 3 | .panel_wrapper div.current { 4 | height: 200px; 5 | } 6 | 7 | .advfield { 8 | width: 200px; 9 | } 10 | 11 | #action { 12 | margin-bottom: 3px; 13 | } 14 | 15 | #rowtype,#align,#valign,#class,#height { 16 | width: 150px; 17 | } 18 | 19 | #height { 20 | width: 50px; 21 | } 22 | 23 | .col2 { 24 | padding-left: 20px; 25 | } 26 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/searchreplace/langs/en_dlg.js: -------------------------------------------------------------------------------- 1 | tinyMCE.addI18n('en.searchreplace_dlg',{findwhat:"Find What",replacewith:"Replace with",direction:"Direction",up:"Up",down:"Down",mcase:"Match Case",findnext:"Find Next",allreplaced:"All occurrences of the search string were replaced.","searchnext_desc":"Find Again",notfound:"The search has been completed. The search string could not be found.","search_title":"Find","replace_title":"Find/Replace",replaceall:"Replace All",replace:"Replace"}); -------------------------------------------------------------------------------- /models/index.js: -------------------------------------------------------------------------------- 1 | var mongoose = require('mongoose'); 2 | var config = require('../config').config; 3 | 4 | mongoose.connect(config.db, function(err) { 5 | if (err) { 6 | console.error('connect to %s error: ', config.db, err.message); 7 | process.exit(1); 8 | } 9 | }); 10 | 11 | // models 12 | require('./mail'); 13 | //require('./user'); 14 | require('./temp'); 15 | 16 | exports.Mail = mongoose.model('Mail'); 17 | //exports.User = mongoose.model('User'); 18 | exports.Temp = mongoose.model('Temp'); 19 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/advlink/css/advlink.css: -------------------------------------------------------------------------------- 1 | .mceLinkList, .mceAnchorList, #targetlist {width:280px;} 2 | .mceActionPanel {margin-top:7px;} 3 | .panel_wrapper div.current {height:320px;} 4 | #classlist, #title, #href {width:280px;} 5 | #popupurl, #popupname {width:200px;} 6 | #popupwidth, #popupheight, #popupleft, #popuptop {width:30px;vertical-align:middle;text-align:center;} 7 | #id, #style, #classes, #target, #dir, #hreflang, #lang, #charset, #type, #rel, #rev, #tabindex, #accesskey {width:200px;} 8 | #events_panel input {width:200px;} 9 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/themes/simple/skins/o2k7/content.css: -------------------------------------------------------------------------------- 1 | body, td, pre {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} 2 | 3 | body {background: #FFF;} 4 | .mceVisualAid {border: 1px dashed #BBB;} 5 | 6 | /* IE */ 7 | 8 | * html body { 9 | scrollbar-3dlight-color: #F0F0EE; 10 | scrollbar-arrow-color: #676662; 11 | scrollbar-base-color: #F0F0EE; 12 | scrollbar-darkshadow-color: #DDDDDD; 13 | scrollbar-face-color: #E0E0DD; 14 | scrollbar-highlight-color: #F0F0EE; 15 | scrollbar-shadow-color: #F0F0EE; 16 | scrollbar-track-color: #F5F5F5; 17 | } 18 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/xhtmlxtras/css/popup.css: -------------------------------------------------------------------------------- 1 | input.field, select.field {width:200px;} 2 | input.picker {width:179px; margin-left: 5px;} 3 | input.disabled {border-color:#F2F2F2;} 4 | img.picker {vertical-align:text-bottom; cursor:pointer;} 5 | h1 {padding: 0 0 5px 0;} 6 | .panel_wrapper div.current {height:160px;} 7 | #xhtmlxtrasdel .panel_wrapper div.current, #xhtmlxtrasins .panel_wrapper div.current {height: 230px;} 8 | a.browse span {display:block; width:20px; height:20px; background:url('../../../themes/advanced/img/icons.gif') -140px -20px;} 9 | #datetime {width:180px;} 10 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | TESTS = test/*.js 2 | REPORTER = spec 3 | TIMEOUT = 10000 4 | NW_DIR = $HOME/apps/nw 5 | 6 | test: 7 | @NODE_ENV=test ./node_modules/mocha/bin/mocha \ 8 | --reporter $(REPORTER) \ 9 | --timeout $(TIMEOUT) \ 10 | $(TESTS) 11 | 12 | test-cov: 13 | @rm -rf ./lib-cov 14 | @$(MAKE) lib-cov 15 | @FAWAVE_DESKTOP_COV=1 $(MAKE) test REPORTER=html-cov > coverage.html 16 | 17 | lib-cov: 18 | @jscoverage lib $@ 19 | 20 | build-nw: 21 | zip -r ../${PWD##*/}.nw * 22 | 23 | build-win32: 24 | unzip 25 | 26 | dev: 27 | /Applications/node-webkit.app/Contents/MacOS/node-webkit ./ --developer 28 | 29 | .PHONY: test-cov test dev 30 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/template/langs/en_dlg.js: -------------------------------------------------------------------------------- 1 | tinyMCE.addI18n('en.template_dlg',{title:"Templates",label:"Template","desc_label":"Description",desc:"Insert Predefined Template Content",select:"Select a Template",preview:"Preview",warning:"Warning: Updating a template with a different one may cause data loss.","mdate_format":"%Y-%m-%d %H:%M:%S","cdate_format":"%Y-%m-%d %H:%M:%S","months_long":"January,February,March,April,May,June,July,August,September,October,November,December","months_short":"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec","day_long":"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday","day_short":"Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun"}); -------------------------------------------------------------------------------- /public/libs/tiny-mce/themes/simple/skins/default/content.css: -------------------------------------------------------------------------------- 1 | body, td, pre { 2 | font-family: Verdana, Arial, Helvetica, sans-serif; 3 | font-size: 10px; 4 | } 5 | 6 | body { 7 | background-color: #FFFFFF; 8 | } 9 | 10 | .mceVisualAid { 11 | border: 1px dashed #BBBBBB; 12 | } 13 | 14 | /* MSIE specific */ 15 | 16 | * html body { 17 | scrollbar-3dlight-color: #F0F0EE; 18 | scrollbar-arrow-color: #676662; 19 | scrollbar-base-color: #F0F0EE; 20 | scrollbar-darkshadow-color: #DDDDDD; 21 | scrollbar-face-color: #E0E0DD; 22 | scrollbar-highlight-color: #F0F0EE; 23 | scrollbar-shadow-color: #F0F0EE; 24 | scrollbar-track-color: #F5F5F5; 25 | } 26 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/xhtmlxtras/js/abbr.js: -------------------------------------------------------------------------------- 1 | /** 2 | * abbr.js 3 | * 4 | * Copyright 2009, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://tinymce.moxiecode.com/license 8 | * Contributing: http://tinymce.moxiecode.com/contributing 9 | */ 10 | 11 | function init() { 12 | SXE.initElementDialog('abbr'); 13 | if (SXE.currentAction == "update") { 14 | SXE.showRemoveButton(); 15 | } 16 | } 17 | 18 | function insertAbbr() { 19 | SXE.insertElement('abbr'); 20 | tinyMCEPopup.close(); 21 | } 22 | 23 | function removeAbbr() { 24 | SXE.removeElement('abbr'); 25 | tinyMCEPopup.close(); 26 | } 27 | 28 | tinyMCEPopup.onInit.add(init); 29 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/xhtmlxtras/js/cite.js: -------------------------------------------------------------------------------- 1 | /** 2 | * cite.js 3 | * 4 | * Copyright 2009, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://tinymce.moxiecode.com/license 8 | * Contributing: http://tinymce.moxiecode.com/contributing 9 | */ 10 | 11 | function init() { 12 | SXE.initElementDialog('cite'); 13 | if (SXE.currentAction == "update") { 14 | SXE.showRemoveButton(); 15 | } 16 | } 17 | 18 | function insertCite() { 19 | SXE.insertElement('cite'); 20 | tinyMCEPopup.close(); 21 | } 22 | 23 | function removeCite() { 24 | SXE.removeElement('cite'); 25 | tinyMCEPopup.close(); 26 | } 27 | 28 | tinyMCEPopup.onInit.add(init); 29 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/xhtmlxtras/js/acronym.js: -------------------------------------------------------------------------------- 1 | /** 2 | * acronym.js 3 | * 4 | * Copyright 2009, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://tinymce.moxiecode.com/license 8 | * Contributing: http://tinymce.moxiecode.com/contributing 9 | */ 10 | 11 | function init() { 12 | SXE.initElementDialog('acronym'); 13 | if (SXE.currentAction == "update") { 14 | SXE.showRemoveButton(); 15 | } 16 | } 17 | 18 | function insertAcronym() { 19 | SXE.insertElement('acronym'); 20 | tinyMCEPopup.close(); 21 | } 22 | 23 | function removeAcronym() { 24 | SXE.removeElement('acronym'); 25 | tinyMCEPopup.close(); 26 | } 27 | 28 | tinyMCEPopup.onInit.add(init); 29 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/example/js/dialog.js: -------------------------------------------------------------------------------- 1 | tinyMCEPopup.requireLangPack(); 2 | 3 | var ExampleDialog = { 4 | init : function() { 5 | var f = document.forms[0]; 6 | 7 | // Get the selected contents as text and place it in the input 8 | f.someval.value = tinyMCEPopup.editor.selection.getContent({format : 'text'}); 9 | f.somearg.value = tinyMCEPopup.getWindowArg('some_custom_arg'); 10 | }, 11 | 12 | insert : function() { 13 | // Insert the contents from the input into the document 14 | tinyMCEPopup.editor.execCommand('mceInsertContent', false, document.forms[0].someval.value); 15 | tinyMCEPopup.close(); 16 | } 17 | }; 18 | 19 | tinyMCEPopup.onInit.add(ExampleDialog.init, ExampleDialog); 20 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/table/js/merge_cells.js: -------------------------------------------------------------------------------- 1 | tinyMCEPopup.requireLangPack(); 2 | 3 | var MergeCellsDialog = { 4 | init : function() { 5 | var f = document.forms[0]; 6 | 7 | f.numcols.value = tinyMCEPopup.getWindowArg('cols', 1); 8 | f.numrows.value = tinyMCEPopup.getWindowArg('rows', 1); 9 | }, 10 | 11 | merge : function() { 12 | var func, f = document.forms[0]; 13 | 14 | tinyMCEPopup.restoreSelection(); 15 | 16 | func = tinyMCEPopup.getWindowArg('onaction'); 17 | 18 | func({ 19 | cols : f.numcols.value, 20 | rows : f.numrows.value 21 | }); 22 | 23 | tinyMCEPopup.close(); 24 | } 25 | }; 26 | 27 | tinyMCEPopup.onInit.add(MergeCellsDialog.init, MergeCellsDialog); 28 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/preview/preview.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 10 | {#preview.preview_desc} 11 | 12 | 13 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/advimage/css/advimage.css: -------------------------------------------------------------------------------- 1 | #src_list, #over_list, #out_list {width:280px;} 2 | .mceActionPanel {margin-top:7px;} 3 | .alignPreview {border:1px solid #000; width:140px; height:140px; overflow:hidden; padding:5px;} 4 | .checkbox {border:0;} 5 | .panel_wrapper div.current {height:305px;} 6 | #prev {margin:0; border:1px solid #000; width:428px; height:150px; overflow:auto;} 7 | #align, #classlist {width:150px;} 8 | #width, #height {vertical-align:middle; width:50px; text-align:center;} 9 | #vspace, #hspace, #border {vertical-align:middle; width:30px; text-align:center;} 10 | #class_list {width:180px;} 11 | input {width: 280px;} 12 | #constrain, #onmousemovecheck {width:auto;} 13 | #id, #dir, #lang, #usemap, #longdesc {width:200px;} 14 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/classes/util/JSONP.js: -------------------------------------------------------------------------------- 1 | /** 2 | * JSONP.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | tinymce.create('static tinymce.util.JSONP', { 12 | callbacks : {}, 13 | count : 0, 14 | 15 | send : function(o) { 16 | var t = this, dom = tinymce.DOM, count = o.count !== undefined ? o.count : t.count, id = 'tinymce_jsonp_' + count; 17 | 18 | t.callbacks[count] = function(json) { 19 | dom.remove(id); 20 | delete t.callbacks[count]; 21 | 22 | o.callback(json); 23 | }; 24 | 25 | dom.add(dom.doc.body, 'script', {id : id , src : o.url, type : 'text/javascript'}); 26 | t.count++; 27 | } 28 | }); 29 | -------------------------------------------------------------------------------- /demo/mailparser/demo2/mail-parser.js: -------------------------------------------------------------------------------- 1 | var MailParser = require("mailparser").MailParser, 2 | mailparser = new MailParser(); 3 | 4 | var email = "From: 'Sender Name' \r\n"+ 5 | "To: 'Receiver Name' \r\n"+ 6 | "Subject: Hello world!\r\n"+ 7 | "\r\n"+ 8 | "How are you today?"; 9 | 10 | // setup an event listener when the parsing finishes 11 | mailparser.on("end", function(mail_object){ 12 | console.log("From:", mail_object.from); //[{address:'sender@example.com',name:'Sender Name'}] 13 | console.log("Subject:", mail_object.subject); // Hello world! 14 | console.log("Text body:", mail_object.text); // How are you today? 15 | }); 16 | 17 | // send the email source to the parser 18 | mailparser.write(email); 19 | mailparser.end(); -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/preview/example.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 18 | Example of a custom preview page 19 | 20 | 21 | 22 | Editor contents:
23 |
24 | 25 |
26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/themes/advanced/skins/o2k7/ui_silver.css: -------------------------------------------------------------------------------- 1 | /* Silver */ 2 | .o2k7SkinSilver .mceToolbar .mceToolbarStart span, .o2k7SkinSilver .mceButton, .o2k7SkinSilver .mceSplitButton, .o2k7SkinSilver .mceSeparator, .o2k7SkinSilver .mceSplitButton a.mceOpen, .o2k7SkinSilver .mceListBox a.mceOpen {background-image:url(img/button_bg_silver.png)} 3 | .o2k7SkinSilver td.mceToolbar, .o2k7SkinSilver td.mceStatusbar, .o2k7SkinSilver .mceMenuItemTitle a {background:#eee} 4 | .o2k7SkinSilver .mceListBox .mceText {background:#FFF} 5 | .o2k7SkinSilver .mceExternalToolbar, .o2k7SkinSilver .mceListBox .mceText, .o2k7SkinSilver div.mceMenu, .o2k7SkinSilver table.mceLayout, .o2k7SkinSilver .mceMenuItemTitle a, .o2k7SkinSilver table.mceLayout tr.mceFirst td, .o2k7SkinSilver table.mceLayout, .o2k7SkinSilver .mceMenuItemTitle a, .o2k7SkinSilver table.mceLayout tr.mceLast td, .o2k7SkinSilver .mceIframeContainer {border-color: #bbb} 6 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/classes/util/VK.js: -------------------------------------------------------------------------------- 1 | /** 2 | * VK.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | /** 12 | * This file exposes a set of the common KeyCodes for use. Please grow it as needed. 13 | */ 14 | 15 | (function(tinymce){ 16 | tinymce.VK = { 17 | BACKSPACE: 8, 18 | DELETE: 46, 19 | DOWN: 40, 20 | ENTER: 13, 21 | LEFT: 37, 22 | RIGHT: 39, 23 | SPACEBAR: 32, 24 | TAB: 9, 25 | UP: 38, 26 | 27 | modifierPressed: function (e) { 28 | return e.shiftKey || e.ctrlKey || e.altKey; 29 | }, 30 | 31 | metaKeyPressed: function(e) { 32 | // Check if ctrl or meta key is pressed also check if alt is false for Polish users 33 | return tinymce.isMac ? e.metaKey : e.ctrlKey && !e.altKey; 34 | } 35 | }; 36 | })(tinymce); 37 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/paste/pasteword.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | {#paste.paste_word_desc} 4 | 5 | 6 | 7 | 8 |
9 |
{#paste.paste_word_desc}
10 | 11 |
{#paste_dlg.word_title}
12 | 13 |
14 | 15 |
16 | 17 | 18 |
19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/style/css/props.css: -------------------------------------------------------------------------------- 1 | #text_font {width:250px;} 2 | #text_size {width:70px;} 3 | .mceAddSelectValue {background:#DDD;} 4 | select, #block_text_indent, #box_width, #box_height, #box_padding_top, #box_padding_right, #box_padding_bottom, #box_padding_left {width:70px;} 5 | #box_margin_top, #box_margin_right, #box_margin_bottom, #box_margin_left, #positioning_width, #positioning_height, #positioning_zindex {width:70px;} 6 | #positioning_placement_top, #positioning_placement_right, #positioning_placement_bottom, #positioning_placement_left {width:70px;} 7 | #positioning_clip_top, #positioning_clip_right, #positioning_clip_bottom, #positioning_clip_left {width:70px;} 8 | .panel_toggle_insert_span {padding-top:10px;} 9 | .panel_wrapper div.current {padding-top:10px;height:230px;} 10 | .delim {border-left:1px solid gray;} 11 | .tdelim {border-bottom:1px solid gray;} 12 | #block_display {width:145px;} 13 | #list_type {width:115px;} 14 | .disabled {background:#EEE;} 15 | -------------------------------------------------------------------------------- /public/javascripts/inbox.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | 'use strict'; 3 | 4 | var inboxTpl = $('#inbox_tpl').html(); 5 | var sideItemTpl = $('#side_item_tpl').html(); 6 | 7 | function _getInbox() { 8 | $.getJSON('/ajax/mail/' + TAG + (BOX && ('/' + BOX) || '')).done(function(result) { 9 | // console.log(result); 10 | 11 | var context = result.data; 12 | 13 | Handlebars.registerHelper('dateFormat', function(date) { 14 | return moment(date).format('LL'); 15 | }); 16 | // Handlebars.registerHelper('fromFormat', function() { 17 | // return this.from[0].slice(this.from[0].indexOf('<') + 1, this.from[0].indexOf('>')); 18 | // }); 19 | 20 | $('#J_content').html(Handlebars.compile(inboxTpl)(context)); 21 | $('#J_side_list').html(Handlebars.compile(sideItemTpl)(context)); 22 | }); 23 | } 24 | 25 | function _getBoxes() { 26 | $.getJSON('/ajax/mail/boxes').done(function(result) { 27 | console.log(result); 28 | }); 29 | } 30 | 31 | _getInbox(); 32 | // _getBoxes(); 33 | }); 34 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/example/dialog.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {#example_dlg.title} 5 | 6 | 7 | 8 | 9 | 10 |
11 |

Here is a example dialog.

12 |

Selected text:

13 |

Custom arg:

14 | 15 |
16 | 17 | 18 |
19 |
20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/print/editor_plugin_src.js: -------------------------------------------------------------------------------- 1 | /** 2 | * editor_plugin_src.js 3 | * 4 | * Copyright 2009, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://tinymce.moxiecode.com/license 8 | * Contributing: http://tinymce.moxiecode.com/contributing 9 | */ 10 | 11 | (function() { 12 | tinymce.create('tinymce.plugins.Print', { 13 | init : function(ed, url) { 14 | ed.addCommand('mcePrint', function() { 15 | ed.getWin().print(); 16 | }); 17 | 18 | ed.addButton('print', {title : 'print.print_desc', cmd : 'mcePrint'}); 19 | }, 20 | 21 | getInfo : function() { 22 | return { 23 | longname : 'Print', 24 | author : 'Moxiecode Systems AB', 25 | authorurl : 'http://tinymce.moxiecode.com', 26 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/print', 27 | version : tinymce.majorVersion + "." + tinymce.minorVersion 28 | }; 29 | } 30 | }); 31 | 32 | // Register plugin 33 | tinymce.PluginManager.add('print', tinymce.plugins.Print); 34 | })(); 35 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/classes/adapter/prototype/adapter.js: -------------------------------------------------------------------------------- 1 | /** 2 | * adapter.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | // #ifdef prototype_adapter 12 | 13 | (function() { 14 | if (!window.Prototype) 15 | return alert("Load prototype first!"); 16 | 17 | // Patch in core NS functions 18 | tinymce.extend(tinymce, { 19 | trim : function(s) {return s ? s.strip() : '';}, 20 | inArray : function(a, v) {return a && a.indexOf ? a.indexOf(v) : -1;} 21 | }); 22 | 23 | // Patch in functions in various clases 24 | // Add a "#ifndefjquery" statement around each core API function you add below 25 | var patches = { 26 | 'tinymce.util.JSON' : { 27 | /*serialize : function(o) { 28 | return o.toJSON(); 29 | }*/ 30 | } 31 | }; 32 | 33 | // Patch functions after a class is created 34 | tinymce.onCreate = function(ty, c, p) { 35 | tinymce.extend(p, patches[c]); 36 | }; 37 | })(); 38 | 39 | // #endif 40 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/paste/js/pastetext.js: -------------------------------------------------------------------------------- 1 | tinyMCEPopup.requireLangPack(); 2 | 3 | var PasteTextDialog = { 4 | init : function() { 5 | this.resize(); 6 | }, 7 | 8 | insert : function() { 9 | var h = tinyMCEPopup.dom.encode(document.getElementById('content').value), lines; 10 | 11 | // Convert linebreaks into paragraphs 12 | if (document.getElementById('linebreaks').checked) { 13 | lines = h.split(/\r?\n/); 14 | if (lines.length > 1) { 15 | h = ''; 16 | tinymce.each(lines, function(row) { 17 | h += '

' + row + '

'; 18 | }); 19 | } 20 | } 21 | 22 | tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content : h}); 23 | tinyMCEPopup.close(); 24 | }, 25 | 26 | resize : function() { 27 | var vp = tinyMCEPopup.dom.getViewPort(window), el; 28 | 29 | el = document.getElementById('content'); 30 | 31 | el.style.width = (vp.w - 20) + 'px'; 32 | el.style.height = (vp.h - 90) + 'px'; 33 | } 34 | }; 35 | 36 | tinyMCEPopup.onInit.add(PasteTextDialog.init, PasteTextDialog); 37 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/xhtmlxtras/langs/en_dlg.js: -------------------------------------------------------------------------------- 1 | tinyMCE.addI18n('en.xhtmlxtras_dlg',{"attribs_title":"Insert/Edit Attributes","option_rtl":"Right to Left","option_ltr":"Left to Right","insert_date":"Insert Current Date/Time",remove:"Remove","title_cite_element":"Citation Element","title_abbr_element":"Abbreviation Element","title_acronym_element":"Acronym Element","title_del_element":"Deletion Element","title_ins_element":"Insertion Element","fieldset_events_tab":"Element Events","fieldset_attrib_tab":"Element Attributes","fieldset_general_tab":"General Settings","events_tab":"Events","attrib_tab":"Attributes","general_tab":"General","attribute_attrib_tab":"Attributes","attribute_events_tab":"Events","attribute_label_accesskey":"AccessKey","attribute_label_tabindex":"TabIndex","attribute_label_langcode":"Language","attribute_option_rtl":"Right to Left","attribute_option_ltr":"Left to Right","attribute_label_langdir":"Text Direction","attribute_label_datetime":"Date/Time","attribute_label_cite":"Cite","attribute_label_style":"Style","attribute_label_class":"Class","attribute_label_id":"ID","attribute_label_title":"Title"}); -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/style/readme.txt: -------------------------------------------------------------------------------- 1 | Edit CSS Style plug-in notes 2 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3 | Unlike WYSIWYG editor functionality that operates only on the selected text, 4 | typically by inserting new HTML elements with the specified styles. 5 | This plug-in operates on the HTML blocks surrounding the selected text. 6 | No new HTML elements are created. 7 | 8 | This plug-in only operates on the surrounding blocks and not the nearest 9 | parent node. This means that if a block encapsulates a node, 10 | e.g

text

, then only the styles in the block are 11 | recognized, not those in the span. 12 | 13 | When selecting text that includes multiple blocks at the same level (peers), 14 | this plug-in accumulates the specified styles in all of the surrounding blocks 15 | and populates the dialogue checkboxes accordingly. There is no differentiation 16 | between styles set in all the blocks versus styles set in some of the blocks. 17 | 18 | When the [Update] or [Apply] buttons are pressed, the styles selected in the 19 | checkboxes are applied to all blocks that surround the selected text. 20 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | ## License 2 | 3 | (The MIT License) 4 | 5 | Copyright (c) 2012 nomospace 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining 8 | a copy of this software and associated documentation files (the 9 | 'Software'), to deal in the Software without restriction, including 10 | without limitation the rights to use, copy, modify, merge, publish, 11 | distribute, sublicense, and/or sell copies of the Software, and to 12 | permit persons to whom the Software is furnished to do so, subject to 13 | the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be 16 | included in all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 19 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 21 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 23 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nodemail", 3 | "version": "0.1.7", 4 | "description": "A simple web-mail base on nodejs.", 5 | "author": "nomospace", 6 | "main": "index.html", 7 | "window": { 8 | "toolbar": false, 9 | "width": 900, 10 | "height": 600, 11 | "position": "center", 12 | "min_width": 900, 13 | "min_height": 600, 14 | "as_desktop": true 15 | }, 16 | "webkit": { 17 | "webgl-disabled": true 18 | }, 19 | "dependencies": { 20 | "ejs": "~0.8.2", 21 | "ejs-locals": "~0.2.5", 22 | "express": "~3.0.0rc5", 23 | "express-partials": "~0.0.6", 24 | "imap": "~0.5.2", 25 | "lru-cache": "~2.0.4", 26 | "mailparser": "~0.2.28", 27 | "markdown-js": "~0.0.3", 28 | "moment": "~1.7.0", 29 | "nodemailer": "~0.3.27", 30 | "validator": "~0.4.11", 31 | "mongoose": "~3.1.2", 32 | "toobusy": "~0.1.1" 33 | }, 34 | "devDependencies": {}, 35 | "scripts": { 36 | "test": "node test/index.js" 37 | }, 38 | "repository": { 39 | "type": "git", 40 | "url": "https://github.com/nomospace/nodemail.git" 41 | }, 42 | "keywords": [ 43 | "node", 44 | "mail", 45 | "express", 46 | "imap" 47 | ], 48 | "license": "BSD" 49 | } 50 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/themes/advanced/skins/highcontrast/content.css: -------------------------------------------------------------------------------- 1 | body, td, pre { margin:8px;} 2 | body.mceForceColors {background:#FFF; color:#000;} 3 | h1 {font-size: 2em} 4 | h2 {font-size: 1.5em} 5 | h3 {font-size: 1.17em} 6 | h4 {font-size: 1em} 7 | h5 {font-size: .83em} 8 | h6 {font-size: .75em} 9 | .mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;} 10 | a.mceItemAnchor {display:inline-block; width:11px !important; height:11px !important; background:url(../default/img/items.gif) no-repeat 0 0;} 11 | span.mceItemNbsp {background: #DDD} 12 | td.mceSelected, th.mceSelected {background-color:#3399ff !important} 13 | img {border:0;} 14 | table, img, hr, .mceItemAnchor {cursor:default} 15 | table td, table th {cursor:text} 16 | ins {border-bottom:1px solid green; text-decoration: none; color:green} 17 | del {color:red; text-decoration:line-through} 18 | cite {border-bottom:1px dashed blue} 19 | acronym {border-bottom:1px dotted #CCC; cursor:help} 20 | abbr {border-bottom:1px dashed #CCC; cursor:help} 21 | 22 | img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px} 23 | font[face=mceinline] {font-family:inherit !important} 24 | *[contentEditable]:focus {outline:0} 25 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/advimage/langs/en_dlg.js: -------------------------------------------------------------------------------- 1 | tinyMCE.addI18n('en.advimage_dlg',{"image_list":"Image List","align_right":"Right","align_left":"Left","align_textbottom":"Text Bottom","align_texttop":"Text Top","align_bottom":"Bottom","align_middle":"Middle","align_top":"Top","align_baseline":"Baseline",align:"Alignment",hspace:"Horizontal Space",vspace:"Vertical Space",dimensions:"Dimensions",border:"Border",list:"Image List",alt:"Image Description",src:"Image URL","dialog_title":"Insert/Edit Image","missing_alt":"Are you sure you want to continue without including an Image Description? Without it the image may not be accessible to some users with disabilities, or to those using a text browser, or browsing the Web with images turned off.","example_img":"Appearance Preview Image",misc:"Miscellaneous",mouseout:"For Mouse Out",mouseover:"For Mouse Over","alt_image":"Alternative Image","swap_image":"Swap Image",map:"Image Map",id:"ID",rtl:"Right to Left",ltr:"Left to Right",classes:"Classes",style:"Style","long_desc":"Long Description Link",langcode:"Language Code",langdir:"Language Direction","constrain_proportions":"Constrain Proportions",preview:"Preview",title:"Title",general:"General","tab_advanced":"Advanced","tab_appearance":"Appearance","tab_general":"General",width:"Width",height:"Height"}); -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/emotions/js/emotions.js: -------------------------------------------------------------------------------- 1 | tinyMCEPopup.requireLangPack(); 2 | 3 | var EmotionsDialog = { 4 | addKeyboardNavigation: function(){ 5 | var tableElm, cells, settings; 6 | 7 | cells = tinyMCEPopup.dom.select("a.emoticon_link", "emoticon_table"); 8 | 9 | settings ={ 10 | root: "emoticon_table", 11 | items: cells 12 | }; 13 | cells[0].tabindex=0; 14 | tinyMCEPopup.dom.addClass(cells[0], "mceFocus"); 15 | if (tinymce.isGecko) { 16 | cells[0].focus(); 17 | } else { 18 | setTimeout(function(){ 19 | cells[0].focus(); 20 | }, 100); 21 | } 22 | tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', settings, tinyMCEPopup.dom); 23 | }, 24 | init : function(ed) { 25 | tinyMCEPopup.resizeToInnerSize(); 26 | this.addKeyboardNavigation(); 27 | }, 28 | 29 | insert : function(file, title) { 30 | var ed = tinyMCEPopup.editor, dom = ed.dom; 31 | 32 | tinyMCEPopup.execCommand('mceInsertContent', false, dom.createHTML('img', { 33 | src : tinyMCEPopup.getWindowArg('plugin_url') + '/img/' + file, 34 | alt : ed.getLang(title), 35 | title : ed.getLang(title), 36 | border : 0 37 | })); 38 | 39 | tinyMCEPopup.close(); 40 | } 41 | }; 42 | 43 | tinyMCEPopup.onInit.add(EmotionsDialog.init, EmotionsDialog); 44 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/themes/advanced/anchor.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {#advanced_dlg.anchor_title} 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
{#advanced_dlg.anchor_title}
19 | 20 |
21 | 22 | 23 |
24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/paste/pastetext.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | {#paste.paste_text_desc} 4 | 5 | 6 | 7 | 8 |
9 |
{#paste.paste_text_desc}
10 | 11 |
12 | 13 |
14 | 15 |
16 | 17 |
{#paste_dlg.text_title}
18 | 19 | 20 | 21 |
22 | 23 | 24 |
25 |
26 | 27 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/classes/ui/Separator.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Separator.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | /** 12 | * This class is used to create vertical separator between other controls. 13 | * 14 | * @class tinymce.ui.Separator 15 | * @extends tinymce.ui.Control 16 | */ 17 | tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', { 18 | /** 19 | * Separator constructor. 20 | * 21 | * @constructor 22 | * @method Separator 23 | * @param {String} id Control id to use for the Separator. 24 | * @param {Object} s Optional name/value settings object. 25 | */ 26 | Separator : function(id, s) { 27 | this.parent(id, s); 28 | this.classPrefix = 'mceSeparator'; 29 | this.setDisabled(true); 30 | }, 31 | 32 | /** 33 | * Renders the separator as a HTML string. This method is much faster than using the DOM and when 34 | * creating a whole toolbar with buttons it does make a lot of difference. 35 | * 36 | * @method renderHTML 37 | * @return {String} HTML for the separator control element. 38 | */ 39 | renderHTML : function() { 40 | return tinymce.DOM.createHTML('span', {'class' : this.classPrefix, role : 'separator', 'aria-orientation' : 'vertical', tabindex : '-1'}); 41 | } 42 | }); 43 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/emotions/editor_plugin_src.js: -------------------------------------------------------------------------------- 1 | /** 2 | * editor_plugin_src.js 3 | * 4 | * Copyright 2009, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://tinymce.moxiecode.com/license 8 | * Contributing: http://tinymce.moxiecode.com/contributing 9 | */ 10 | 11 | (function(tinymce) { 12 | tinymce.create('tinymce.plugins.EmotionsPlugin', { 13 | init : function(ed, url) { 14 | // Register commands 15 | ed.addCommand('mceEmotion', function() { 16 | ed.windowManager.open({ 17 | file : url + '/emotions.htm', 18 | width : 250 + parseInt(ed.getLang('emotions.delta_width', 0)), 19 | height : 160 + parseInt(ed.getLang('emotions.delta_height', 0)), 20 | inline : 1 21 | }, { 22 | plugin_url : url 23 | }); 24 | }); 25 | 26 | // Register buttons 27 | ed.addButton('emotions', {title : 'emotions.emotions_desc', cmd : 'mceEmotion'}); 28 | }, 29 | 30 | getInfo : function() { 31 | return { 32 | longname : 'Emotions', 33 | author : 'Moxiecode Systems AB', 34 | authorurl : 'http://tinymce.moxiecode.com', 35 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/emotions', 36 | version : tinymce.majorVersion + "." + tinymce.minorVersion 37 | }; 38 | } 39 | }); 40 | 41 | // Register plugin 42 | tinymce.PluginManager.add('emotions', tinymce.plugins.EmotionsPlugin); 43 | })(tinymce); -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/media/css/media.css: -------------------------------------------------------------------------------- 1 | #id, #name, #hspace, #vspace, #class_name, #align { width: 100px } 2 | #hspace, #vspace { width: 50px } 3 | #flash_quality, #flash_align, #flash_scale, #flash_salign, #flash_wmode { width: 100px } 4 | #flash_base, #flash_flashvars, #html5_altsource1, #html5_altsource2, #html5_poster { width: 240px } 5 | #width, #height { width: 40px } 6 | #src, #media_type { width: 250px } 7 | #class { width: 120px } 8 | #prev { margin: 0; border: 1px solid black; width: 380px; height: 260px; overflow: auto } 9 | .panel_wrapper div.current { height: 420px; overflow: auto } 10 | #flash_options, #shockwave_options, #qt_options, #wmp_options, #rmp_options { display: none } 11 | .mceAddSelectValue { background-color: #DDDDDD } 12 | #qt_starttime, #qt_endtime, #qt_fov, #qt_href, #qt_moveid, #qt_moviename, #qt_node, #qt_pan, #qt_qtsrc, #qt_qtsrcchokespeed, #qt_target, #qt_tilt, #qt_urlsubstituten, #qt_volume { width: 70px } 13 | #wmp_balance, #wmp_baseurl, #wmp_captioningid, #wmp_currentmarker, #wmp_currentposition, #wmp_defaultframe, #wmp_playcount, #wmp_rate, #wmp_uimode, #wmp_volume { width: 70px } 14 | #rmp_console, #rmp_numloop, #rmp_controls, #rmp_scriptcallbacks { width: 70px } 15 | #shockwave_swvolume, #shockwave_swframe, #shockwave_swurl, #shockwave_swstretchvalign, #shockwave_swstretchhalign, #shockwave_swstretchstyle { width: 90px } 16 | #qt_qtsrc { width: 200px } 17 | iframe {border: 1px solid gray} 18 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/themes/advanced/source_editor.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | {#advanced_dlg.code_title} 4 | 5 | 6 | 7 | 8 |
9 |
10 | 11 |
12 | 13 |
14 | 15 |
16 | 17 | 18 | 19 |
20 | 21 | 22 |
23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /demo/imap.js: -------------------------------------------------------------------------------- 1 | var ImapConnection = require('imap').ImapConnection, 2 | util = require('util'), 3 | imap = new ImapConnection({ 4 | username: 'qatest2@163.com', 5 | password: 'qa1234', 6 | host: 'imap.163.com', 7 | port: 993, 8 | secure: true 9 | }); 10 | 11 | function die(err) { 12 | console.log('Uh oh: ' + err); 13 | process.exit(1); 14 | } 15 | 16 | var box, cmds, next = 0, 17 | cb = function(err) { 18 | if (err) die(err); 19 | else if (next < cmds.length) cmds[next++].apply(this, Array.prototype.slice.call(arguments).slice(1)); 20 | }; 21 | cmds = [ 22 | 23 | function() { 24 | imap.connect(cb); 25 | }, function() { 26 | imap.openBox('INBOX', false, cb); 27 | }, function(result) { 28 | box = result; 29 | imap.search(['SEEN', ['SINCE', 'August 15, 2012']], cb); 30 | }, function(results) { 31 | var fetch = imap.fetch(results, { 32 | request: { 33 | headers: ['from', 'to', 'subject', 'date'] 34 | } 35 | }); 36 | fetch.on('message', function(msg) { 37 | console.log('Got message: ' + util.inspect(msg, true, 5)); 38 | msg.on('data', function(chunk) { 39 | console.log('Got message chunk of size ' + chunk.length); 40 | }); 41 | msg.on('end', function() { 42 | console.log('Finished message: ' + util.inspect(msg, false, 5)); 43 | }); 44 | }); 45 | fetch.on('end', function() { 46 | console.log('Done fetching all messages!'); 47 | imap.logout(cb); 48 | }); 49 | } 50 | 51 | ]; 52 | cb(); -------------------------------------------------------------------------------- /views/sign/signin.html: -------------------------------------------------------------------------------- 1 | <%- include sidebar.html %> 2 | 3 |
4 |
5 |
6 | 9 |
10 |
11 |
12 |
13 | <% var error = error||'' %> 14 | <% if(error){ %> 15 |
16 | × 17 | <%= error %> 18 |
19 | <% } %> 20 |
21 |
22 | 23 |
24 | 25 |
26 |
27 |
28 | 29 |
30 | 31 |
32 |
33 | 34 |
35 | 36 |
37 |
38 |
39 |
40 |
41 | 42 | 43 | -------------------------------------------------------------------------------- /demo/mailparser/demo1/163.eml: -------------------------------------------------------------------------------- 1 | Received: from qatest4$163.com ( [61.172.240.227] ) by ajax-webmail-wmsvr30 2 | (Coremail) ; Mon, 3 Sep 2012 15:33:30 +0800 (CST) 3 | X-Originating-IP: [61.172.240.227] 4 | Date: Mon, 3 Sep 2012 15:33:30 +0800 (CST) 5 | From: qatest4 6 | To: qatest4@163.com 7 | Subject: titletitletitletitle 8 | X-Priority: 3 9 | X-Mailer: Coremail Webmail Server Version SP_ntes V3.5 build 10 | 20120727(19208.4800.4773) Copyright (c) 2002-2012 www.mailtech.cn 163com 11 | X-CM-CTRLDATA: ZT3mzGZvb3Rlcl9odG09MTM4Ojgx 12 | Content-Type: multipart/alternative; 13 | boundary="----=_Part_176988_730759733.1346657610324" 14 | MIME-Version: 1.0 15 | Message-ID: <78b14c7b.b572.1398b0c6a54.Coremail.qatest4@163.com> 16 | X-CM-TRANSID:HsGowGCZQEJKXURQ_34SAA--.2570W 17 | X-CM-SenderInfo: 5tdwv2jwu6il2tof0z/1tbiPRofvU9o1OXc9wABs5 18 | X-Coremail-Antispam: 1U5529EdanIXcx71UUUUU7vcSsGvfC2KfnxnUU== 19 | 20 | ------=_Part_176988_730759733.1346657610324 21 | Content-Type: text/plain; charset=GBK 22 | Content-Transfer-Encoding: 7bit 23 | 24 | contentcontentcontentcontentcontentcontentcontentcontent 25 | ------=_Part_176988_730759733.1346657610324 26 | Content-Type: text/html; charset=GBK 27 | Content-Transfer-Encoding: 7bit 28 | 29 |
contentcontentcontentcontentcontentcontentcontentcontent


30 | ------=_Part_176988_730759733.1346657610324-- -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/advhr/js/rule.js: -------------------------------------------------------------------------------- 1 | var AdvHRDialog = { 2 | init : function(ed) { 3 | var dom = ed.dom, f = document.forms[0], n = ed.selection.getNode(), w; 4 | 5 | w = dom.getAttrib(n, 'width'); 6 | f.width.value = w ? parseInt(w) : (dom.getStyle('width') || ''); 7 | f.size.value = dom.getAttrib(n, 'size') || parseInt(dom.getStyle('height')) || ''; 8 | f.noshade.checked = !!dom.getAttrib(n, 'noshade') || !!dom.getStyle('border-width'); 9 | selectByValue(f, 'width2', w.indexOf('%') != -1 ? '%' : 'px'); 10 | }, 11 | 12 | update : function() { 13 | var ed = tinyMCEPopup.editor, h, f = document.forms[0], st = ''; 14 | 15 | h = ' 2 |
3 |
4 | 5 | 6 |
7 | 14 | <%if(tag){%> 15 |
16 | 17 | 20 |
21 | <%}%> 22 |
23 | 28 | 29 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/xhtmlxtras/js/del.js: -------------------------------------------------------------------------------- 1 | /** 2 | * del.js 3 | * 4 | * Copyright 2009, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://tinymce.moxiecode.com/license 8 | * Contributing: http://tinymce.moxiecode.com/contributing 9 | */ 10 | 11 | function init() { 12 | SXE.initElementDialog('del'); 13 | if (SXE.currentAction == "update") { 14 | setFormValue('datetime', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'datetime')); 15 | setFormValue('cite', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'cite')); 16 | SXE.showRemoveButton(); 17 | } 18 | } 19 | 20 | function setElementAttribs(elm) { 21 | setAllCommonAttribs(elm); 22 | setAttrib(elm, 'datetime'); 23 | setAttrib(elm, 'cite'); 24 | elm.removeAttribute('data-mce-new'); 25 | } 26 | 27 | function insertDel() { 28 | var elm = tinyMCEPopup.editor.dom.getParent(SXE.focusElement, 'DEL'); 29 | 30 | if (elm == null) { 31 | var s = SXE.inst.selection.getContent(); 32 | if(s.length > 0) { 33 | insertInlineElement('del'); 34 | var elementArray = SXE.inst.dom.select('del[data-mce-new]'); 35 | for (var i=0; i 0) { 33 | insertInlineElement('ins'); 34 | var elementArray = SXE.inst.dom.select('ins[data-mce-new]'); 35 | for (var i=0; i 2 | 3 | {#template_dlg.title} 4 | 5 | 6 | 7 | 8 | 9 |
10 |
11 |
{#template_dlg.desc}
12 |
13 | 16 |
17 |
18 |
19 |
20 | {#template_dlg.preview} 21 | 22 |
23 |
24 | 25 |
26 | 27 | 28 |
29 |
30 | 31 | 32 | -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | var path = require('path'); 2 | var markdown = require('markdown-js'); 3 | var partials = require('express-partials'); 4 | var ejs = require('ejs'); 5 | var fs = require('fs'); 6 | var express = require('express'); 7 | var app = express(); 8 | var sign = require('./controllers/sign'); 9 | var config = require('./config').config; 10 | var routes = require('./routes'); 11 | var appRoot = './'; 12 | 13 | app.configure('development', function() { 14 | // View 默认的根目录为 viewsRoot 的值 15 | app.set('views', path.join(appRoot, 'views')); 16 | // View 引擎默认处理 html 后缀 17 | app.set('views engine', 'html'); 18 | // 启用 View 缓存(在开发阶段被关闭) 19 | app.set('view cache', false); 20 | app.engine('html', ejs.renderFile); 21 | app.engine('md', function(path, options, fn) { 22 | fs.readFile(path, 'utf8', function(err, str) { 23 | if (err) return fn(err); 24 | str = markdown.parse(str).toString(); 25 | fn(null, str); 26 | }); 27 | }); 28 | 29 | app.use(express.bodyParser()); 30 | app.use(express.cookieParser()); 31 | app.use(express.session({secret: config.sessionSecret})); 32 | app.use(sign.authUser); 33 | app.use(sign.toobusy); 34 | app.use(partials()); 35 | app.use(express.static(path.join(appRoot, 'public'))); 36 | // 在 HTML 页面中显示程序传递和抛出的异常 37 | app.use(express.errorHandler({dumpExceptions: true, showStack: true})); 38 | }); 39 | 40 | // set static, dynamic helpers 41 | // 为 layout.html 绑定数据 42 | app.locals({ 43 | config: config, 44 | csrf: function(req, res) { 45 | return req.session ? req.session._csrf : ''; 46 | } 47 | }); 48 | routes(app); 49 | app.listen(config.port); 50 | console.log(config.host + ':' + config.port); 51 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/advlink/langs/en_dlg.js: -------------------------------------------------------------------------------- 1 | tinyMCE.addI18n('en.advlink_dlg',{"target_name":"Target Name",classes:"Classes",style:"Style",id:"ID","popup_position":"Position (X/Y)",langdir:"Language Direction","popup_size":"Size","popup_dependent":"Dependent (Mozilla/Firefox Only)","popup_resizable":"Make Window Resizable","popup_location":"Show Location Bar","popup_menubar":"Show Menu Bar","popup_toolbar":"Show Toolbars","popup_statusbar":"Show Status Bar","popup_scrollbars":"Show Scrollbars","popup_return":"Insert \'return false\'","popup_name":"Window Name","popup_url":"Popup URL",popup:"JavaScript Popup","target_blank":"Open in New Window","target_top":"Open in Top Frame (Replaces All Frames)","target_parent":"Open in Parent Window/Frame","target_same":"Open in This Window/Frame","anchor_names":"Anchors","popup_opts":"Options","advanced_props":"Advanced Properties","event_props":"Events","popup_props":"Popup Properties","general_props":"General Properties","advanced_tab":"Advanced","events_tab":"Events","popup_tab":"Popup","general_tab":"General",list:"Link List","is_external":"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?","is_email":"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",titlefield:"Title",target:"Target",url:"Link URL",title:"Insert/Edit Link","link_list":"Link List",rtl:"Right to Left",ltr:"Left to Right",accesskey:"AccessKey",tabindex:"TabIndex",rev:"Relationship Target to Page",rel:"Relationship Page to Target",mime:"Target MIME Type",encoding:"Target Character Encoding",langcode:"Language Code","target_langcode":"Target Language",width:"Width",height:"Height"}); -------------------------------------------------------------------------------- /public/libs/tiny-mce/classes/firebug/FIREBUG.LICENSE: -------------------------------------------------------------------------------- 1 | Software License Agreement (BSD License) 2 | 3 | Copyright (c) 2007, Parakey Inc. 4 | All rights reserved. 5 | 6 | Redistribution and use of this software in source and binary forms, with or without modification, 7 | are permitted provided that the following conditions are met: 8 | 9 | * Redistributions of source code must retain the above 10 | copyright notice, this list of conditions and the 11 | following disclaimer. 12 | 13 | * Redistributions in binary form must reproduce the above 14 | copyright notice, this list of conditions and the 15 | following disclaimer in the documentation and/or other 16 | materials provided with the distribution. 17 | 18 | * Neither the name of Parakey Inc. nor the names of its 19 | contributors may be used to endorse or promote products 20 | derived from this software without specific prior 21 | written permission of Parakey Inc. 22 | 23 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 24 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 25 | FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 26 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 29 | IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 30 | OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/advhr/editor_plugin_src.js: -------------------------------------------------------------------------------- 1 | /** 2 | * editor_plugin_src.js 3 | * 4 | * Copyright 2009, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://tinymce.moxiecode.com/license 8 | * Contributing: http://tinymce.moxiecode.com/contributing 9 | */ 10 | 11 | (function() { 12 | tinymce.create('tinymce.plugins.AdvancedHRPlugin', { 13 | init : function(ed, url) { 14 | // Register commands 15 | ed.addCommand('mceAdvancedHr', function() { 16 | ed.windowManager.open({ 17 | file : url + '/rule.htm', 18 | width : 250 + parseInt(ed.getLang('advhr.delta_width', 0)), 19 | height : 160 + parseInt(ed.getLang('advhr.delta_height', 0)), 20 | inline : 1 21 | }, { 22 | plugin_url : url 23 | }); 24 | }); 25 | 26 | // Register buttons 27 | ed.addButton('advhr', { 28 | title : 'advhr.advhr_desc', 29 | cmd : 'mceAdvancedHr' 30 | }); 31 | 32 | ed.onNodeChange.add(function(ed, cm, n) { 33 | cm.setActive('advhr', n.nodeName == 'HR'); 34 | }); 35 | 36 | ed.onClick.add(function(ed, e) { 37 | e = e.target; 38 | 39 | if (e.nodeName === 'HR') 40 | ed.selection.select(e); 41 | }); 42 | }, 43 | 44 | getInfo : function() { 45 | return { 46 | longname : 'Advanced HR', 47 | author : 'Moxiecode Systems AB', 48 | authorurl : 'http://tinymce.moxiecode.com', 49 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advhr', 50 | version : tinymce.majorVersion + "." + tinymce.minorVersion 51 | }; 52 | } 53 | }); 54 | 55 | // Register plugin 56 | tinymce.PluginManager.add('advhr', tinymce.plugins.AdvancedHRPlugin); 57 | })(); -------------------------------------------------------------------------------- /public/libs/tiny-mce/themes/advanced/skins/o2k7/ui_black.css: -------------------------------------------------------------------------------- 1 | /* Black */ 2 | .o2k7SkinBlack .mceToolbar .mceToolbarStart span, .o2k7SkinBlack .mceToolbar .mceToolbarEnd span, .o2k7SkinBlack .mceButton, .o2k7SkinBlack .mceSplitButton, .o2k7SkinBlack .mceSeparator, .o2k7SkinBlack .mceSplitButton a.mceOpen, .o2k7SkinBlack .mceListBox a.mceOpen {background-image:url(img/button_bg_black.png)} 3 | .o2k7SkinBlack td.mceToolbar, .o2k7SkinBlack td.mceStatusbar, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack .mceMenuItemTitle span.mceText, .o2k7SkinBlack .mceStatusbar div, .o2k7SkinBlack .mceStatusbar span, .o2k7SkinBlack .mceStatusbar a {background:#535353; color:#FFF} 4 | .o2k7SkinBlack table.mceListBoxEnabled .mceText, o2k7SkinBlack .mceListBox .mceText {background:#FFF; border:1px solid #CBCFD4; border-bottom-color:#989FA9; border-right:0} 5 | .o2k7SkinBlack table.mceListBoxEnabled:hover .mceText, .o2k7SkinBlack .mceListBoxHover .mceText, .o2k7SkinBlack .mceListBoxSelected .mceText {background:#FFF; border:1px solid #FFBD69; border-right:0} 6 | .o2k7SkinBlack .mceExternalToolbar, .o2k7SkinBlack .mceListBox .mceText, .o2k7SkinBlack div.mceMenu, .o2k7SkinBlack table.mceLayout, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack table.mceLayout tr.mceFirst td, .o2k7SkinBlack table.mceLayout, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack table.mceLayout tr.mceLast td, .o2k7SkinBlack .mceIframeContainer {border-color: #535353;} 7 | .o2k7SkinBlack table.mceSplitButtonEnabled:hover a.mceAction, .o2k7SkinBlack .mceSplitButtonHover a.mceAction, .o2k7SkinBlack .mceSplitButtonSelected {background-image:url(img/button_bg_black.png)} 8 | .o2k7SkinBlack .mceMenu .mceMenuItemEnabled a:hover, .o2k7SkinBlack .mceMenu .mceMenuItemActive {background-color:#FFE7A1} -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/table/merge_cells.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {#table_dlg.merge_cells_title} 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 |
13 | {#table_dlg.merge_cells_title} 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
:
:
24 |
25 | 26 |
27 | 28 | 29 |
30 |
31 | 32 | 33 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/iespell/editor_plugin_src.js: -------------------------------------------------------------------------------- 1 | /** 2 | * editor_plugin_src.js 3 | * 4 | * Copyright 2009, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://tinymce.moxiecode.com/license 8 | * Contributing: http://tinymce.moxiecode.com/contributing 9 | */ 10 | 11 | (function() { 12 | tinymce.create('tinymce.plugins.IESpell', { 13 | init : function(ed, url) { 14 | var t = this, sp; 15 | 16 | if (!tinymce.isIE) 17 | return; 18 | 19 | t.editor = ed; 20 | 21 | // Register commands 22 | ed.addCommand('mceIESpell', function() { 23 | try { 24 | sp = new ActiveXObject("ieSpell.ieSpellExtension"); 25 | sp.CheckDocumentNode(ed.getDoc().documentElement); 26 | } catch (e) { 27 | if (e.number == -2146827859) { 28 | ed.windowManager.confirm(ed.getLang("iespell.download"), function(s) { 29 | if (s) 30 | window.open('http://www.iespell.com/download.php', 'ieSpellDownload', ''); 31 | }); 32 | } else 33 | ed.windowManager.alert("Error Loading ieSpell: Exception " + e.number); 34 | } 35 | }); 36 | 37 | // Register buttons 38 | ed.addButton('iespell', {title : 'iespell.iespell_desc', cmd : 'mceIESpell'}); 39 | }, 40 | 41 | getInfo : function() { 42 | return { 43 | longname : 'IESpell (IE Only)', 44 | author : 'Moxiecode Systems AB', 45 | authorurl : 'http://tinymce.moxiecode.com', 46 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/iespell', 47 | version : tinymce.majorVersion + "." + tinymce.minorVersion 48 | }; 49 | } 50 | }); 51 | 52 | // Register plugin 53 | tinymce.PluginManager.add('iespell', tinymce.plugins.IESpell); 54 | })(); -------------------------------------------------------------------------------- /public/libs/tiny-mce/themes/advanced/js/anchor.js: -------------------------------------------------------------------------------- 1 | tinyMCEPopup.requireLangPack(); 2 | 3 | var AnchorDialog = { 4 | init : function(ed) { 5 | var action, elm, f = document.forms[0]; 6 | 7 | this.editor = ed; 8 | elm = ed.dom.getParent(ed.selection.getNode(), 'A'); 9 | v = ed.dom.getAttrib(elm, 'name') || ed.dom.getAttrib(elm, 'id'); 10 | 11 | if (v) { 12 | this.action = 'update'; 13 | f.anchorName.value = v; 14 | } 15 | 16 | f.insert.value = ed.getLang(elm ? 'update' : 'insert'); 17 | }, 18 | 19 | update : function() { 20 | var ed = this.editor, elm, name = document.forms[0].anchorName.value, attribName; 21 | 22 | if (!name || !/^[a-z][a-z0-9\-\_:\.]*$/i.test(name)) { 23 | tinyMCEPopup.alert('advanced_dlg.anchor_invalid'); 24 | return; 25 | } 26 | 27 | tinyMCEPopup.restoreSelection(); 28 | 29 | if (this.action != 'update') 30 | ed.selection.collapse(1); 31 | 32 | var aRule = ed.schema.getElementRule('a'); 33 | if (!aRule || aRule.attributes.name) { 34 | attribName = 'name'; 35 | } else { 36 | attribName = 'id'; 37 | } 38 | 39 | elm = ed.dom.getParent(ed.selection.getNode(), 'A'); 40 | if (elm) { 41 | elm.setAttribute(attribName, name); 42 | elm[attribName] = name; 43 | ed.undoManager.add(); 44 | } else { 45 | // create with zero-sized nbsp so that in Webkit where anchor is on last line by itself caret cannot be placed after it 46 | var attrs = {'class' : 'mceItemAnchor'}; 47 | attrs[attribName] = name; 48 | ed.execCommand('mceInsertContent', 0, ed.dom.createHTML('a', attrs, '\uFEFF')); 49 | ed.nodeChanged(); 50 | } 51 | 52 | tinyMCEPopup.close(); 53 | } 54 | }; 55 | 56 | tinyMCEPopup.onInit.add(AnchorDialog.init, AnchorDialog); 57 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/nonbreaking/editor_plugin_src.js: -------------------------------------------------------------------------------- 1 | /** 2 | * editor_plugin_src.js 3 | * 4 | * Copyright 2009, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://tinymce.moxiecode.com/license 8 | * Contributing: http://tinymce.moxiecode.com/contributing 9 | */ 10 | 11 | (function() { 12 | tinymce.create('tinymce.plugins.Nonbreaking', { 13 | init : function(ed, url) { 14 | var t = this; 15 | 16 | t.editor = ed; 17 | 18 | // Register commands 19 | ed.addCommand('mceNonBreaking', function() { 20 | ed.execCommand('mceInsertContent', false, (ed.plugins.visualchars && ed.plugins.visualchars.state) ? ' ' : ' '); 21 | }); 22 | 23 | // Register buttons 24 | ed.addButton('nonbreaking', {title : 'nonbreaking.nonbreaking_desc', cmd : 'mceNonBreaking'}); 25 | 26 | if (ed.getParam('nonbreaking_force_tab')) { 27 | ed.onKeyDown.add(function(ed, e) { 28 | if (e.keyCode == 9) { 29 | e.preventDefault(); 30 | 31 | ed.execCommand('mceNonBreaking'); 32 | ed.execCommand('mceNonBreaking'); 33 | ed.execCommand('mceNonBreaking'); 34 | } 35 | }); 36 | } 37 | }, 38 | 39 | getInfo : function() { 40 | return { 41 | longname : 'Nonbreaking space', 42 | author : 'Moxiecode Systems AB', 43 | authorurl : 'http://tinymce.moxiecode.com', 44 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking', 45 | version : tinymce.majorVersion + "." + tinymce.minorVersion 46 | }; 47 | } 48 | 49 | // Private methods 50 | }); 51 | 52 | // Register plugin 53 | tinymce.PluginManager.add('nonbreaking', tinymce.plugins.Nonbreaking); 54 | })(); -------------------------------------------------------------------------------- /public/libs/tiny-mce/classes/LegacyInput.js: -------------------------------------------------------------------------------- 1 | /** 2 | * LegacyInput.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | tinymce.onAddEditor.add(function(tinymce, ed) { 12 | var filters, fontSizes, dom, settings = ed.settings; 13 | 14 | function replaceWithSpan(node, styles) { 15 | tinymce.each(styles, function(value, name) { 16 | if (value) 17 | dom.setStyle(node, name, value); 18 | }); 19 | 20 | dom.rename(node, 'span'); 21 | }; 22 | 23 | function convert(editor, params) { 24 | dom = editor.dom; 25 | 26 | if (settings.convert_fonts_to_spans) { 27 | tinymce.each(dom.select('font,u,strike', params.node), function(node) { 28 | filters[node.nodeName.toLowerCase()](ed.dom, node); 29 | }); 30 | } 31 | }; 32 | 33 | if (settings.inline_styles) { 34 | fontSizes = tinymce.explode(settings.font_size_legacy_values); 35 | 36 | filters = { 37 | font : function(dom, node) { 38 | replaceWithSpan(node, { 39 | backgroundColor : node.style.backgroundColor, 40 | color : node.color, 41 | fontFamily : node.face, 42 | fontSize : fontSizes[parseInt(node.size, 10) - 1] 43 | }); 44 | }, 45 | 46 | u : function(dom, node) { 47 | replaceWithSpan(node, { 48 | textDecoration : 'underline' 49 | }); 50 | }, 51 | 52 | strike : function(dom, node) { 53 | replaceWithSpan(node, { 54 | textDecoration : 'line-through' 55 | }); 56 | } 57 | }; 58 | 59 | ed.onPreProcess.add(convert); 60 | ed.onSetContent.add(convert); 61 | 62 | ed.onInit.add(function() { 63 | ed.selection.onSetContent.add(convert); 64 | }); 65 | } 66 | }); 67 | -------------------------------------------------------------------------------- /views/mail/list.html: -------------------------------------------------------------------------------- 1 | <%- include side.html %> 2 | <% var box=box||"" %> 3 |
4 | Retrieving... 5 |
6 | 7 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/preview/editor_plugin_src.js: -------------------------------------------------------------------------------- 1 | /** 2 | * editor_plugin_src.js 3 | * 4 | * Copyright 2009, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://tinymce.moxiecode.com/license 8 | * Contributing: http://tinymce.moxiecode.com/contributing 9 | */ 10 | 11 | (function() { 12 | tinymce.create('tinymce.plugins.Preview', { 13 | init : function(ed, url) { 14 | var t = this, css = tinymce.explode(ed.settings.content_css); 15 | 16 | t.editor = ed; 17 | 18 | // Force absolute CSS urls 19 | tinymce.each(css, function(u, k) { 20 | css[k] = ed.documentBaseURI.toAbsolute(u); 21 | }); 22 | 23 | ed.addCommand('mcePreview', function() { 24 | ed.windowManager.open({ 25 | file : ed.getParam("plugin_preview_pageurl", url + "/preview.html"), 26 | width : parseInt(ed.getParam("plugin_preview_width", "550")), 27 | height : parseInt(ed.getParam("plugin_preview_height", "600")), 28 | resizable : "yes", 29 | scrollbars : "yes", 30 | popup_css : css ? css.join(',') : ed.baseURI.toAbsolute("themes/" + ed.settings.theme + "/skins/" + ed.settings.skin + "/content.css"), 31 | inline : ed.getParam("plugin_preview_inline", 1) 32 | }, { 33 | base : ed.documentBaseURI.getURI() 34 | }); 35 | }); 36 | 37 | ed.addButton('preview', {title : 'preview.preview_desc', cmd : 'mcePreview'}); 38 | }, 39 | 40 | getInfo : function() { 41 | return { 42 | longname : 'Preview', 43 | author : 'Moxiecode Systems AB', 44 | authorurl : 'http://tinymce.moxiecode.com', 45 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/preview', 46 | version : tinymce.majorVersion + "." + tinymce.minorVersion 47 | }; 48 | } 49 | }); 50 | 51 | // Register plugin 52 | tinymce.PluginManager.add('preview', tinymce.plugins.Preview); 53 | })(); -------------------------------------------------------------------------------- /public/libs/tiny-mce/classes/dom/TreeWalker.js: -------------------------------------------------------------------------------- 1 | /** 2 | * TreeWalker.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | tinymce.dom.TreeWalker = function(start_node, root_node) { 12 | var node = start_node; 13 | 14 | function findSibling(node, start_name, sibling_name, shallow) { 15 | var sibling, parent; 16 | 17 | if (node) { 18 | // Walk into nodes if it has a start 19 | if (!shallow && node[start_name]) 20 | return node[start_name]; 21 | 22 | // Return the sibling if it has one 23 | if (node != root_node) { 24 | sibling = node[sibling_name]; 25 | if (sibling) 26 | return sibling; 27 | 28 | // Walk up the parents to look for siblings 29 | for (parent = node.parentNode; parent && parent != root_node; parent = parent.parentNode) { 30 | sibling = parent[sibling_name]; 31 | if (sibling) 32 | return sibling; 33 | } 34 | } 35 | } 36 | }; 37 | 38 | /** 39 | * Returns the current node. 40 | * 41 | * @return {Node} Current node where the walker is. 42 | */ 43 | this.current = function() { 44 | return node; 45 | }; 46 | 47 | /** 48 | * Walks to the next node in tree. 49 | * 50 | * @return {Node} Current node where the walker is after moving to the next node. 51 | */ 52 | this.next = function(shallow) { 53 | return (node = findSibling(node, 'firstChild', 'nextSibling', shallow)); 54 | }; 55 | 56 | /** 57 | * Walks to the previous node in tree. 58 | * 59 | * @return {Node} Current node where the walker is after moving to the previous node. 60 | */ 61 | this.prev = function(shallow) { 62 | return (node = findSibling(node, 'lastChild', 'previousSibling', shallow)); 63 | }; 64 | }; 65 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/paste/js/pasteword.js: -------------------------------------------------------------------------------- 1 | tinyMCEPopup.requireLangPack(); 2 | 3 | var PasteWordDialog = { 4 | init : function() { 5 | var ed = tinyMCEPopup.editor, el = document.getElementById('iframecontainer'), ifr, doc, css, cssHTML = ''; 6 | 7 | // Create iframe 8 | el.innerHTML = ''; 9 | ifr = document.getElementById('iframe'); 10 | doc = ifr.contentWindow.document; 11 | 12 | // Force absolute CSS urls 13 | css = [ed.baseURI.toAbsolute("themes/" + ed.settings.theme + "/skins/" + ed.settings.skin + "/content.css")]; 14 | css = css.concat(tinymce.explode(ed.settings.content_css) || []); 15 | tinymce.each(css, function(u) { 16 | cssHTML += ''; 17 | }); 18 | 19 | // Write content into iframe 20 | doc.open(); 21 | doc.write('' + cssHTML + ''); 22 | doc.close(); 23 | 24 | doc.designMode = 'on'; 25 | this.resize(); 26 | 27 | window.setTimeout(function() { 28 | ifr.contentWindow.focus(); 29 | }, 10); 30 | }, 31 | 32 | insert : function() { 33 | var h = document.getElementById('iframe').contentWindow.document.body.innerHTML; 34 | 35 | tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content : h, wordContent : true}); 36 | tinyMCEPopup.close(); 37 | }, 38 | 39 | resize : function() { 40 | var vp = tinyMCEPopup.dom.getViewPort(window), el; 41 | 42 | el = document.getElementById('iframe'); 43 | 44 | if (el) { 45 | el.style.width = (vp.w - 20) + 'px'; 46 | el.style.height = (vp.h - 90) + 'px'; 47 | } 48 | } 49 | }; 50 | 51 | tinyMCEPopup.onInit.add(PasteWordDialog.init, PasteWordDialog); 52 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/advlink/editor_plugin_src.js: -------------------------------------------------------------------------------- 1 | /** 2 | * editor_plugin_src.js 3 | * 4 | * Copyright 2009, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://tinymce.moxiecode.com/license 8 | * Contributing: http://tinymce.moxiecode.com/contributing 9 | */ 10 | 11 | (function() { 12 | tinymce.create('tinymce.plugins.AdvancedLinkPlugin', { 13 | init : function(ed, url) { 14 | this.editor = ed; 15 | 16 | // Register commands 17 | ed.addCommand('mceAdvLink', function() { 18 | var se = ed.selection; 19 | 20 | // No selection and not in link 21 | if (se.isCollapsed() && !ed.dom.getParent(se.getNode(), 'A')) 22 | return; 23 | 24 | ed.windowManager.open({ 25 | file : url + '/link.htm', 26 | width : 480 + parseInt(ed.getLang('advlink.delta_width', 0)), 27 | height : 400 + parseInt(ed.getLang('advlink.delta_height', 0)), 28 | inline : 1 29 | }, { 30 | plugin_url : url 31 | }); 32 | }); 33 | 34 | // Register buttons 35 | ed.addButton('link', { 36 | title : 'advlink.link_desc', 37 | cmd : 'mceAdvLink' 38 | }); 39 | 40 | ed.addShortcut('ctrl+k', 'advlink.advlink_desc', 'mceAdvLink'); 41 | 42 | ed.onNodeChange.add(function(ed, cm, n, co) { 43 | cm.setDisabled('link', co && n.nodeName != 'A'); 44 | cm.setActive('link', n.nodeName == 'A' && !n.name); 45 | }); 46 | }, 47 | 48 | getInfo : function() { 49 | return { 50 | longname : 'Advanced link', 51 | author : 'Moxiecode Systems AB', 52 | authorurl : 'http://tinymce.moxiecode.com', 53 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlink', 54 | version : tinymce.majorVersion + "." + tinymce.minorVersion 55 | }; 56 | } 57 | }); 58 | 59 | // Register plugin 60 | tinymce.PluginManager.add('advlink', tinymce.plugins.AdvancedLinkPlugin); 61 | })(); -------------------------------------------------------------------------------- /controllers/compose.js: -------------------------------------------------------------------------------- 1 | var moment = require('moment'); 2 | //var nodemailer = require('nodemailer'); 3 | var mailUtil = require('../libs/mail-util'); 4 | 5 | exports.index = function(req, res) { 6 | var id = req.params.id; 7 | if (id) { 8 | mailUtil.getMailById(id, function(mail) { 9 | res.locals({ 10 | 'id': id, 11 | 'tag': 'inbox', 12 | 'moment': moment, 13 | 'data': mail.data 14 | }); 15 | res.render('mail/compose.html'); 16 | }); 17 | } else { 18 | res.locals({ 19 | 'id': '', 20 | 'tag': '', 21 | 'moment': '', 22 | 'data': '' 23 | }); 24 | res.render('mail/compose.html'); 25 | } 26 | }; 27 | 28 | exports.send = function(req, res) { 29 | // npm usage http://cnodejs.org/topic/501cb7aff767cc9a51b14c1b 30 | // todo show-code http://isolasoftware.it/2012/05/28/call-rest-api-with-node-js/ 31 | // bug https://github.com/visionmedia/express/issues/1080 32 | // bug https://github.com/andris9/mailcomposer/issues/6 33 | // see https://github.com/visionmedia/express/wiki/Migrating-from-2.x-to-3.x 34 | // bugunfixed https://github.com/mscdex/node-imap/issues/88 35 | // console.log(req.body); 36 | var body = req.body, 37 | transport = mailUtil.createTransport(req), 38 | options = { 39 | 'from': body.from, 40 | 'to': body.to, 41 | 'cc': body.cc, 42 | 'subject': body.subject, 43 | 'text': body.text, 44 | 'html': body.html 45 | }; 46 | 47 | // console.log(body); 48 | 49 | transport.sendMail(options, function(error) { 50 | if (error) { 51 | res.json({ 52 | status: 'error', 53 | message: error.message 54 | }); 55 | } else { 56 | // if you don't want to use this transport object anymore, uncomment following line 57 | transport.close(); // close the connection pool 58 | res.json({ 59 | status: 'success' 60 | }); 61 | } 62 | }); 63 | }; 64 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/classes/ui/Container.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Container.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | /** 12 | * This class is the base class for all container controls like toolbars. This class should not 13 | * be instantiated directly other container controls should inherit from this one. 14 | * 15 | * @class tinymce.ui.Container 16 | * @extends tinymce.ui.Control 17 | */ 18 | tinymce.create('tinymce.ui.Container:tinymce.ui.Control', { 19 | /** 20 | * Base contrustor a new container control instance. 21 | * 22 | * @constructor 23 | * @method Container 24 | * @param {String} id Control id to use for the container. 25 | * @param {Object} s Optional name/value settings object. 26 | */ 27 | Container : function(id, s, editor) { 28 | this.parent(id, s, editor); 29 | 30 | /** 31 | * Array of controls added to the container. 32 | * 33 | * @property controls 34 | * @type Array 35 | */ 36 | this.controls = []; 37 | 38 | this.lookup = {}; 39 | }, 40 | 41 | /** 42 | * Adds a control to the collection of controls for the container. 43 | * 44 | * @method add 45 | * @param {tinymce.ui.Control} c Control instance to add to the container. 46 | * @return {tinymce.ui.Control} Same control instance that got passed in. 47 | */ 48 | add : function(c) { 49 | this.lookup[c.id] = c; 50 | this.controls.push(c); 51 | 52 | return c; 53 | }, 54 | 55 | /** 56 | * Returns a control by id from the containers collection. 57 | * 58 | * @method get 59 | * @param {String} n Id for the control to retrive. 60 | * @return {tinymce.ui.Control} Control instance by the specified name or undefined if it wasn't found. 61 | */ 62 | get : function(n) { 63 | return this.lookup[n]; 64 | } 65 | }); 66 | 67 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/themes/advanced/langs/en_dlg.js: -------------------------------------------------------------------------------- 1 | tinyMCE.addI18n('en.advanced_dlg', {"link_list":"Link List","link_is_external":"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?","link_is_email":"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?","link_titlefield":"Title","link_target_blank":"Open Link in a New Window","link_target_same":"Open Link in the Same Window","link_target":"Target","link_url":"Link URL","link_title":"Insert/Edit Link","image_align_right":"Right","image_align_left":"Left","image_align_textbottom":"Text Bottom","image_align_texttop":"Text Top","image_align_bottom":"Bottom","image_align_middle":"Middle","image_align_top":"Top","image_align_baseline":"Baseline","image_align":"Alignment","image_hspace":"Horizontal Space","image_vspace":"Vertical Space","image_dimensions":"Dimensions","image_alt":"Image Description","image_list":"Image List","image_border":"Border","image_src":"Image URL","image_title":"Insert/Edit Image","charmap_title":"Select Special Character", "charmap_usage":"Use left and right arrows to navigate.","colorpicker_name":"Name:","colorpicker_color":"Color:","colorpicker_named_title":"Named Colors","colorpicker_named_tab":"Named","colorpicker_palette_title":"Palette Colors","colorpicker_palette_tab":"Palette","colorpicker_picker_title":"Color Picker","colorpicker_picker_tab":"Picker","colorpicker_title":"Select a Color","code_wordwrap":"Word Wrap","code_title":"HTML Source Editor","anchor_name":"Anchor Name","anchor_title":"Insert/Edit Anchor","about_loaded":"Loaded Plugins","about_version":"Version","about_author":"Author","about_plugin":"Plugin","about_plugins":"Plugins","about_license":"License","about_help":"Help","about_general":"About","about_title":"About TinyMCE","anchor_invalid":"Please specify a valid anchor name.","accessibility_help":"Accessibility Help","accessibility_usage_title":"General Usage","invalid_color_value":"Invalid color value","":""}); 2 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/themes/advanced/shortcuts.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {#advanced_dlg.accessibility_help} 5 | 6 | 7 | 8 | 9 |

{#advanced_dlg.accessibility_usage_title}

10 |

Toolbars

11 |

Press ALT-F10 to move focus to the toolbars. Navigate through the buttons using the arrow keys. 12 | Press enter to activate a button and return focus to the editor. 13 | Press escape to return focus to the editor without performing any actions.

14 | 15 |

Status Bar

16 |

To access the editor status bar, press ALT-F11. Use the left and right arrow keys to navigate between elements in the path. 17 | Press enter or space to select an element. Press escape to return focus to the editor without changing the selection.

18 | 19 |

Context Menu

20 |

Press shift-F10 to activate the context menu. Use the up and down arrow keys to move between menu items. To open sub-menus press the right arrow key. 21 | To close submenus press the left arrow key. Press escape to close the context menu.

22 | 23 |

Keyboard Shortcuts

24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 |
KeystrokeFunction
Control-BBold
Control-IItalic
Control-ZUndo
Control-YRedo
46 | 47 | 48 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/visualblocks/editor_plugin_src.js: -------------------------------------------------------------------------------- 1 | /** 2 | * editor_plugin_src.js 3 | * 4 | * Copyright 2012, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://tinymce.moxiecode.com/license 8 | * Contributing: http://tinymce.moxiecode.com/contributing 9 | */ 10 | 11 | (function() { 12 | tinymce.create('tinymce.plugins.VisualBlocks', { 13 | init : function(ed, url) { 14 | var cssId; 15 | 16 | // We don't support older browsers like IE6/7 and they don't provide prototypes for DOM objects 17 | if (!window.NodeList) { 18 | return; 19 | } 20 | 21 | ed.addCommand('mceVisualBlocks', function() { 22 | var dom = ed.dom, linkElm; 23 | 24 | if (!cssId) { 25 | cssId = dom.uniqueId(); 26 | linkElm = dom.create('link', { 27 | id: cssId, 28 | rel : 'stylesheet', 29 | href : url + '/css/visualblocks.css' 30 | }); 31 | 32 | ed.getDoc().getElementsByTagName('head')[0].appendChild(linkElm); 33 | } else { 34 | linkElm = dom.get(cssId); 35 | linkElm.disabled = !linkElm.disabled; 36 | } 37 | 38 | ed.controlManager.setActive('visualblocks', !linkElm.disabled); 39 | }); 40 | 41 | ed.addButton('visualblocks', {title : 'visualblocks.desc', cmd : 'mceVisualBlocks'}); 42 | 43 | ed.onInit.add(function() { 44 | if (ed.settings.visualblocks_default_state) { 45 | ed.execCommand('mceVisualBlocks', false, null, {skip_focus : true}); 46 | } 47 | }); 48 | }, 49 | 50 | getInfo : function() { 51 | return { 52 | longname : 'Visual blocks', 53 | author : 'Moxiecode Systems AB', 54 | authorurl : 'http://tinymce.moxiecode.com', 55 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/visualblocks', 56 | version : tinymce.majorVersion + "." + tinymce.minorVersion 57 | }; 58 | } 59 | }); 60 | 61 | // Register plugin 62 | tinymce.PluginManager.add('visualblocks', tinymce.plugins.VisualBlocks); 63 | })(); -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/table/langs/en_dlg.js: -------------------------------------------------------------------------------- 1 | tinyMCE.addI18n('en.table_dlg',{"rules_border":"border","rules_box":"box","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"below","rules_above":"above","rules_void":"void",rules:"Rules","frame_all":"all","frame_cols":"cols","frame_rows":"rows","frame_groups":"groups","frame_none":"none",frame:"Frame",caption:"Table Caption","missing_scope":"Are you sure you want to continue without specifying a scope for this table header cell. Without it, it may be difficult for some users with disabilities to understand the content or data displayed of the table.","cell_limit":"You\'ve exceeded the maximum number of cells of {$cells}.","row_limit":"You\'ve exceeded the maximum number of rows of {$rows}.","col_limit":"You\'ve exceeded the maximum number of columns of {$cols}.",colgroup:"Col Group",rowgroup:"Row Group",scope:"Scope",tfoot:"Footer",tbody:"Body",thead:"Header","row_all":"Update All Rows in Table","row_even":"Update Even Rows in Table","row_odd":"Update Odd Rows in Table","row_row":"Update Current Row","cell_all":"Update All Cells in Table","cell_row":"Update All Cells in Row","cell_cell":"Update Current Cell",th:"Header",td:"Data",summary:"Summary",bgimage:"Background Image",rtl:"Right to Left",ltr:"Left to Right",mime:"Target MIME Type",langcode:"Language Code",langdir:"Language Direction",style:"Style",id:"ID","merge_cells_title":"Merge Table Cells",bgcolor:"Background Color",bordercolor:"Border Color","align_bottom":"Bottom","align_top":"Top",valign:"Vertical Alignment","cell_type":"Cell Type","cell_title":"Table Cell Properties","row_title":"Table Row Properties","align_middle":"Center","align_right":"Right","align_left":"Left","align_default":"Default",align:"Alignment",border:"Border",cellpadding:"Cell Padding",cellspacing:"Cell Spacing",rows:"Rows",cols:"Columns",height:"Height",width:"Width",title:"Insert/Edit Table",rowtype:"Row Type","advanced_props":"Advanced Properties","general_props":"General Properties","advanced_tab":"Advanced","general_tab":"General","cell_col":"Update all cells in column"}); -------------------------------------------------------------------------------- /public/libs/tiny-mce/themes/advanced/js/source_editor.js: -------------------------------------------------------------------------------- 1 | tinyMCEPopup.requireLangPack(); 2 | tinyMCEPopup.onInit.add(onLoadInit); 3 | 4 | function saveContent() { 5 | tinyMCEPopup.editor.setContent(document.getElementById('htmlSource').value, {source_view : true}); 6 | tinyMCEPopup.close(); 7 | } 8 | 9 | function onLoadInit() { 10 | tinyMCEPopup.resizeToInnerSize(); 11 | 12 | // Remove Gecko spellchecking 13 | if (tinymce.isGecko) 14 | document.body.spellcheck = tinyMCEPopup.editor.getParam("gecko_spellcheck"); 15 | 16 | document.getElementById('htmlSource').value = tinyMCEPopup.editor.getContent({source_view : true}); 17 | 18 | if (tinyMCEPopup.editor.getParam("theme_advanced_source_editor_wrap", true)) { 19 | turnWrapOn(); 20 | document.getElementById('wraped').checked = true; 21 | } 22 | 23 | resizeInputs(); 24 | } 25 | 26 | function setWrap(val) { 27 | var v, n, s = document.getElementById('htmlSource'); 28 | 29 | s.wrap = val; 30 | 31 | if (!tinymce.isIE) { 32 | v = s.value; 33 | n = s.cloneNode(false); 34 | n.setAttribute("wrap", val); 35 | s.parentNode.replaceChild(n, s); 36 | n.value = v; 37 | } 38 | } 39 | 40 | function setWhiteSpaceCss(value) { 41 | var el = document.getElementById('htmlSource'); 42 | tinymce.DOM.setStyle(el, 'white-space', value); 43 | } 44 | 45 | function turnWrapOff() { 46 | if (tinymce.isWebKit) { 47 | setWhiteSpaceCss('pre'); 48 | } else { 49 | setWrap('off'); 50 | } 51 | } 52 | 53 | function turnWrapOn() { 54 | if (tinymce.isWebKit) { 55 | setWhiteSpaceCss('pre-wrap'); 56 | } else { 57 | setWrap('soft'); 58 | } 59 | } 60 | 61 | function toggleWordWrap(elm) { 62 | if (elm.checked) { 63 | turnWrapOn(); 64 | } else { 65 | turnWrapOff(); 66 | } 67 | } 68 | 69 | function resizeInputs() { 70 | var vp = tinyMCEPopup.dom.getViewPort(window), el; 71 | 72 | el = document.getElementById('htmlSource'); 73 | 74 | if (el) { 75 | el.style.width = (vp.w - 20) + 'px'; 76 | el.style.height = (vp.h - 65) + 'px'; 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/example_dependency/editor_plugin_src.js: -------------------------------------------------------------------------------- 1 | /** 2 | * editor_plugin_src.js 3 | * 4 | * Copyright 2009, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://tinymce.moxiecode.com/license 8 | * Contributing: http://tinymce.moxiecode.com/contributing 9 | */ 10 | 11 | (function() { 12 | 13 | tinymce.create('tinymce.plugins.ExampleDependencyPlugin', { 14 | /** 15 | * Initializes the plugin, this will be executed after the plugin has been created. 16 | * This call is done before the editor instance has finished it's initialization so use the onInit event 17 | * of the editor instance to intercept that event. 18 | * 19 | * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in. 20 | * @param {string} url Absolute URL to where the plugin is located. 21 | */ 22 | init : function(ed, url) { 23 | }, 24 | 25 | 26 | /** 27 | * Returns information about the plugin as a name/value array. 28 | * The current keys are longname, author, authorurl, infourl and version. 29 | * 30 | * @return {Object} Name/value array containing information about the plugin. 31 | */ 32 | getInfo : function() { 33 | return { 34 | longname : 'Example Dependency plugin', 35 | author : 'Some author', 36 | authorurl : 'http://tinymce.moxiecode.com', 37 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example_dependency', 38 | version : "1.0" 39 | }; 40 | } 41 | }); 42 | 43 | /** 44 | * Register the plugin, specifying the list of the plugins that this plugin depends on. They are specified in a list, with the list loaded in order. 45 | * plugins in this list will be initialised when this plugin is initialized. (before the init method is called). 46 | * plugins in a depends list should typically be specified using the short name). If neccesary this can be done 47 | * with an object which has the url to the plugin and the shortname. 48 | */ 49 | tinymce.PluginManager.add('example_dependency', tinymce.plugins.ExampleDependencyPlugin, ['example']); 50 | })(); 51 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/searchreplace/editor_plugin_src.js: -------------------------------------------------------------------------------- 1 | /** 2 | * editor_plugin_src.js 3 | * 4 | * Copyright 2009, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://tinymce.moxiecode.com/license 8 | * Contributing: http://tinymce.moxiecode.com/contributing 9 | */ 10 | 11 | (function() { 12 | tinymce.create('tinymce.plugins.SearchReplacePlugin', { 13 | init : function(ed, url) { 14 | function open(m) { 15 | // Keep IE from writing out the f/r character to the editor 16 | // instance while initializing a new dialog. See: #3131190 17 | window.focus(); 18 | 19 | ed.windowManager.open({ 20 | file : url + '/searchreplace.htm', 21 | width : 420 + parseInt(ed.getLang('searchreplace.delta_width', 0)), 22 | height : 170 + parseInt(ed.getLang('searchreplace.delta_height', 0)), 23 | inline : 1, 24 | auto_focus : 0 25 | }, { 26 | mode : m, 27 | search_string : ed.selection.getContent({format : 'text'}), 28 | plugin_url : url 29 | }); 30 | }; 31 | 32 | // Register commands 33 | ed.addCommand('mceSearch', function() { 34 | open('search'); 35 | }); 36 | 37 | ed.addCommand('mceReplace', function() { 38 | open('replace'); 39 | }); 40 | 41 | // Register buttons 42 | ed.addButton('search', {title : 'searchreplace.search_desc', cmd : 'mceSearch'}); 43 | ed.addButton('replace', {title : 'searchreplace.replace_desc', cmd : 'mceReplace'}); 44 | 45 | ed.addShortcut('ctrl+f', 'searchreplace.search_desc', 'mceSearch'); 46 | }, 47 | 48 | getInfo : function() { 49 | return { 50 | longname : 'Search/Replace', 51 | author : 'Moxiecode Systems AB', 52 | authorurl : 'http://tinymce.moxiecode.com', 53 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/searchreplace', 54 | version : tinymce.majorVersion + "." + tinymce.minorVersion 55 | }; 56 | } 57 | }); 58 | 59 | // Register plugin 60 | tinymce.PluginManager.add('searchreplace', tinymce.plugins.SearchReplacePlugin); 61 | })(); -------------------------------------------------------------------------------- /views/mail/mail.html: -------------------------------------------------------------------------------- 1 | <%- include side.html %> 2 | 3 |
4 |
5 |
6 | 7 |
8 |
9 | 10 |
11 | 12 | 13 | 14 |
15 | 16 |
17 |
18 | 19 | 25 |
26 |
27 |
28 |
Subject<%=data.mail.headers.subject%>
29 |
From<%=data.mail.headers.from%>
30 |
To<%=data.mail.headers.to%>
31 | <%if(data.mail.headers.cc){%> 32 |
CC<%=data.mail.headers.cc%>
33 | <%}%> 34 |
Date<%=moment(data.mail.headers.date).format('LLLL')%>
35 | 36 | 37 | <%if(data.mail.attachments&&data.mail.attachments.length){%> 38 |
Attachments<%=data.mail.attachments.length%>个<%(data.mail.attachments.forEach(function(i){%> (<%=i.generatedFileName%> <%=i.length/1024%>k<%}))%>)
39 | <%}%> 40 |
41 | 42 |
43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/themes/simple/skins/default/ui.css: -------------------------------------------------------------------------------- 1 | /* Reset */ 2 | .defaultSimpleSkin table, .defaultSimpleSkin tbody, .defaultSimpleSkin a, .defaultSimpleSkin img, .defaultSimpleSkin tr, .defaultSimpleSkin div, .defaultSimpleSkin td, .defaultSimpleSkin iframe, .defaultSimpleSkin span, .defaultSimpleSkin * {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000} 3 | 4 | /* Containers */ 5 | .defaultSimpleSkin {position:relative} 6 | .defaultSimpleSkin table.mceLayout {background:#F0F0EE; border:1px solid #CCC;} 7 | .defaultSimpleSkin iframe {display:block; background:#FFF; border-bottom:1px solid #CCC;} 8 | .defaultSimpleSkin .mceToolbar {height:24px;} 9 | 10 | /* Layout */ 11 | .defaultSimpleSkin span.mceIcon, .defaultSimpleSkin img.mceIcon {display:block; width:20px; height:20px} 12 | .defaultSimpleSkin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px} 13 | 14 | /* Button */ 15 | .defaultSimpleSkin .mceButton {display:block; border:1px solid #F0F0EE; width:20px; height:20px} 16 | .defaultSimpleSkin a.mceButtonEnabled:hover {border:1px solid #0A246A; background-color:#B2BBD0} 17 | .defaultSimpleSkin a.mceButtonActive {border:1px solid #0A246A; background-color:#C2CBE0} 18 | .defaultSimpleSkin .mceButtonDisabled span {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} 19 | 20 | /* Separator */ 21 | .defaultSimpleSkin .mceSeparator {display:block; background:url(../../img/icons.gif) -180px 0; width:2px; height:20px; margin:0 2px 0 4px} 22 | 23 | /* Theme */ 24 | .defaultSimpleSkin span.mce_bold {background-position:0 0} 25 | .defaultSimpleSkin span.mce_italic {background-position:-60px 0} 26 | .defaultSimpleSkin span.mce_underline {background-position:-140px 0} 27 | .defaultSimpleSkin span.mce_strikethrough {background-position:-120px 0} 28 | .defaultSimpleSkin span.mce_undo {background-position:-160px 0} 29 | .defaultSimpleSkin span.mce_redo {background-position:-100px 0} 30 | .defaultSimpleSkin span.mce_cleanup {background-position:-40px 0} 31 | .defaultSimpleSkin span.mce_insertunorderedlist {background-position:-20px 0} 32 | .defaultSimpleSkin span.mce_insertorderedlist {background-position:-80px 0} 33 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/style/editor_plugin_src.js: -------------------------------------------------------------------------------- 1 | /** 2 | * editor_plugin_src.js 3 | * 4 | * Copyright 2009, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://tinymce.moxiecode.com/license 8 | * Contributing: http://tinymce.moxiecode.com/contributing 9 | */ 10 | 11 | (function() { 12 | tinymce.create('tinymce.plugins.StylePlugin', { 13 | init : function(ed, url) { 14 | // Register commands 15 | ed.addCommand('mceStyleProps', function() { 16 | 17 | var applyStyleToBlocks = false; 18 | var blocks = ed.selection.getSelectedBlocks(); 19 | var styles = []; 20 | 21 | if (blocks.length === 1) { 22 | styles.push(ed.selection.getNode().style.cssText); 23 | } 24 | else { 25 | tinymce.each(blocks, function(block) { 26 | styles.push(ed.dom.getAttrib(block, 'style')); 27 | }); 28 | applyStyleToBlocks = true; 29 | } 30 | 31 | ed.windowManager.open({ 32 | file : url + '/props.htm', 33 | width : 480 + parseInt(ed.getLang('style.delta_width', 0)), 34 | height : 340 + parseInt(ed.getLang('style.delta_height', 0)), 35 | inline : 1 36 | }, { 37 | applyStyleToBlocks : applyStyleToBlocks, 38 | plugin_url : url, 39 | styles : styles 40 | }); 41 | }); 42 | 43 | ed.addCommand('mceSetElementStyle', function(ui, v) { 44 | if (e = ed.selection.getNode()) { 45 | ed.dom.setAttrib(e, 'style', v); 46 | ed.execCommand('mceRepaint'); 47 | } 48 | }); 49 | 50 | ed.onNodeChange.add(function(ed, cm, n) { 51 | cm.setDisabled('styleprops', n.nodeName === 'BODY'); 52 | }); 53 | 54 | // Register buttons 55 | ed.addButton('styleprops', {title : 'style.desc', cmd : 'mceStyleProps'}); 56 | }, 57 | 58 | getInfo : function() { 59 | return { 60 | longname : 'Style', 61 | author : 'Moxiecode Systems AB', 62 | authorurl : 'http://tinymce.moxiecode.com', 63 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/style', 64 | version : tinymce.majorVersion + "." + tinymce.minorVersion 65 | }; 66 | } 67 | }); 68 | 69 | // Register plugin 70 | tinymce.PluginManager.add('style', tinymce.plugins.StylePlugin); 71 | })(); 72 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/fullpage/langs/en_dlg.js: -------------------------------------------------------------------------------- 1 | tinyMCE.addI18n('en.fullpage_dlg',{title:"Document Properties","meta_tab":"General","appearance_tab":"Appearance","advanced_tab":"Advanced","meta_props":"Meta Information",langprops:"Language and Encoding","meta_title":"Title","meta_keywords":"Keywords","meta_description":"Description","meta_robots":"Robots",doctypes:"Doctype",langcode:"Language Code",langdir:"Language Direction",ltr:"Left to Right",rtl:"Right to Left","xml_pi":"XML Declaration",encoding:"Character Encoding","appearance_bgprops":"Background Properties","appearance_marginprops":"Body Margins","appearance_linkprops":"Link Colors","appearance_textprops":"Text Properties",bgcolor:"Background Color",bgimage:"Background Image","left_margin":"Left Margin","right_margin":"Right Margin","top_margin":"Top Margin","bottom_margin":"Bottom Margin","text_color":"Text Color","font_size":"Font Size","font_face":"Font Face","link_color":"Link Color","hover_color":"Hover Color","visited_color":"Visited Color","active_color":"Active Color",textcolor:"Color",fontsize:"Font Size",fontface:"Font Family","meta_index_follow":"Index and Follow the Links","meta_index_nofollow":"Index and Don\'t Follow the Links","meta_noindex_follow":"Do Not Index but Follow the Links","meta_noindex_nofollow":"Do Not Index and Don\'t Follow the Links","appearance_style":"Stylesheet and Style Properties",stylesheet:"Stylesheet",style:"Style",author:"Author",copyright:"Copyright",add:"Add New Element",remove:"Remove Selected Element",moveup:"Move Selected Element Up",movedown:"Move Selected Element Down","head_elements":"Head Elements",info:"Information","add_title":"Title Element","add_meta":"Meta Element","add_script":"Script Element","add_style":"Style Element","add_link":"Link Element","add_base":"Base Element","add_comment":"Comment Node","title_element":"Title Element","script_element":"Script Element","style_element":"Style Element","base_element":"Base Element","link_element":"Link Element","meta_element":"Meta Element","comment_element":"Comment",src:"Source",language:"Language",href:"HREF",target:"Target",type:"Type",charset:"Charset",defer:"Defer",media:"Media",properties:"Properties",name:"Name",value:"Value",content:"Content",rel:"Rel",rev:"Rev",hreflang:"HREF Lang","general_props":"General","advanced_props":"Advanced"}); -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/media/js/embed.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This script contains embed functions for common plugins. This scripts are complety free to use for any purpose. 3 | */ 4 | 5 | function writeFlash(p) { 6 | writeEmbed( 7 | 'D27CDB6E-AE6D-11cf-96B8-444553540000', 8 | 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0', 9 | 'application/x-shockwave-flash', 10 | p 11 | ); 12 | } 13 | 14 | function writeShockWave(p) { 15 | writeEmbed( 16 | '166B1BCA-3F9C-11CF-8075-444553540000', 17 | 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0', 18 | 'application/x-director', 19 | p 20 | ); 21 | } 22 | 23 | function writeQuickTime(p) { 24 | writeEmbed( 25 | '02BF25D5-8C17-4B23-BC80-D3488ABDDC6B', 26 | 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0', 27 | 'video/quicktime', 28 | p 29 | ); 30 | } 31 | 32 | function writeRealMedia(p) { 33 | writeEmbed( 34 | 'CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA', 35 | 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0', 36 | 'audio/x-pn-realaudio-plugin', 37 | p 38 | ); 39 | } 40 | 41 | function writeWindowsMedia(p) { 42 | p.url = p.src; 43 | writeEmbed( 44 | '6BF52A52-394A-11D3-B153-00C04F79FAA6', 45 | 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701', 46 | 'application/x-mplayer2', 47 | p 48 | ); 49 | } 50 | 51 | function writeEmbed(cls, cb, mt, p) { 52 | var h = '', n; 53 | 54 | h += ''; 64 | 65 | h += ''; 64 | 65 | h += '', 22 | 23 | // Comma separated list of recipients 24 | to: '"jinlu" ', 25 | 26 | // Subject of the message 27 | subject: 'Hello nodemail!', 28 | 29 | headers: { 30 | 'X-Laziness-level': 1000 31 | }, 32 | 33 | // plaintext body 34 | text: 'Hello nodemail!', 35 | 36 | // HTML body 37 | html: '

Hello nodemail!

', 38 | 39 | // An array of attachments 40 | attachments: [ 41 | 42 | // String attachment 43 | { 44 | fileName: 'string.txt', 45 | contents: 'Some notes about this e-mail', 46 | contentType: 'text/plain' // optional, would be detected from the filename 47 | }, 48 | 49 | // File attachment 50 | { 51 | fileName: 'notes.txt', 52 | filePath: __dirname + '/attachments/notes.txt', 53 | }, 54 | 55 | // Binary Buffer attachment 56 | { 57 | fileName: 'image.png', 58 | contents: new Buffer('iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD/' + '//+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4U' + 'g9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC', 'base64'), 59 | cid: 'note@node' // should be as unique as possible 60 | }, 61 | 62 | // File Stream attachment 63 | { 64 | fileName: 'inspectocat.jpg', 65 | filePath: __dirname + '/attachments/inspectocat.jpg', 66 | cid: 'inspectocat@node' // should be as unique as possible 67 | }] 68 | }; 69 | 70 | console.log('Sending Mail'); 71 | 72 | transport.sendMail(message, function(error) { 73 | if (error) { 74 | console.log('Error occured'); 75 | console.log(error.message); 76 | return; 77 | } 78 | console.log('Message sent successfully!'); 79 | 80 | // if you don't want to use this transport object anymore, uncomment following line 81 | transport.close(); // close the connection pool 82 | }); -------------------------------------------------------------------------------- /public/libs/tiny-mce/classes/ui/MenuItem.js: -------------------------------------------------------------------------------- 1 | /** 2 | * MenuItem.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | (function(tinymce) { 12 | var is = tinymce.is, DOM = tinymce.DOM, each = tinymce.each, walk = tinymce.walk; 13 | 14 | /** 15 | * This class is base class for all menu item types like DropMenus items etc. This class should not 16 | * be instantiated directly other menu items should inherit from this one. 17 | * 18 | * @class tinymce.ui.MenuItem 19 | * @extends tinymce.ui.Control 20 | */ 21 | tinymce.create('tinymce.ui.MenuItem:tinymce.ui.Control', { 22 | /** 23 | * Constructs a new button control instance. 24 | * 25 | * @constructor 26 | * @method MenuItem 27 | * @param {String} id Button control id for the button. 28 | * @param {Object} s Optional name/value settings object. 29 | */ 30 | MenuItem : function(id, s) { 31 | this.parent(id, s); 32 | this.classPrefix = 'mceMenuItem'; 33 | }, 34 | 35 | /** 36 | * Sets the selected state for the control. This will add CSS classes to the 37 | * element that contains the control. So that it can be selected visually. 38 | * 39 | * @method setSelected 40 | * @param {Boolean} s Boolean state if the control should be selected or not. 41 | */ 42 | setSelected : function(s) { 43 | this.setState('Selected', s); 44 | this.setAriaProperty('checked', !!s); 45 | this.selected = s; 46 | }, 47 | 48 | /** 49 | * Returns true/false if the control is selected or not. 50 | * 51 | * @method isSelected 52 | * @return {Boolean} true/false if the control is selected or not. 53 | */ 54 | isSelected : function() { 55 | return this.selected; 56 | }, 57 | 58 | /** 59 | * Post render handler. This function will be called after the UI has been 60 | * rendered so that events can be added. 61 | * 62 | * @method postRender 63 | */ 64 | postRender : function() { 65 | var t = this; 66 | 67 | t.parent(); 68 | 69 | // Set pending state 70 | if (is(t.selected)) 71 | t.setSelected(t.selected); 72 | } 73 | }); 74 | })(tinymce); 75 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/themes/advanced/langs/en.js: -------------------------------------------------------------------------------- 1 | tinyMCE.addI18n('en.advanced',{"underline_desc":"Underline (Ctrl+U)","italic_desc":"Italic (Ctrl+I)","bold_desc":"Bold (Ctrl+B)",dd:"Definition Description",dt:"Definition Term ",samp:"Code Sample",code:"Code",blockquote:"Block Quote",h6:"Heading 6",h5:"Heading 5",h4:"Heading 4",h3:"Heading 3",h2:"Heading 2",h1:"Heading 1",pre:"Preformatted",address:"Address",div:"DIV",paragraph:"Paragraph",block:"Format",fontdefault:"Font Family","font_size":"Font Size","style_select":"Styles","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":"","more_colors":"More Colors...","toolbar_focus":"Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X",newdocument:"Are you sure you want clear all contents?",path:"Path","clipboard_msg":"Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?","blockquote_desc":"Block Quote","help_desc":"Help","newdocument_desc":"New Document","image_props_desc":"Image Properties","paste_desc":"Paste (Ctrl+V)","copy_desc":"Copy (Ctrl+C)","cut_desc":"Cut (Ctrl+X)","anchor_desc":"Insert/Edit Anchor","visualaid_desc":"show/Hide Guidelines/Invisible Elements","charmap_desc":"Insert Special Character","backcolor_desc":"Select Background Color","forecolor_desc":"Select Text Color","custom1_desc":"Your Custom Description Here","removeformat_desc":"Remove Formatting","hr_desc":"Insert Horizontal Line","sup_desc":"Superscript","sub_desc":"Subscript","code_desc":"Edit HTML Source","cleanup_desc":"Cleanup Messy Code","image_desc":"Insert/Edit Image","unlink_desc":"Unlink","link_desc":"Insert/Edit Link","redo_desc":"Redo (Ctrl+Y)","undo_desc":"Undo (Ctrl+Z)","indent_desc":"Increase Indent","outdent_desc":"Decrease Indent","numlist_desc":"Insert/Remove Numbered List","bullist_desc":"Insert/Remove Bulleted List","justifyfull_desc":"Align Full","justifyright_desc":"Align Right","justifycenter_desc":"Align Center","justifyleft_desc":"Align Left","striketrough_desc":"Strikethrough","help_shortcut":"Press ALT-F10 for toolbar. Press ALT-0 for help","rich_text_area":"Rich Text Area","shortcuts_desc":"Accessability Help",toolbar:"Toolbar"}); -------------------------------------------------------------------------------- /public/libs/tiny-mce/utils/editable_selects.js: -------------------------------------------------------------------------------- 1 | /** 2 | * editable_selects.js 3 | * 4 | * Copyright 2009, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://tinymce.moxiecode.com/license 8 | * Contributing: http://tinymce.moxiecode.com/contributing 9 | */ 10 | 11 | var TinyMCE_EditableSelects = { 12 | editSelectElm : null, 13 | 14 | init : function() { 15 | var nl = document.getElementsByTagName("select"), i, d = document, o; 16 | 17 | for (i=0; i', cls = 'mcePageBreak', sep = ed.getParam('pagebreak_separator', ''), pbRE; 15 | 16 | pbRE = new RegExp(sep.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g, function(a) {return '\\' + a;}), 'g'); 17 | 18 | // Register commands 19 | ed.addCommand('mcePageBreak', function() { 20 | ed.execCommand('mceInsertContent', 0, pb); 21 | }); 22 | 23 | // Register buttons 24 | ed.addButton('pagebreak', {title : 'pagebreak.desc', cmd : cls}); 25 | 26 | ed.onInit.add(function() { 27 | if (ed.theme.onResolveName) { 28 | ed.theme.onResolveName.add(function(th, o) { 29 | if (o.node.nodeName == 'IMG' && ed.dom.hasClass(o.node, cls)) 30 | o.name = 'pagebreak'; 31 | }); 32 | } 33 | }); 34 | 35 | ed.onClick.add(function(ed, e) { 36 | e = e.target; 37 | 38 | if (e.nodeName === 'IMG' && ed.dom.hasClass(e, cls)) 39 | ed.selection.select(e); 40 | }); 41 | 42 | ed.onNodeChange.add(function(ed, cm, n) { 43 | cm.setActive('pagebreak', n.nodeName === 'IMG' && ed.dom.hasClass(n, cls)); 44 | }); 45 | 46 | ed.onBeforeSetContent.add(function(ed, o) { 47 | o.content = o.content.replace(pbRE, pb); 48 | }); 49 | 50 | ed.onPostProcess.add(function(ed, o) { 51 | if (o.get) 52 | o.content = o.content.replace(/]+>/g, function(im) { 53 | if (im.indexOf('class="mcePageBreak') !== -1) 54 | im = sep; 55 | 56 | return im; 57 | }); 58 | }); 59 | }, 60 | 61 | getInfo : function() { 62 | return { 63 | longname : 'PageBreak', 64 | author : 'Moxiecode Systems AB', 65 | authorurl : 'http://tinymce.moxiecode.com', 66 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/pagebreak', 67 | version : tinymce.majorVersion + "." + tinymce.minorVersion 68 | }; 69 | } 70 | }); 71 | 72 | // Register plugin 73 | tinymce.PluginManager.add('pagebreak', tinymce.plugins.PageBreakPlugin); 74 | })(); -------------------------------------------------------------------------------- /public/libs/tiny-mce/classes/ui/ToolbarGroup.js: -------------------------------------------------------------------------------- 1 | /** 2 | * ToolbarGroup.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | (function(tinymce) { 12 | // Shorten class names 13 | var dom = tinymce.DOM, each = tinymce.each, Event = tinymce.dom.Event; 14 | /** 15 | * This class is used to group a set of toolbars together and control the keyboard navigation and focus. 16 | * 17 | * @class tinymce.ui.ToolbarGroup 18 | * @extends tinymce.ui.Container 19 | */ 20 | tinymce.create('tinymce.ui.ToolbarGroup:tinymce.ui.Container', { 21 | /** 22 | * Renders the toolbar group as a HTML string. 23 | * 24 | * @method renderHTML 25 | * @return {String} HTML for the toolbar control. 26 | */ 27 | renderHTML : function() { 28 | var t = this, h = [], controls = t.controls, each = tinymce.each, settings = t.settings; 29 | 30 | h.push('
'); 31 | //TODO: ACC test this out - adding a role = application for getting the landmarks working well. 32 | h.push(""); 33 | h.push(''); 34 | each(controls, function(toolbar) { 35 | h.push(toolbar.renderHTML()); 36 | }); 37 | h.push(""); 38 | h.push('
'); 39 | 40 | return h.join(''); 41 | }, 42 | 43 | focus : function() { 44 | var t = this; 45 | dom.get(t.id).focus(); 46 | }, 47 | 48 | postRender : function() { 49 | var t = this, items = []; 50 | 51 | each(t.controls, function(toolbar) { 52 | each (toolbar.controls, function(control) { 53 | if (control.id) { 54 | items.push(control); 55 | } 56 | }); 57 | }); 58 | 59 | t.keyNav = new tinymce.ui.KeyboardNavigation({ 60 | root: t.id, 61 | items: items, 62 | onCancel: function() { 63 | //Move focus if webkit so that navigation back will read the item. 64 | if (tinymce.isWebKit) { 65 | dom.get(t.editor.id+"_ifr").focus(); 66 | } 67 | t.editor.focus(); 68 | }, 69 | excludeFromTabOrder: !t.settings.tab_focus_toolbar 70 | }); 71 | }, 72 | 73 | destroy : function() { 74 | var self = this; 75 | 76 | self.parent(); 77 | self.keyNav.destroy(); 78 | Event.clear(self.id); 79 | } 80 | }); 81 | })(tinymce); 82 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/themes/advanced/charmap.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {#advanced_dlg.charmap_title} 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 27 | 28 | 29 | 48 | 49 | 50 | 51 | 52 | 53 |
15 | 16 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
 
 
26 |
30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 |
 
 
 
47 |
{#advanced_dlg.charmap_usage}
54 | 55 | 56 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/themes/advanced/js/about.js: -------------------------------------------------------------------------------- 1 | tinyMCEPopup.requireLangPack(); 2 | 3 | function init() { 4 | var ed, tcont; 5 | 6 | tinyMCEPopup.resizeToInnerSize(); 7 | ed = tinyMCEPopup.editor; 8 | 9 | // Give FF some time 10 | window.setTimeout(insertHelpIFrame, 10); 11 | 12 | tcont = document.getElementById('plugintablecontainer'); 13 | document.getElementById('plugins_tab').style.display = 'none'; 14 | 15 | var html = ""; 16 | html += ''; 17 | html += ''; 18 | html += ''; 19 | html += ''; 20 | html += ''; 21 | html += ''; 22 | html += ''; 23 | html += ''; 24 | html += ''; 25 | 26 | tinymce.each(ed.plugins, function(p, n) { 27 | var info; 28 | 29 | if (!p.getInfo) 30 | return; 31 | 32 | html += ''; 33 | 34 | info = p.getInfo(); 35 | 36 | if (info.infourl != null && info.infourl != '') 37 | html += ''; 38 | else 39 | html += ''; 40 | 41 | if (info.authorurl != null && info.authorurl != '') 42 | html += ''; 43 | else 44 | html += ''; 45 | 46 | html += ''; 47 | html += ''; 48 | 49 | document.getElementById('plugins_tab').style.display = ''; 50 | 51 | }); 52 | 53 | html += ''; 54 | html += '
' + ed.getLang('advanced_dlg.about_plugin') + '' + ed.getLang('advanced_dlg.about_author') + '' + ed.getLang('advanced_dlg.about_version') + '
' + info.longname + '' + info.longname + '' + info.author + '' + info.author + '' + info.version + '
'; 55 | 56 | tcont.innerHTML = html; 57 | 58 | tinyMCEPopup.dom.get('version').innerHTML = tinymce.majorVersion + "." + tinymce.minorVersion; 59 | tinyMCEPopup.dom.get('date').innerHTML = tinymce.releaseDate; 60 | } 61 | 62 | function insertHelpIFrame() { 63 | var html; 64 | 65 | if (tinyMCEPopup.getParam('docs_url')) { 66 | html = ''; 67 | document.getElementById('iframecontainer').innerHTML = html; 68 | document.getElementById('help_tab').style.display = 'block'; 69 | document.getElementById('help_tab').setAttribute("aria-hidden", "false"); 70 | } 71 | } 72 | 73 | tinyMCEPopup.onInit.add(init); 74 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | nodemail [![Build Status](https://secure.travis-ci.org/nomospace/nodemail.png)](http://travis-ci.org/nomospace/nodemail) 2 | ======== 3 | 4 | 基于 nodejs 的 web 邮箱 5 | 6 | 7 | ## 安装部署 8 | 9 | ```sh 10 | $ git clone https://github.com/nomospace/nodemail.git 11 | $ cd nodemail 12 | $ npm install 13 | $ node app.js 14 | ``` 15 | 或者 16 | ```sh 17 | // install node npm mongodb 18 | // run mongod 19 | $ npm install nodemail 20 | $ cd nodemail 21 | $ node app.js 22 | ``` 23 | 或者 24 | ```bash 25 | $ // 先安装 node-webkit https://github.com/rogerwang/node-webkit 26 | $ git clone https://github.com/nomospace/nodemail.git 27 | $ cd nodemail 28 | $ npm install 29 | $ make dev 30 | ``` 31 | 32 | 33 | 34 | ## Screenshot 35 | 36 | ![程序截图](https://raw.github.com/nomospace/nodemail/master/public/images/shot.png) 37 | ![程序截图](https://raw.github.com/nomospace/nodemail/master/public/images/shot2.png) 38 | 39 | ## Testing 40 | 41 | 42 | 43 | ## Reference 44 | [nodeMailer](https://github.com/andris9/Nodemailer) 45 | [node-imap](https://github.com/mscdex/node-imap) 46 | [simplesmtp](https://github.com/andris9/simplesmtp) 47 | [mailparser](https://github.com/andris9/mailparser) 48 | [node-email-templates](https://github.com/niftylettuce/node-email-templates) 49 | [node-webkit](https://github.com/rogerwang/node-webkit) 50 | 51 | 52 | ## License 53 | 54 | (The MIT License) 55 | 56 | Copyright (c) 2012 nomospace 57 | 58 | Permission is hereby granted, free of charge, to any person obtaining 59 | a copy of this software and associated documentation files (the 60 | 'Software'), to deal in the Software without restriction, including 61 | without limitation the rights to use, copy, modify, merge, publish, 62 | distribute, sublicense, and/or sell copies of the Software, and to 63 | permit persons to whom the Software is furnished to do so, subject to 64 | the following conditions: 65 | 66 | The above copyright notice and this permission notice shall be 67 | included in all copies or substantial portions of the Software. 68 | 69 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 70 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 71 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 72 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 73 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 74 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 75 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 76 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/themes/advanced/skins/o2k7/content.css: -------------------------------------------------------------------------------- 1 | body, td, pre {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;} 2 | body {background:#FFF;} 3 | body.mceForceColors {background:#FFF; color:#000;} 4 | h1 {font-size: 2em} 5 | h2 {font-size: 1.5em} 6 | h3 {font-size: 1.17em} 7 | h4 {font-size: 1em} 8 | h5 {font-size: .83em} 9 | h6 {font-size: .75em} 10 | .mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;} 11 | a.mceItemAnchor {display:inline-block; width:11px !important; height:11px !important; background:url(../default/img/items.gif) no-repeat 0 0;} 12 | span.mceItemNbsp {background: #DDD} 13 | td.mceSelected, th.mceSelected {background-color:#3399ff !important} 14 | img {border:0;} 15 | table, img, hr, .mceItemAnchor {cursor:default} 16 | table td, table th {cursor:text} 17 | ins {border-bottom:1px solid green; text-decoration: none; color:green} 18 | del {color:red; text-decoration:line-through} 19 | cite {border-bottom:1px dashed blue} 20 | acronym {border-bottom:1px dotted #CCC; cursor:help} 21 | abbr {border-bottom:1px dashed #CCC; cursor:help} 22 | 23 | /* IE */ 24 | * html body { 25 | scrollbar-3dlight-color:#F0F0EE; 26 | scrollbar-arrow-color:#676662; 27 | scrollbar-base-color:#F0F0EE; 28 | scrollbar-darkshadow-color:#DDD; 29 | scrollbar-face-color:#E0E0DD; 30 | scrollbar-highlight-color:#F0F0EE; 31 | scrollbar-shadow-color:#F0F0EE; 32 | scrollbar-track-color:#F5F5F5; 33 | } 34 | 35 | img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px} 36 | font[face=mceinline] {font-family:inherit !important} 37 | *[contentEditable]:focus {outline:0} 38 | 39 | .mceItemMedia {border:1px dotted #cc0000; background-position:center; background-repeat:no-repeat; background-color:#ffffcc} 40 | .mceItemShockWave {background-image:url(../../img/shockwave.gif)} 41 | .mceItemFlash {background-image:url(../../img/flash.gif)} 42 | .mceItemQuickTime {background-image:url(../../img/quicktime.gif)} 43 | .mceItemWindowsMedia {background-image:url(../../img/windowsmedia.gif)} 44 | .mceItemRealMedia {background-image:url(../../img/realmedia.gif)} 45 | .mceItemVideo {background-image:url(../../img/video.gif)} 46 | .mceItemAudio {background-image:url(../../img/video.gif)} 47 | .mceItemIframe {background-image:url(../../img/iframe.gif)} 48 | .mcePageBreak {display:block;border:0;width:100%;height:12px;border-top:1px dotted #ccc;margin-top:15px;background:#fff url(../../img/pagebreak.gif) no-repeat center top;} 49 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/classes/util/XHR.js: -------------------------------------------------------------------------------- 1 | /** 2 | * XHR.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | /** 12 | * This class enables you to send XMLHTTPRequests cross browser. 13 | * @class tinymce.util.XHR 14 | * @static 15 | * @example 16 | * // Sends a low level Ajax request 17 | * tinymce.util.XHR.send({ 18 | * url : 'someurl', 19 | * success : function(text) { 20 | * console.debug(text); 21 | * } 22 | * }); 23 | */ 24 | tinymce.create('static tinymce.util.XHR', { 25 | /** 26 | * Sends a XMLHTTPRequest. 27 | * Consult the Wiki for details on what settings this method takes. 28 | * 29 | * @method send 30 | * @param {Object} o Object will target URL, callbacks and other info needed to make the request. 31 | */ 32 | send : function(o) { 33 | var x, t, w = window, c = 0; 34 | 35 | function ready() { 36 | if (!o.async || x.readyState == 4 || c++ > 10000) { 37 | if (o.success && c < 10000 && x.status == 200) 38 | o.success.call(o.success_scope, '' + x.responseText, x, o); 39 | else if (o.error) 40 | o.error.call(o.error_scope, c > 10000 ? 'TIMED_OUT' : 'GENERAL', x, o); 41 | 42 | x = null; 43 | } else 44 | w.setTimeout(ready, 10); 45 | }; 46 | 47 | // Default settings 48 | o.scope = o.scope || this; 49 | o.success_scope = o.success_scope || o.scope; 50 | o.error_scope = o.error_scope || o.scope; 51 | o.async = o.async === false ? false : true; 52 | o.data = o.data || ''; 53 | 54 | function get(s) { 55 | x = 0; 56 | 57 | try { 58 | x = new ActiveXObject(s); 59 | } catch (ex) { 60 | } 61 | 62 | return x; 63 | }; 64 | 65 | x = w.XMLHttpRequest ? new XMLHttpRequest() : get('Microsoft.XMLHTTP') || get('Msxml2.XMLHTTP'); 66 | 67 | if (x) { 68 | if (x.overrideMimeType) 69 | x.overrideMimeType(o.content_type); 70 | 71 | x.open(o.type || (o.data ? 'POST' : 'GET'), o.url, o.async); 72 | 73 | if (o.content_type) 74 | x.setRequestHeader('Content-Type', o.content_type); 75 | 76 | x.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); 77 | 78 | x.send(o.data); 79 | 80 | // Syncronous request 81 | if (!o.async) 82 | return ready(); 83 | 84 | // Wait for response, onReadyStateChange can not be used since it leaks memory in IE 85 | t = w.setTimeout(ready, 10); 86 | } 87 | } 88 | }); 89 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/visualchars/editor_plugin_src.js: -------------------------------------------------------------------------------- 1 | /** 2 | * editor_plugin_src.js 3 | * 4 | * Copyright 2009, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://tinymce.moxiecode.com/license 8 | * Contributing: http://tinymce.moxiecode.com/contributing 9 | */ 10 | 11 | (function() { 12 | tinymce.create('tinymce.plugins.VisualChars', { 13 | init : function(ed, url) { 14 | var t = this; 15 | 16 | t.editor = ed; 17 | 18 | // Register commands 19 | ed.addCommand('mceVisualChars', t._toggleVisualChars, t); 20 | 21 | // Register buttons 22 | ed.addButton('visualchars', {title : 'visualchars.desc', cmd : 'mceVisualChars'}); 23 | 24 | ed.onBeforeGetContent.add(function(ed, o) { 25 | if (t.state && o.format != 'raw' && !o.draft) { 26 | t.state = true; 27 | t._toggleVisualChars(false); 28 | } 29 | }); 30 | }, 31 | 32 | getInfo : function() { 33 | return { 34 | longname : 'Visual characters', 35 | author : 'Moxiecode Systems AB', 36 | authorurl : 'http://tinymce.moxiecode.com', 37 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/visualchars', 38 | version : tinymce.majorVersion + "." + tinymce.minorVersion 39 | }; 40 | }, 41 | 42 | // Private methods 43 | 44 | _toggleVisualChars : function(bookmark) { 45 | var t = this, ed = t.editor, nl, i, h, d = ed.getDoc(), b = ed.getBody(), nv, s = ed.selection, bo, div, bm; 46 | 47 | t.state = !t.state; 48 | ed.controlManager.setActive('visualchars', t.state); 49 | 50 | if (bookmark) 51 | bm = s.getBookmark(); 52 | 53 | if (t.state) { 54 | nl = []; 55 | tinymce.walk(b, function(n) { 56 | if (n.nodeType == 3 && n.nodeValue && n.nodeValue.indexOf('\u00a0') != -1) 57 | nl.push(n); 58 | }, 'childNodes'); 59 | 60 | for (i = 0; i < nl.length; i++) { 61 | nv = nl[i].nodeValue; 62 | nv = nv.replace(/(\u00a0)/g, '$1'); 63 | 64 | div = ed.dom.create('div', null, nv); 65 | while (node = div.lastChild) 66 | ed.dom.insertAfter(node, nl[i]); 67 | 68 | ed.dom.remove(nl[i]); 69 | } 70 | } else { 71 | nl = ed.dom.select('span.mceItemNbsp', b); 72 | 73 | for (i = nl.length - 1; i >= 0; i--) 74 | ed.dom.remove(nl[i], 1); 75 | } 76 | 77 | s.moveToBookmark(bm); 78 | } 79 | }); 80 | 81 | // Register plugin 82 | tinymce.PluginManager.add('visualchars', tinymce.plugins.VisualChars); 83 | })(); -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/directionality/editor_plugin_src.js: -------------------------------------------------------------------------------- 1 | /** 2 | * editor_plugin_src.js 3 | * 4 | * Copyright 2009, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://tinymce.moxiecode.com/license 8 | * Contributing: http://tinymce.moxiecode.com/contributing 9 | */ 10 | 11 | (function() { 12 | tinymce.create('tinymce.plugins.Directionality', { 13 | init : function(ed, url) { 14 | var t = this; 15 | 16 | t.editor = ed; 17 | 18 | function setDir(dir) { 19 | var dom = ed.dom, curDir, blocks = ed.selection.getSelectedBlocks(); 20 | 21 | if (blocks.length) { 22 | curDir = dom.getAttrib(blocks[0], "dir"); 23 | 24 | tinymce.each(blocks, function(block) { 25 | // Add dir to block if the parent block doesn't already have that dir 26 | if (!dom.getParent(block.parentNode, "*[dir='" + dir + "']", dom.getRoot())) { 27 | if (curDir != dir) { 28 | dom.setAttrib(block, "dir", dir); 29 | } else { 30 | dom.setAttrib(block, "dir", null); 31 | } 32 | } 33 | }); 34 | 35 | ed.nodeChanged(); 36 | } 37 | } 38 | 39 | ed.addCommand('mceDirectionLTR', function() { 40 | setDir("ltr"); 41 | }); 42 | 43 | ed.addCommand('mceDirectionRTL', function() { 44 | setDir("rtl"); 45 | }); 46 | 47 | ed.addButton('ltr', {title : 'directionality.ltr_desc', cmd : 'mceDirectionLTR'}); 48 | ed.addButton('rtl', {title : 'directionality.rtl_desc', cmd : 'mceDirectionRTL'}); 49 | 50 | ed.onNodeChange.add(t._nodeChange, t); 51 | }, 52 | 53 | getInfo : function() { 54 | return { 55 | longname : 'Directionality', 56 | author : 'Moxiecode Systems AB', 57 | authorurl : 'http://tinymce.moxiecode.com', 58 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/directionality', 59 | version : tinymce.majorVersion + "." + tinymce.minorVersion 60 | }; 61 | }, 62 | 63 | // Private methods 64 | 65 | _nodeChange : function(ed, cm, n) { 66 | var dom = ed.dom, dir; 67 | 68 | n = dom.getParent(n, dom.isBlock); 69 | if (!n) { 70 | cm.setDisabled('ltr', 1); 71 | cm.setDisabled('rtl', 1); 72 | return; 73 | } 74 | 75 | dir = dom.getAttrib(n, 'dir'); 76 | cm.setActive('ltr', dir == "ltr"); 77 | cm.setDisabled('ltr', 0); 78 | cm.setActive('rtl', dir == "rtl"); 79 | cm.setDisabled('rtl', 0); 80 | } 81 | }); 82 | 83 | // Register plugin 84 | tinymce.PluginManager.add('directionality', tinymce.plugins.Directionality); 85 | })(); -------------------------------------------------------------------------------- /routes.js: -------------------------------------------------------------------------------- 1 | var index = require('./controllers/index'); 2 | var site = require('./controllers/site'); 3 | var sign = require('./controllers/sign'); 4 | var mail = require('./controllers/mail'); 5 | var inbox = require('./controllers/inbox'); 6 | var compose = require('./controllers/compose'); 7 | 8 | var express = require('express'); 9 | var path = require('path'); 10 | 11 | module.exports = function(app) { 12 | app.use(express.static(path.join(__dirname, 'public'))); 13 | 14 | app.all('*', function(req, res, next) { 15 | if (req.session.user) { 16 | return next(); 17 | } else if (/(^\/$|signin|signout|\/ajax\/mail\/index)/g.test(req.url)) { 18 | return next(); 19 | } 20 | 21 | return res.redirect('/signin'); 22 | }); 23 | 24 | // url routes 25 | app.get('/', site.index); 26 | app.get('/signin', sign.showSignin); 27 | app.get('/signout', sign.signout); 28 | app.post('/signin', sign.signin); 29 | app.get('/mail', mail.index); 30 | app.get('/mail/inbox', inbox.index); 31 | app.get('/mail/flagged', inbox.flagged); 32 | app.get('/mail/seen', inbox.seen); 33 | app.get('/mail/unseen', inbox.unseen); 34 | app.get('/mail/deleted', inbox.deleted); 35 | app.get('/mail/answered', inbox.answered); 36 | app.get('/mail/draft', inbox.draft); 37 | app.get('/mail/box/:box', inbox.box); 38 | app.get('/mail/inbox/page/:page', inbox.index); 39 | app.get('/mail/inbox/:id', inbox.getById); 40 | app.get('/mail/inbox/:id/html', inbox.getHtml); 41 | app.get('/mail/inbox/:id/compose', compose.index); 42 | app.get('/mail/compose', compose.index); 43 | 44 | // ajax 45 | app.get('/ajax/mail/index', index); 46 | app.get('/ajax/mail/inbox', inbox.getAll); 47 | app.get('/ajax/mail/flagged', inbox.getFlagged); 48 | app.get('/ajax/mail/seen', inbox.getSeen); 49 | app.get('/ajax/mail/unseen', inbox.getUnseen); 50 | app.get('/ajax/mail/deleted', inbox.getDeleted); 51 | app.get('/ajax/mail/answered', inbox.getAnswered); 52 | app.get('/ajax/mail/draft', inbox.getDraft); 53 | app.get('/ajax/mail/box/:box', inbox.getBoxMail); 54 | app.get('/ajax/mail/boxes', inbox.getBoxes); 55 | app.post('/ajax/mail/send', compose.send); 56 | app.post('/ajax/mail/:id/addFlags/:flag', inbox.addFlags); 57 | 58 | app.get('*', function(req, res) { 59 | res.render('index.html', {}); 60 | // throw new NotFound; 61 | }); 62 | 63 | }; 64 | 65 | //function NotFound(msg) { 66 | // this.name = 'NotFound'; 67 | // Error.call(this, msg); 68 | // Error.captureStackTrace(this, arguments.callee); 69 | //} 70 | // 71 | //NotFound.prototype.__proto__ = Error.prototype; 72 | -------------------------------------------------------------------------------- /views/mail/compose.html: -------------------------------------------------------------------------------- 1 | <%- include side.html %> 2 | 3 |
4 |
5 |
6 | 7 |
8 |
9 | 10 |
11 | 12 | 13 | 14 |
15 | 16 |
17 |
18 |
19 | <%if(data){%> 20 |
From<%=data.mail.headers.to%>
21 |
To
22 |
CC
23 |
Subject
24 | <%}else{%> 25 |
From
26 |
To
27 |
CC
28 |
Subject
29 | <%}%> 30 |

Attach file

31 |
32 | 40 |
41 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /public/javascripts/mail.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | 'use strict'; 3 | 4 | $('iframe').iframeAutoHeight(); 5 | $('#J_toolbar').stickyPanel({topPadding: 40, savePanelSpace: true}); 6 | 7 | var editor = 'J_editor'; 8 | if (window.tinyMCE) { 9 | tinyMCE.init({ 10 | // General options 11 | mode: "textareas", 12 | // theme: "simple", 13 | auto_focus: editor, 14 | plugins: "fullpage", 15 | width: "100%", 16 | oninit: function() { 17 | tinyMCE.get(editor).show(); 18 | } 19 | }); 20 | } 21 | 22 | // 发送 23 | var $body = $('body'), 24 | $delete = $('#J_delete'), 25 | $composeBody = $('#J_compose_body'), 26 | $send = $('#J_send'), 27 | $to = $('#J_to'), 28 | $cc = $('#J_cc'), 29 | $from = $('#J_from'), 30 | $subject = $('#J_subject'), 31 | $saveAsDraft = $('#J_saveas_draft'), 32 | $attachFile = $('#J_attach_file'); 33 | // $text = $('#J_text'), 34 | // $html = $('#J_html'); 35 | 36 | var attachItemTpl = $('#attach_item_tpl').html(); 37 | 38 | $send.click(function() { 39 | var html = tinyMCE.get(editor).getContent(), from; 40 | if ($composeBody.data('reply')) { 41 | from = $from.html(); 42 | } else { 43 | from = $from.val(); 44 | } 45 | 46 | var options = { 47 | 'to': $to.val() || $to.data('value'), 48 | 'cc': $cc.val() || $cc.data('value'), 49 | 'from': from, 50 | 'subject': $subject.val(), 51 | 'text': $(html).text(), 52 | 'html': html 53 | }; 54 | 55 | $.post('/ajax/mail/send', options, function(data) { 56 | alert(data.message || '邮件发送成功'); 57 | }); 58 | }); 59 | 60 | $delete.click(function() { 61 | $.post('/ajax/mail/' + ID + '/addFlags/deleted', function(data) { 62 | alert('邮件删除' + (data.success ? '成功' : '失败')); 63 | }); 64 | }); 65 | 66 | $saveAsDraft.click(function() { 67 | $.post('/ajax/mail/' + ID + '/addFlags/draft', function(data) { 68 | alert('邮件保存' + (data.success ? '成功' : '失败')); 69 | }); 70 | }); 71 | 72 | function imagesSelected(files) { 73 | for (var i = 0, f; f = files[i]; i++) { 74 | var reader = new FileReader(); 75 | reader.onload = (function(file) { 76 | return function(e) { 77 | // TODO 获取本地绝对路径 78 | console.log(file, e); 79 | $attachFile.after(Handlebars.compile(attachItemTpl)(file)); 80 | }; 81 | })(f); 82 | reader.readAsDataURL(f); 83 | } 84 | } 85 | 86 | $attachFile.change(function(e) { 87 | imagesSelected(e.target.files); 88 | }); 89 | 90 | $body.on('click', '.attach .icon-remove', function(e) { 91 | $(e.target).parent().remove(); 92 | }); 93 | }); 94 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/advhr/rule.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {#advhr.advhr_desc} 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 |
14 | 17 |
18 | 19 |
20 |
21 | 22 | 23 | 24 | 32 | 33 | 34 | 35 | 43 | 44 | 45 | 46 | 47 | 48 |
25 | 26 | 27 | 31 |
49 |
50 |
51 | 52 |
53 | 54 | 55 |
56 |
57 | 58 | 59 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/plugins/media/langs/en_dlg.js: -------------------------------------------------------------------------------- 1 | tinyMCE.addI18n('en.media_dlg',{list:"List",file:"File/URL",advanced:"Advanced",general:"General",title:"Insert/Edit Embedded Media","align_top_left":"Top Left","align_center":"Center","align_left":"Left","align_bottom":"Bottom","align_right":"Right","align_top":"Top","qt_stream_warn":"Streamed RTSP resources should be added to the QT Source field under the Advanced tab.\nYou should also add a non-streamed version to the Source field.",qtsrc:"QT Source",progress:"Progress",sound:"Sound",swstretchvalign:"Stretch V-Align",swstretchhalign:"Stretch H-Align",swstretchstyle:"Stretch Style",scriptcallbacks:"Script Callbacks","align_top_right":"Top Right",uimode:"UI Mode",rate:"Rate",playcount:"Play Count",defaultframe:"Default Frame",currentposition:"Current Position",currentmarker:"Current Marker",captioningid:"Captioning ID",baseurl:"Base URL",balance:"Balance",windowlessvideo:"Windowless Video",stretchtofit:"Stretch to Fit",mute:"Mute",invokeurls:"Invoke URLs",fullscreen:"Full Screen",enabled:"Enabled",autostart:"Auto Start",volume:"Volume",target:"Target",qtsrcchokespeed:"Choke Speed",href:"HREF",endtime:"End Time",starttime:"Start Time",enablejavascript:"Enable JavaScript",correction:"No Correction",targetcache:"Target Cache",playeveryframe:"Play Every Frame",kioskmode:"Kiosk Mode",controller:"Controller",menu:"Show Menu",loop:"Loop",play:"Auto Play",hspace:"H-Space",vspace:"V-Space","class_name":"Class",name:"Name",id:"ID",type:"Type",size:"Dimensions",preview:"Preview","constrain_proportions":"Constrain Proportions",controls:"Controls",numloop:"Num Loops",console:"Console",cache:"Cache",autohref:"Auto HREF",liveconnect:"SWLiveConnect",flashvars:"Flash Vars",base:"Base",bgcolor:"Background",wmode:"WMode",salign:"SAlign",align:"Align",scale:"Scale",quality:"Quality",shuffle:"Shuffle",prefetch:"Prefetch",nojava:"No Java",maintainaspect:"Maintain Aspect",imagestatus:"Image Status",center:"Center",autogotourl:"Auto Goto URL","shockwave_options":"Shockwave Options","rmp_options":"Real Media Player Options","wmp_options":"Windows Media Player Options","qt_options":"QuickTime Options","flash_options":"Flash Options",hidden:"Hidden","align_bottom_left":"Bottom Left","align_bottom_right":"Bottom Right","html5_video_options":"HTML5 Video Options",altsource1:"Alternative source 1",altsource2:"Alternative source 2",preload:"Preload",poster:"Poster",source:"Source","html5_audio_options":"Audio Options","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide", "embedded_audio_options":"Embedded Audio Options", video:"HTML5 Video", audio:"HTML5 Audio", flash:"Flash", quicktime:"QuickTime", shockwave:"Shockwave", windowsmedia:"Windows Media", realmedia:"Real Media", iframe:"Iframe", embeddedaudio:"Embedded Audio" }); 2 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/themes/advanced/skins/default/content.css: -------------------------------------------------------------------------------- 1 | body, td, pre {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;} 2 | body {background:#FFF;} 3 | body.mceForceColors {background:#FFF; color:#000;} 4 | body.mceBrowserDefaults {background:transparent; color:inherit; font-size:inherit; font-family:inherit;} 5 | h1 {font-size: 2em} 6 | h2 {font-size: 1.5em} 7 | h3 {font-size: 1.17em} 8 | h4 {font-size: 1em} 9 | h5 {font-size: .83em} 10 | h6 {font-size: .75em} 11 | .mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;} 12 | a.mceItemAnchor {display:inline-block; -webkit-user-select:all; -webkit-user-modify:read-only; -moz-user-select:all; -moz-user-modify:read-only; width:11px !important; height:11px !important; background:url(img/items.gif) no-repeat center center} 13 | span.mceItemNbsp {background: #DDD} 14 | td.mceSelected, th.mceSelected {background-color:#3399ff !important} 15 | img {border:0;} 16 | table, img, hr, .mceItemAnchor {cursor:default} 17 | table td, table th {cursor:text} 18 | ins {border-bottom:1px solid green; text-decoration: none; color:green} 19 | del {color:red; text-decoration:line-through} 20 | cite {border-bottom:1px dashed blue} 21 | acronym {border-bottom:1px dotted #CCC; cursor:help} 22 | abbr {border-bottom:1px dashed #CCC; cursor:help} 23 | 24 | /* IE */ 25 | * html body { 26 | scrollbar-3dlight-color:#F0F0EE; 27 | scrollbar-arrow-color:#676662; 28 | scrollbar-base-color:#F0F0EE; 29 | scrollbar-darkshadow-color:#DDD; 30 | scrollbar-face-color:#E0E0DD; 31 | scrollbar-highlight-color:#F0F0EE; 32 | scrollbar-shadow-color:#F0F0EE; 33 | scrollbar-track-color:#F5F5F5; 34 | } 35 | 36 | img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px} 37 | font[face=mceinline] {font-family:inherit !important} 38 | *[contentEditable]:focus {outline:0} 39 | 40 | .mceItemMedia {border:1px dotted #cc0000; background-position:center; background-repeat:no-repeat; background-color:#ffffcc} 41 | .mceItemShockWave {background-image:url(../../img/shockwave.gif)} 42 | .mceItemFlash {background-image:url(../../img/flash.gif)} 43 | .mceItemQuickTime {background-image:url(../../img/quicktime.gif)} 44 | .mceItemWindowsMedia {background-image:url(../../img/windowsmedia.gif)} 45 | .mceItemRealMedia {background-image:url(../../img/realmedia.gif)} 46 | .mceItemVideo {background-image:url(../../img/video.gif)} 47 | .mceItemAudio {background-image:url(../../img/video.gif)} 48 | .mceItemEmbeddedAudio {background-image:url(../../img/video.gif)} 49 | .mceItemIframe {background-image:url(../../img/iframe.gif)} 50 | .mcePageBreak {display:block;border:0;width:100%;height:12px;border-top:1px dotted #ccc;margin-top:15px;background:#fff url(../../img/pagebreak.gif) no-repeat center top;} 51 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/themes/advanced/link.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {#advanced_dlg.link_title} 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 |
14 | 17 |
18 | 19 |
20 |
21 | 22 | 23 | 24 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 |
25 | 26 | 27 | 28 | 29 |
 
48 |
49 |
50 | 51 |
52 | 53 | 54 |
55 |
56 | 57 | 58 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | ################# 3 | ## Eclipse 4 | ################# 5 | 6 | *.pydevproject 7 | .project 8 | .metadata 9 | bin/ 10 | tmp/ 11 | *.tmp 12 | *.bak 13 | *.swp 14 | *~.nib 15 | local.properties 16 | .classpath 17 | .settings/ 18 | .loadpath 19 | 20 | # External tool builders 21 | .externalToolBuilders/ 22 | 23 | # Locally stored "Eclipse launch configurations" 24 | *.launch 25 | 26 | # CDT-specific 27 | .cproject 28 | 29 | # PDT-specific 30 | .buildpath 31 | 32 | 33 | ################# 34 | ## Visual Studio 35 | ################# 36 | 37 | ## Ignore Visual Studio temporary files, build results, and 38 | ## files generated by popular Visual Studio add-ons. 39 | 40 | # User-specific files 41 | *.suo 42 | *.user 43 | *.sln.docstates 44 | 45 | # Build results 46 | [Dd]ebug/ 47 | [Rr]elease/ 48 | *_i.c 49 | *_p.c 50 | *.ilk 51 | *.meta 52 | *.obj 53 | *.pch 54 | *.pdb 55 | *.pgc 56 | *.pgd 57 | *.rsp 58 | *.sbr 59 | *.tlb 60 | *.tli 61 | *.tlh 62 | *.tmp 63 | *.vspscc 64 | .builds 65 | *.dotCover 66 | 67 | ## TODO: If you have NuGet Package Restore enabled, uncomment this 68 | #packages/ 69 | 70 | # Visual C++ cache files 71 | ipch/ 72 | *.aps 73 | *.ncb 74 | *.opensdf 75 | *.sdf 76 | 77 | # Visual Studio profiler 78 | *.psess 79 | *.vsp 80 | 81 | # ReSharper is a .NET coding add-in 82 | _ReSharper* 83 | 84 | # Installshield output folder 85 | [Ee]xpress 86 | 87 | # DocProject is a documentation generator add-in 88 | DocProject/buildhelp/ 89 | DocProject/Help/*.HxT 90 | DocProject/Help/*.HxC 91 | DocProject/Help/*.hhc 92 | DocProject/Help/*.hhk 93 | DocProject/Help/*.hhp 94 | DocProject/Help/Html2 95 | DocProject/Help/html 96 | 97 | # Click-Once directory 98 | publish 99 | 100 | # Others 101 | [Bb]in 102 | [Oo]bj 103 | sql 104 | TestResults 105 | *.Cache 106 | ClientBin 107 | stylecop.* 108 | ~$* 109 | *.dbmdl 110 | Generated_Code #added for RIA/Silverlight projects 111 | 112 | # Backup & report files from converting an old project file to a newer 113 | # Visual Studio version. Backup files are not needed, because we have git ;-) 114 | _UpgradeReport_Files/ 115 | Backup*/ 116 | UpgradeLog*.XML 117 | 118 | 119 | 120 | ############ 121 | ## Windows 122 | ############ 123 | 124 | # Windows image file caches 125 | Thumbs.db 126 | 127 | # Folder config file 128 | Desktop.ini 129 | 130 | 131 | ############# 132 | ## Python 133 | ############# 134 | 135 | *.py[co] 136 | 137 | # Packages 138 | *.egg 139 | *.egg-info 140 | dist 141 | build 142 | eggs 143 | parts 144 | bin 145 | var 146 | sdist 147 | develop-eggs 148 | .installed.cfg 149 | 150 | # Installer logs 151 | pip-log.txt 152 | 153 | # Unit test / coverage reports 154 | .coverage 155 | .tox 156 | 157 | #Translations 158 | *.mo 159 | 160 | #Mr Developer 161 | .mr.developer.cfg 162 | 163 | # Mac crap 164 | .DS_Store 165 | -------------------------------------------------------------------------------- /views/layout.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | <% 8 | var headers = config.site_headers || []; 9 | for (var i = 0, l = headers.length; i < l; i++) { 10 | %> 11 | <%- headers[i] %> 12 | <% } %> 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 22 | 23 | 24 | <% if (locals.topic) { %> 25 | <%= topic.title %> - <%= config.name %> 26 | <% } else { %> 27 | <%= config.description %> 28 | <% } %> 29 | 30 | 31 | 32 | 63 | 64 |
65 |
66 | <%- body %> 67 |
68 |
69 |
70 | 71 | 72 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/themes/advanced/about.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {#advanced_dlg.about_title} 5 | 6 | 7 | 8 | 9 | 10 | 17 | 18 |
19 |
20 |

{#advanced_dlg.about_title}

21 |

Version: ()

22 |

TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under LGPL 23 | by Moxiecode Systems AB. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances.

24 |

Copyright © 2003-2008, Moxiecode Systems AB, All rights reserved.

25 |

For more information about this software visit the TinyMCE website.

26 | 27 |
28 | Got Moxie? 29 |
30 |
31 | 32 |
33 |
34 |

{#advanced_dlg.about_loaded}

35 | 36 |
37 |
38 | 39 |

 

40 |
41 |
42 | 43 |
44 |
45 |
46 |
47 | 48 |
49 | 50 |
51 | 52 | 53 | -------------------------------------------------------------------------------- /public/libs/tiny-mce/classes/util/JSON.js: -------------------------------------------------------------------------------- 1 | /** 2 | * JSON.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | (function() { 12 | function serialize(o, quote) { 13 | var i, v, t, name; 14 | 15 | quote = quote || '"'; 16 | 17 | if (o == null) 18 | return 'null'; 19 | 20 | t = typeof o; 21 | 22 | if (t == 'string') { 23 | v = '\bb\tt\nn\ff\rr\""\'\'\\\\'; 24 | 25 | return quote + o.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g, function(a, b) { 26 | // Make sure single quotes never get encoded inside double quotes for JSON compatibility 27 | if (quote === '"' && a === "'") 28 | return a; 29 | 30 | i = v.indexOf(b); 31 | 32 | if (i + 1) 33 | return '\\' + v.charAt(i + 1); 34 | 35 | a = b.charCodeAt().toString(16); 36 | 37 | return '\\u' + '0000'.substring(a.length) + a; 38 | }) + quote; 39 | } 40 | 41 | if (t == 'object') { 42 | if (o.hasOwnProperty && Object.prototype.toString.call(o) === '[object Array]') { 43 | for (i=0, v = '['; i 0 ? ',' : '') + serialize(o[i], quote); 45 | 46 | return v + ']'; 47 | } 48 | 49 | v = '{'; 50 | 51 | for (name in o) { 52 | if (o.hasOwnProperty(name)) { 53 | v += typeof o[name] != 'function' ? (v.length > 1 ? ',' + quote : quote) + name + quote +':' + serialize(o[name], quote) : ''; 54 | } 55 | } 56 | 57 | return v + '}'; 58 | } 59 | 60 | return '' + o; 61 | }; 62 | 63 | /** 64 | * JSON parser and serializer class. 65 | * 66 | * @class tinymce.util.JSON 67 | * @static 68 | * @example 69 | * // JSON parse a string into an object 70 | * var obj = tinymce.util.JSON.parse(somestring); 71 | * 72 | * // JSON serialize a object into an string 73 | * var str = tinymce.util.JSON.serialize(obj); 74 | */ 75 | tinymce.util.JSON = { 76 | /** 77 | * Serializes the specified object as a JSON string. 78 | * 79 | * @method serialize 80 | * @param {Object} obj Object to serialize as a JSON string. 81 | * @param {String} quote Optional quote string defaults to ". 82 | * @return {string} JSON string serialized from input. 83 | */ 84 | serialize: serialize, 85 | 86 | /** 87 | * Unserializes/parses the specified JSON string into a object. 88 | * 89 | * @method parse 90 | * @param {string} s JSON String to parse into a JavaScript object. 91 | * @return {Object} Object from input JSON string or undefined if it failed. 92 | */ 93 | parse: function(s) { 94 | try { 95 | return eval('(' + s + ')'); 96 | } catch (ex) { 97 | // Ignore 98 | } 99 | } 100 | 101 | /**#@-*/ 102 | }; 103 | })(); 104 | --------------------------------------------------------------------------------