From: <jon...@us...> - 2009-08-26 16:04:43
|
Revision: 21097 http://tikiwiki.svn.sourceforge.net/tikiwiki/?rev=21097&view=rev Author: jonnybradley Date: 2009-08-26 16:04:33 +0000 (Wed, 26 Aug 2009) Log Message: ----------- [MOD] Initial implementation of {textarea} object in editpage. Not finished (partially broken, a.k.a. experimental) Modified Paths: -------------- branches/experimental/edit_fixup/styles/darkroom.css branches/experimental/edit_fixup/styles/layout/layout.css branches/experimental/edit_fixup/templates/tiki-editpage.tpl branches/experimental/edit_fixup/templates/wiki_edit.tpl Modified: branches/experimental/edit_fixup/styles/darkroom.css =================================================================== --- branches/experimental/edit_fixup/styles/darkroom.css 2009-08-26 15:40:35 UTC (rev 21096) +++ branches/experimental/edit_fixup/styles/darkroom.css 2009-08-26 16:04:33 UTC (rev 21097) @@ -1078,7 +1078,7 @@ padding-bottom: 5px; } -#textarea-toolbar { +.textarea-toolbar { background: #e4e4e4; } Modified: branches/experimental/edit_fixup/styles/layout/layout.css =================================================================== --- branches/experimental/edit_fixup/styles/layout/layout.css 2009-08-26 15:40:35 UTC (rev 21096) +++ branches/experimental/edit_fixup/styles/layout/layout.css 2009-08-26 16:04:33 UTC (rev 21097) @@ -705,6 +705,11 @@ /* New Toolbars (toolbars) */ +.textarea-toolbar { + padding: .3em; + font-size: .9em; +} + a.toolbar { padding: 0 .5em 0 0; } Modified: branches/experimental/edit_fixup/templates/tiki-editpage.tpl =================================================================== --- branches/experimental/edit_fixup/templates/tiki-editpage.tpl 2009-08-26 15:40:35 UTC (rev 21096) +++ branches/experimental/edit_fixup/templates/tiki-editpage.tpl 2009-08-26 16:04:33 UTC (rev 21097) @@ -270,23 +270,30 @@ <tr class="formcolor"> <td colspan="2"> {if $wysiwyg ne 'y' or $prefs.javascript_enabled ne 'y'} - {include file='wiki_edit.tpl'} - <input type="hidden" name="rows" value="{$rows}"/> - <input type="hidden" name="cols" value="{$cols}"/> - <input type="hidden" name="wysiwyg" value="n" /> + {*include file='wiki_edit.tpl'*} +<!-- <input type="hidden" name="rows" value="{$rows}"/>--> +<!-- <input type="hidden" name="cols" value="{$cols}"/>--> +<!-- <input type="hidden" name="wysiwyg" value="n" />--> + {textarea _toolbars="y"}{$pagedata}{/textarea} {else} - {capture name=autosave}{if $prefs.feature_ajax eq 'y' and $prefs.feature_ajax_autosave eq 'y' and $noautosave neq 'y'}{autosave test='n' id='edit' default=$pagedata preview=$preview}{else}{$pagedata}{/if}{/capture} - {if $prefs.feature_ajax eq 'y' and $prefs.feature_ajax_autosave eq 'y' and $noautosave neq 'y' and $has_autosave eq 'y'} - {remarksbox type="warning" title="{tr}AutoSave{/tr}"} - {tr}If you want the saved version instead of the autosaved one{/tr} {self_link noautosave='y' _ajax='n'}{tr}Click Here{/tr}{/self_link} - {/remarksbox} - {/if} - </td> - </tr> - <tr> - <td colspan="2"> - {editform Meat=$smarty.capture.autosave InstanceName='edit' ToolbarSet="Tiki"} - <input type="hidden" name="wysiwyg" value="y" /> + {capture name=autosave} + {if $prefs.feature_ajax eq 'y' and $prefs.feature_ajax_autosave eq 'y' and $noautosave neq 'y'} + {autosave test='n' id='edit' default=$pagedata preview=$preview} + {else} + {$pagedata} + {/if} + {/capture} + {if $prefs.feature_ajax eq 'y' and $prefs.feature_ajax_autosave eq 'y' and $noautosave neq 'y' and $has_autosave eq 'y'} + {remarksbox type="warning" title="{tr}AutoSave{/tr}"} + {tr}If you want the saved version instead of the autosaved one{/tr} {self_link noautosave='y' _ajax='n'}{tr}Click Here{/tr}{/self_link} + {/remarksbox} + {/if} + </td> + </tr> + <tr> + <td colspan="2"> + {editform Meat=$smarty.capture.autosave InstanceName='edit' ToolbarSet="Tiki"} + <input type="hidden" name="wysiwyg" value="y" /> {/if} </td> </tr> Modified: branches/experimental/edit_fixup/templates/wiki_edit.tpl =================================================================== --- branches/experimental/edit_fixup/templates/wiki_edit.tpl 2009-08-26 15:40:35 UTC (rev 21096) +++ branches/experimental/edit_fixup/templates/wiki_edit.tpl 2009-08-26 16:04:33 UTC (rev 21097) @@ -1,6 +1,5 @@ {if $prefs.feature_template_zoom eq 'y' && isset($smarty.request.zoom) && $smarty.request.zoom|cat:'.tpl' eq $smarty.template} {assign var=zoom_mode value='y'} - {popup_init src="lib/overlib.js"} {else} {assign var=zoom_mode value='n'} {/if} @@ -15,11 +14,17 @@ {assign var=textarea_attributes value=" rows='$rows' cols='$cols' style='width:99%'"} {/if} <div id='edit-zone'> - <div id='textarea-toolbar' style='padding:3px; font-size:10px;'> + <div class='textarea-toolbar' id='{$textarea_id|default:editwiki}_toolbar'> {toolbars area_name=$textarea_name|default:edit zoom_enable=$enlarge|default:y} </div> <!--autosave --> - {capture name=autosave}{if $prefs.feature_ajax eq 'y' and $prefs.feature_ajax_autosave eq 'y' and $noautosave neq 'y'}{autosave id=$textarea_id|default:editwiki default=$pagedata preview=$preview}{else}{$pagedata}{/if}{/capture} + {capture name=autosave} + {if $prefs.feature_ajax eq 'y' and $prefs.feature_ajax_autosave eq 'y' and $noautosave neq 'y'} + {autosave id=$textarea_id|default:editwiki default=$pagedata preview=$preview} + {else} + {$pagedata} + {/if} + {/capture} {if $prefs.feature_ajax eq 'y' and $prefs.feature_ajax_autosave eq 'y' and $noautosave neq 'y' and $has_autosave eq 'y'} {remarksbox type="warning" title="{tr}AutoSave{/tr}"} {tr}If you want the saved version instead of the autosaved one{/tr} {self_link noautosave='y' _ajax='n'}{tr}Click Here{/tr}{/self_link} @@ -39,16 +44,11 @@ </div> {if $zoom_mode eq 'y'} -<div style="width:99%; text-align:right;"> +<div id='{$textarea_id|default:editwiki}_actions' style="width:99%; text-align:right;"> {include file='wiki_edit_actions.tpl'} </div> - -<script type='text/javascript'> -<!--//--><![CDATA[//><!-- -document.getElementById('{$textarea_id|default:editwiki}').style.height = ( getWindowHeight() - document.getElementById('textarea-toolbar').offsetHeight - 10 ) + 'px'; -document.getElementById('tiki-center').style.padding = '0px'; -document.body.style.backgroundColor = '#c1c1c1'; -//--><!]]> -</script> +{jq} +$jq('#{{$textarea_id|default:editwiki}}').height($jq(window).height() - $jq('#{{$textarea_id|default:editwiki}}_toolbar').height() - $jq('#{{$textarea_id|default:editwiki}}_actions').height() - 15); +{/jq} </form> {/if} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |