Commit fcb34983 authored by Eric Rasmussen's avatar Eric Rasmussen
Browse files

Add Grid button and mark Column layout as deprecated

parent 3e248619
......@@ -47,7 +47,7 @@ WDN.loadJS("jquery.tinymce.js",function () {
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,|,unlZenBox,unlLayout,unlTooltip,unlTabs",
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,|,unlZenBox,unlLayout,unlGrid,unlTooltip,unlTabs",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
......
No preview for this file type
......@@ -274,6 +274,19 @@ Unl.hasParentNodeWithClass = function(childNode, parentClass) {
ed.selection.setContent('<table class="zentable neutral"><thead><tr><th colspan="3">zentable neutral</th></tr></thead><tbody><tr><td>row1 col1</td><td>row1 col2</td><td>row1 col3</td></tr><tr><td>row2 col1</td><td>row2 col2</td><td>row2 col3</td></tr></tbody></table>');
});
// WDN Grid http://wdn.unl.edu/documentation/layouts.shtml
ed.addCommand('mceUnlGrid', function() {
ed.windowManager.open({
file : url + '/grid.htm',
width : 350 + parseInt(ed.getLang('xhtmlxtras.abbr_delta_width', 0)),
height : 250,
inline : 1
}, {
plugin_url : url
});
});
ed.addButton('unlGrid', {title : 'Add Grid Layout', cmd : 'mceUnlGrid', 'class' : 'unlGrid'});
// WDN Tabs
ed.addCommand('mceUnlTabs', function() {
ed.windowManager.open({
......@@ -393,14 +406,14 @@ Unl.hasParentNodeWithClass = function(childNode, parentClass) {
case 'unlLayout':
var c = cm.createSplitButton('unlLayout', {
title: 'Add Layout',
title: 'Add Col Layout (Deprecated)',
'class' : 'unlLayout',
onclick: function() {
this.control_manager.get('unlLayout').showMenu();
}
});
c.onRenderMenu.add(function(c, m) {
m.add({title: 'UNL Layouts', 'class': 'mceMenuItemTitle'}).setDisabled(1);
m.add({title: 'UNL Layouts (Deprecated)', 'class': 'mceMenuItemTitle'}).setDisabled(1);
m.add({title: 'Two Column (1/3)', cmd: 'mceUnlCol13'});
m.add({title: 'Two Column (2/2)', cmd: 'mceUnlCol22'});
m.add({title: 'Two Column (3/1)', cmd: 'mceUnlCol31'});
......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{#advanced_dlg.unl_grid_title}</title>
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
<script type="text/javascript" src="js/grid.js"></script>
</head>
<body style="display: none">
<form onsubmit="UnlGridDialog.submit();return false;" action="#">
<table border="0" cellpadding="4" cellspacing="0">
<tr>
<td colspan="2" class="title">{#advanced_dlg.unl_grid_title}</td>
</tr>
<tr>
<td class="nowrap">Grid Numbers:</td>
<td><input name="gridValues" type="text" class="mceFocus" id="gridValues" value="3,6,3" style="width: 100px" /></td>
</tr>
<tr>
<td colspan="2">Enter numbers only; separated by commas (e.g. 9,3)</td>
</tr>
</table>
<div class="mceActionPanel">
<input type="submit" id="insert" name="insert" value="{#update}" />
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
</form>
</body>
</html>
tinyMCEPopup.requireLangPack();
var UnlGridDialog = {
init : function(ed) {
this.editor = ed;
},
submit : function() {
var ed = this.editor, elm, values = document.forms[0].gridValues.value;
var selection = tinyMCEPopup.editor.selection;
var grid = values.split(',');
tinyMCEPopup.restoreSelection();
elm = ed.dom.getParent(ed.selection.getNode(), 'P');
if (elm) {
ed.dom.remove(elm);
}
var newContent = '<div class="grid'+grid[0]+' first">' + selection.getContent() + '&nbsp;</div>';
for (var i=1;i<grid.length;i++) {
newContent = newContent + '<div class="grid'+grid[i]+'">&nbsp;</div>';
}
newContent = '<p>&nbsp;</p>' + newContent + '<p class="clear">&nbsp;</p>';
selection.setContent(newContent);
tinyMCEPopup.close();
return false;
}
};
tinyMCEPopup.onInit.add(UnlGridDialog.init, UnlGridDialog);
tinyMCE.addI18n('en.advanced_dlg',{
unl_grid_title:"Insert Empty Grid Columns",
});
\ No newline at end of file
/* themes/advanced/skins/default/content.css
/* themes/advanced/skins/unl/content.css
********************************************/
/*body, td, pre {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;}*/
body {background:#FFF;}
......@@ -36,7 +36,7 @@ scrollbar-track-color:#F5F5F5;
/* UNL UI helpers for tinymce
*****************************/
#maincontent{
#maincontent {
width: 960px;
margin: 0 auto !important;
}
......@@ -53,9 +53,13 @@ scrollbar-track-color:#F5F5F5;
-webkit-border-top-right-radius: 5px;
}
/* UI tweaks not visible in rendered page to help our users */
.col,.one_col,.two_col,.three_col {
border: 1px dashed #ccc;
margin: -1px;
.col,.one_col,.two_col,.three_col,
.grid1, .grid2, .grid3, .grid4, .grid5, .grid6, .grid7, .grid8, .grid9, .grid10, .grid11, .grid12 {
outline: 1px dashed #ccc;
}
#maincontent .first {
clear: left;
margin-left: 0;
}
#monthwidget {
......
themes/advanced/skins/unl/img/icons.png

30.9 KB | W: | H:

themes/advanced/skins/unl/img/icons.png

32.3 KB | W: | H:

themes/advanced/skins/unl/img/icons.png
themes/advanced/skins/unl/img/icons.png
themes/advanced/skins/unl/img/icons.png
themes/advanced/skins/unl/img/icons.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -990,16 +990,19 @@
/*UNL Plugin*/
.unlSkin .unlZenBox span.mceAction {
background-position: -40px -40px;
background-position: -40px -40px;
}
.unlSkin .unlLayout span.mceAction {
background-position: -60px -40px;
background-position: -60px -40px;
}
.unlSkin .unlTabs span.mceIcon {
background-position: -80px -40px;
background-position: -80px -40px;
}
.unlSkin .unlTooltip span.mceIcon {
background-position: -100px -40px;
background-position: -100px -40px;
}
.unlSkin .unlGrid span.mceIcon {
background-position: -120px -40px;
}
/* border */
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment