From: <du...@us...> - 2013-01-07 23:26:10
|
Revision: 10697 http://sourceforge.net/p/xoops/svn/10697 Author: dugris Date: 2013-01-07 23:26:06 +0000 (Mon, 07 Jan 2013) Log Message: ----------- Fix for tinymce plugin Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/class/form/language.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/class/form/tinymce.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/class/xlanguage.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/language/english/tinymce.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/templates/xlanguage_tinymce.html Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/class/form/language.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/class/form/language.php 2013-01-07 20:56:40 UTC (rev 10696) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/class/form/language.php 2013-01-07 23:26:06 UTC (rev 10697) @@ -47,7 +47,7 @@ $this->addElement(new XoopsFormText(_AM_XLANGUAGE_CODE, 'xlanguage_code', 5, 10, $obj->getVar('xlanguage_code')), true); // language weight - $this->addElement(new XoopsFormText(_AM_XLANGUAGE_WEIGHT, 'xlanguage_weight', 5, 10, $obj->getVar('xlanguage_weight'))); + $this->addElement(new XoopsFormText(_AM_XLANGUAGE_WEIGHT, 'xlanguage_weight', 1, 4, $obj->getVar('xlanguage_weight'))); // language image $image_option_tray = new XoopsFormElementTray(_AM_XLANGUAGE_IMAGE, ''); @@ -77,11 +77,23 @@ $button_2->setClass('btn btn-warning'); $button_tray->addElement($button_2); - $button_3 = new XoopsFormButton('', 'cancel', _CANCEL, 'button'); - $button_3->setExtra("onclick='javascript:history.go(-1);'"); - $button_3->setClass('btn btn-danger'); - $button_tray->addElement($button_3); + switch (basename($xoops->getEnv('PHP_SELF'), '.php')) { + case 'xoops_xlanguage': + $button_3 = new XoopsFormButton('', 'button', _CLOSE, 'button'); + $button_3->setExtra('onclick="tinyMCEPopup.close();"'); + $button_3->setClass('btn btn-danger'); + $button_tray->addElement($button_3); + break; + case 'index': + default: + $button_3 = new XoopsFormButton('', 'cancel', _CANCEL, 'button'); + $button_3->setExtra("onclick='javascript:history.go(-1);'"); + $button_3->setClass('btn btn-danger'); + $button_tray->addElement($button_3); + break; + } + $this->addElement($button_tray); } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/class/form/tinymce.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/class/form/tinymce.php 2013-01-07 20:56:40 UTC (rev 10696) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/class/form/tinymce.php 2013-01-07 23:26:06 UTC (rev 10697) @@ -54,7 +54,7 @@ $button_2 = new XoopsFormButton('', 'button', _CLOSE, 'button'); $button_2->setExtra('onclick="tinyMCEPopup.close();"'); - $button_2->setClass('btn btn-warning'); + $button_2->setClass('btn btn-danger'); $button_tray->addElement($button_2); $this->addElement($button_tray); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/class/xlanguage.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/class/xlanguage.php 2013-01-07 20:56:40 UTC (rev 10696) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/class/xlanguage.php 2013-01-07 23:26:06 UTC (rev 10697) @@ -43,7 +43,7 @@ public function CleanVarsForDB() { $system = System::getInstance(); - foreach ($this->getValues() as $k => $v) { + foreach (parent::getValues() as $k => $v) { if ($k != 'dohtml') { if ($this->vars[$k]['data_type'] == XOBJ_DTYPE_STIME || $this->vars[$k]['data_type'] == XOBJ_DTYPE_MTIME || $this->vars[$k]['data_type'] == XOBJ_DTYPE_LTIME) { $value = $system->CleanVars($_POST[$k], 'date', date('Y-m-d'), 'date') + $system->CleanVars($_POST[$k], 'time', date('u'), 'int'); @@ -68,6 +68,7 @@ public function __construct($db) { parent::__construct($db, 'xlanguage', 'XlanguageLanguage', 'xlanguage_id', 'xlanguage_name'); + $this->loadConfig(); } public function loadConfig() Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/language/english/tinymce.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/language/english/tinymce.php 2013-01-07 20:56:40 UTC (rev 10696) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/language/english/tinymce.php 2013-01-07 23:26:06 UTC (rev 10697) @@ -17,6 +17,8 @@ * @version $Id$ */ +define("_XLANGUAGE_TINYMCE_INS", "Insert multi-language content"); +define("_XLANGUAGE_TINYMCE_ADD", "Add language"); define("_XLANGUAGE_TINYMCE_SUBTITLE", "Select a language and type/paste the content in the box below:"); define("_XLANGUAGE_TINYMCE_SELECT", "Select language"); ?> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/templates/xlanguage_tinymce.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/templates/xlanguage_tinymce.html 2013-01-07 20:56:40 UTC (rev 10696) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/templates/xlanguage_tinymce.html 2013-01-07 23:26:06 UTC (rev 10697) @@ -11,10 +11,23 @@ <div class="tabs"> <ul> - <li id="tab_mlcontent" class="current"><span><a href="javascript:mcTabs.displayTab('tab_mlcontent','mlcontent_panel');" onmousedown="return false;">{#xoops_xlanguage_dlg.title}</a></span></li> + <li id="tab_xlanguage_browser" class="current"><span><a href="javascript:mcTabs.displayTab('tab_xlanguage_browser','xlanguage_browser_panel');" onmousedown="return false;"><{$smarty.const._XLANGUAGE_TINYMCE_INS}></a></span></li> + <{if $form_add}> + <li id="tab_xlanguage_add" class="current"><span><a href="javascript:mcTabs.displayTab('tab_xlanguage_add','xlanguage_add_panel');" onmousedown="return false;"><{$smarty.const._XLANGUAGE_TINYMCE_ADD}></a></span></li> + <{/if}> </ul> </div> <br /> - <{$form}> + + <div class="panel_wrapper"> + <div id="xlanguage_browser_panel" class="panel current" style="overflow:none;"> + <{$form_txt}> + </div> + <{if $form_add}> + <div id="xlanguage_add_panel" class="panel" style="overflow:none;"> + <{$form_add}> + </div> + <{/if}> + </div> </body> </html> \ No newline at end of file |