Permalink
Browse files

Dev Working on a new admin style (gringegreen)

  • Loading branch information...
1 parent 6552633 commit e3c9652b7831dfc62bb24a063a41e2ca16215cac @c-schmitz c-schmitz committed Apr 27, 2012
Showing with 231 additions and 215 deletions.
  1. +1 −1 application/controllers/admin/labels.php
  2. +2 −0 application/core/Survey_Common_Action.php
  3. +2 −2 application/helpers/admin/htmleditor_helper.php
  4. +2 −2 application/helpers/replacements_helper.php
  5. +7 −7 application/views/admin/labels/labelbar_view.php
  6. +17 −17 application/views/admin/labels/labelsetsbar_view.php
  7. +11 −11 application/views/admin/labels/labelview_view.php
  8. +4 −4 application/views/admin/survey/Question/answerOptions_view.php
  9. +4 −4 application/views/admin/survey/Question/subQuestion_view.php
  10. +22 −22 application/views/admin/templates/templateeditorbar_view.php
  11. +25 −25 application/views/admin/token/tokenbar.php
  12. +9 −9 scripts/admin/answers.js
  13. +97 −97 scripts/admin/subquestions.js
  14. +4 −4 scripts/admin/updateset.js
  15. BIN styles/blobblueish/images/badsecurity.png
  16. BIN styles/blobblueish/tab.png
  17. BIN styles/gringegreen/activate.png
  18. +24 −10 styles/gringegreen/adminstyle.css
  19. BIN styles/gringegreen/bkgmaintitle.gif
  20. BIN styles/gringegreen/images/addanswer.png
  21. BIN styles/gringegreen/images/badsecurity.png
  22. BIN styles/gringegreen/images/create_dummy_token.png
  23. BIN styles/gringegreen/images/deleteanswer.png
  24. BIN styles/gringegreen/images/display_export.png
  25. BIN styles/gringegreen/images/document.png
  26. BIN styles/gringegreen/images/dumplabel.png
  27. BIN styles/gringegreen/images/dumplabelmulti.png
  28. BIN styles/gringegreen/images/edithtmlpopup.png
  29. BIN styles/gringegreen/images/handle.png
  30. BIN styles/gringegreen/images/import.png
  31. BIN styles/gringegreen/images/tokenify.png
  32. BIN styles/gringegreen/images/tokenifygroup.png
  33. BIN styles/gringegreen/tab.png
@@ -192,7 +192,7 @@ public function index($sa, $lid=0)
if ($sa == "newlabelset")
{
$langids = Yii::app()->session['adminlang'];
- $tabitem = $clang->gT("Create New Label Set");
+ $tabitem = $clang->gT("Create new label set");
}
else
$tabitem = $clang->gT("Edit label set");
@@ -184,6 +184,8 @@ protected function _renderWrappedTemplate($sAction = '', $aViewUrls = array(), $
{
// Gather the data
$aData['clang'] = $clang = Yii::app()->lang;
+ $aData['sImageURL'] = Yii::app()->getConfig('adminimageurl');
+
$aData = $this->_addPseudoParams($aData);
$aViewUrls = (array) $aViewUrls;
$sViewPath = '/admin/';
@@ -121,8 +121,8 @@ function getPopupEditor($fieldtype,$fieldname,$fieldtext, $surveyID=null,$gID=nu
$htmlcode .= ""
. "<a href=\"javascript:start_popup_editor('".$fieldname."','".$fieldtext."','".$surveyID."','".$gID."','".$qID."','".$fieldtype."','".$action."')\" id='".$fieldname."_ctrl' title=\"".$clang->gTview("Start HTML Editor in a Popup Window")."\" class='editorLink'>\n"
- . "\t<img alt=\"".$clang->gT("Start HTML Editor in a Popup Window")."\" id='".$fieldname."_popupctrlena' name='".$fieldname."_popupctrlena' border='0' src='".Yii::app()->getConfig('imageurl')."/edithtmlpopup.png' $imgopts align='top' class='btneditanswerena' />\n"
- . "\t<img alt=\"".$clang->gT("Give focus to the HTML Editor Popup Window")."\" id='".$fieldname."_popupctrldis' name='".$fieldname."_popupctrldis' border='0' src='".Yii::app()->getConfig('imageurl')."/edithtmlpopup_disabled.png' style='display: none' $imgopts align='top' class='btneditanswerdis' />\n"
+ . "\t<img alt=\"".$clang->gT("Start HTML editor in a popup window")."\" id='".$fieldname."_popupctrlena' name='".$fieldname."_popupctrlena' border='0' src='".Yii::app()->getConfig('adminimageurl')."edithtmlpopup.png' $imgopts align='top' class='btneditanswerena' />\n"
+ . "\t<img alt=\"".$clang->gT("Give focus to the HTML editor popup window")."\" id='".$fieldname."_popupctrldis' name='".$fieldname."_popupctrldis' border='0' src='".Yii::app()->getConfig('adminimageurl')."edithtmlpopup_disabled.png' style='display: none' $imgopts align='top' class='btneditanswerdis' />\n"
. "</a>\n";
return $htmlcode;
@@ -367,7 +367,7 @@ function templatereplace($line, $replacements = array(), &$redata = array(), $de
// Find out if the user has any saved data
if ($thissurvey['format'] == 'A')
{
- if ($thissurvey['tokenanswerspersistence'] != 'Y' || !tableExists('tokens_'.$surveyid))
+ if ($thissurvey['tokenanswerspersistence'] != 'Y' || !isset($surveyid) || !tableExists('tokens_'.$surveyid))
{
$_saveall = "\t\t\t<input type='submit' name='loadall' value='" . $clang->gT("Load unfinished survey") . "' class='saveall' " . (($thissurvey['active'] != "Y") ? "disabled='disabled'" : "") . "/>"
. "\n\t\t\t<input type='button' name='saveallbtn' value='" . $clang->gT("Resume later") . "' class='saveall' onclick=\"javascript:document.limesurvey.move.value = this.value;addHiddenField(document.getElementById('limesurvey'),'saveall',this.value);document.getElementById('limesurvey').submit();\" " . (($thissurvey['active'] != "Y") ? "disabled='disabled'" : "") . "/>"; // Show Save So Far button
@@ -379,7 +379,7 @@ function templatereplace($line, $replacements = array(), &$redata = array(), $de
}
elseif (!isset(Yii::app()->session['step']) || !Yii::app()->session['step'])
{ //First page, show LOAD
- if ($thissurvey['tokenanswerspersistence'] != 'Y' || !tableExists('tokens_'.$surveyid))
+ if ($thissurvey['tokenanswerspersistence'] != 'Y' || !isset($surveyid) || !tableExists('tokens_'.$surveyid))
{
$_saveall = "\t\t\t<input type='submit' name='loadall' value='" . $clang->gT("Load unfinished survey") . "' class='saveall' " . (($thissurvey['active'] != "Y") ? "disabled='disabled'" : "") . "/>";
}
@@ -4,18 +4,18 @@
</div>
<div class='menubar-main'>
<div class='menubar-left'>
- <img src='<?php echo $imageurl; ?>blank.gif' width='40' height='20' border='0' hspace='0' align='left' alt='' />
- <img src='<?php echo $imageurl; ?>seperator.gif' border='0' hspace='0' align='left' alt='' />
+ <img src='<?php echo $sImageURL; ?>blank.gif' width='40' height='20' border='0' hspace='0' alt='' />
+ <img src='<?php echo $sImageURL; ?>seperator.gif' border='0' hspace='0' alt='' />
<a href='<?php echo $this->createUrl("admin/labels/editlabelset/lid/".$lid); ?>' title="<?php $clang->eTview("Edit label set"); ?>" >
- <img name='EditLabelsetButton' src='<?php echo $imageurl; ?>edit.png' alt='<?php $clang->eT("Edit label set"); ?>' align='left' /></a>
+ <img name='EditLabelsetButton' src='<?php echo $sImageURL; ?>edit.png' alt='<?php $clang->eT("Edit label set"); ?>' /></a>
<a href='#' title='<?php $clang->eTview("Delete label set"); ?>' onclick="if (confirm('<?php $clang->eT("Do you really want to delete this label set?","js"); ?>')) { <?php echo convertGETtoPOST($this->createUrl("admin/labels/process")."?action=deletelabelset&amp;lid=$lid"); ?>}" >
- <img src='<?php echo $imageurl; ?>delete.png' border='0' alt='<?php $clang->eT("Delete label set"); ?>' align='left' /></a>
- <img src='<?php echo $imageurl; ?>seperator.gif' border='0' hspace='0' align='left' alt='' />
+ <img src='<?php echo $sImageURL; ?>delete.png' border='0' alt='<?php $clang->eT("Delete label set"); ?>' /></a>
+ <img src='<?php echo $sImageURL; ?>seperator.gif' border='0' hspace='0' alt='' />
<a href='<?php echo $this->createUrl("admin/export/dumplabel/lid/$lid");?>' title="<?php $clang->eTview("Export this label set"); ?>" >
- <img src='<?php echo $imageurl; ?>dumplabel.png' alt='<?php $clang->eT("Export this label set"); ?>' align='left' /></a>
+ <img src='<?php echo $sImageURL; ?>dumplabel.png' alt='<?php $clang->eT("Export this label set"); ?>' /></a>
</div>
<div class='menubar-right'>
- <input type='image' src='<?php echo $imageurl; ?>close.png' title='<?php $clang->eT("Close Window"); ?>' href="<?php echo $this->createUrl("admin/labels/view"); ?>" />
+ <input type='image' src='<?php echo $sImageURL; ?>close.png' title='<?php $clang->eT("Close Window"); ?>' href="<?php echo $this->createUrl("admin/labels/view"); ?>" />
</div>
</div>
</div>
@@ -1,25 +1,25 @@
<div class='menubar'>
<div class='menubar-title ui-widget-header'>
- <strong><?php $clang->eT("Label Sets Administration"); ?></strong>
+ <strong><?php $clang->eT("Label set administration"); ?></strong>
</div>
<div class='menubar-main'>
<div class='menubar-left'>
<a href='<?php echo $this->createUrl("/admin/index"); ?>' title="<?php $clang->eTview("Return to survey administration"); ?>" >
- <img name='Administration' src='<?php echo Yii::app()->getConfig('imageurl'); ?>/home.png' align='left' alt='<?php $clang->eT("Return to survey administration"); ?>' /></a>
- <img src='<?php echo Yii::app()->getConfig('imageurl'); ?>/blank.gif' width='11' height='20' align='left' alt='' />
- <img src='<?php echo Yii::app()->getConfig('imageurl'); ?>/seperator.gif' align='left' alt='' />
- <img src='<?php echo Yii::app()->getConfig('imageurl'); ?>/blank.gif' width='76' align='left' height='20' alt='' />
- <img src='<?php echo Yii::app()->getConfig('imageurl'); ?>/seperator.gif' border='0' hspace='0' align='left' alt='' />
+ <img name='Administration' src='<?php echo $sImageURL; ?>home.png' alt='<?php $clang->eT("Return to survey administration"); ?>' /></a>
+ <img src='<?php echo $sImageURL; ?>blank.gif' width='11' height='20' alt='' />
+ <img src='<?php echo $sImageURL; ?>seperator.gif' alt='' />
+ <img src='<?php echo $sImageURL; ?>blank.gif' width='76' height='20' alt='' />
+ <img src='<?php echo $sImageURL; ?>seperator.gif' border='0' hspace='0' alt='' />
<a href='<?php echo $this->createUrl("admin/labels/exportmulti");?>' title="<?php $clang->eTview("Export label set"); ?>" >
- <img src='<?php echo Yii::app()->getConfig('imageurl'); ?>/dumplabelmulti.png' alt='<?php $clang->eT("Export multiple label sets"); ?>' align='left' /></a>
+ <img src='<?php echo $sImageURL; ?>dumplabelmulti.png' alt='<?php $clang->eT("Export multiple label sets"); ?>' /></a>
</div>
<div class='menubar-right'>
- <img src='<?php echo Yii::app()->getConfig('imageurl'); ?>/blank.gif' width='5' height='20' alt='' />
+ <img src='<?php echo $sImageURL; ?>blank.gif' width='5' height='20' alt='' />
<label for='labelsetchanger'><?php $clang->eT("Label sets:");?> </label>
<select id='labelsetchanger' onchange="window.open(this.options[this.selectedIndex].value,'_top')">
<option value=''
<?php if (!isset($lid) || $lid<1) { ?> selected='selected' <?php } ?>
- ><?php $clang->eT("Please Choose..."); ?></option>
+ ><?php $clang->eT("Please choose..."); ?></option>
<?php if (count($labelsets)>0)
{
@@ -34,20 +34,20 @@
</select>
<a href="#" onclick="window.open('<?php echo $this->createUrl("admin/labels/newlabelset") ?>', '_top')"
title="<?php $clang->eTview("Create or import new label set(s)"); ?>">
- <img src='<?php echo Yii::app()->getConfig('imageurl'); ?>/add.png' name='AddLabel' alt='<?php $clang->eT("Create or import new label set(s)"); ?>' /></a>
- <img src='<?php echo Yii::app()->getConfig('imageurl'); ?>/seperator.gif' alt='' />
- <img src='<?php echo Yii::app()->getConfig('imageurl'); ?>/blank.gif' width='5' height='20' alt='' />
+ <img src='<?php echo $sImageURL; ?>add.png' name='AddLabel' alt='<?php $clang->eT("Create or import new label set(s)"); ?>' /></a>
+ <img src='<?php echo $sImageURL; ?>seperator.gif' alt='' />
+ <img src='<?php echo $sImageURL; ?>blank.gif' width='5' height='20' alt='' />
<a href="#" onclick="window.open('<?php echo $this->createUrl("admin/authentication/logout");?>', '_top')"
title="<?php $clang->eTview("Logout"); ?>" >
- <img src='<?php echo Yii::app()->getConfig('imageurl'); ?>/logout.png' name='Logout' alt='<?php $clang->eT("Logout"); ?>' /></a>
+ <img src='<?php echo $sImageURL; ?>logout.png' name='Logout' alt='<?php $clang->eT("Logout"); ?>' /></a>
- <a href="#" onclick="showhelp('show')" title="<?php $clang->eTview("Show Help"); ?>">
- <img src='<?php echo Yii::app()->getConfig('imageurl'); ?>/showhelp.png' name='ShowHelp'
- alt='<?php $clang->eT("Show Help"); ?>' /></a>
+ <a href="#" onclick="showhelp('show')" title="<?php $clang->eTview("Show help"); ?>">
+ <img src='<?php echo $sImageURL; ?>showhelp.png' name='ShowHelp'
+ alt='<?php $clang->eT("Show help"); ?>' /></a>
</div>
</div>
</div>
<script type="text/javascript"><!--
- var ci_path = '<?php echo Yii::app()->getConfig('imageurl') ?>'; //-->
+ var sImageURL = '<?php echo $sImageURL ?>'; //-->
</script>
@@ -1,12 +1,12 @@
<div class='header ui-widget-header'><?php $clang->eT("Labels") ?></div>
-<div id='tabs'>
- <ul>
+<div id='tabs' class='ui-tabs ui-widget ui-widget-content ui-corner-all'>
+ <ul class='ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all'>
<?php
foreach ($lslanguages as $i => $language)
echo "
<li><a href='#neweditlblset$i'>" . getLanguageNameFromCode($language, false) . "</a></li>";
echo "
- <li><a href='#up_resmgmt'>" . $clang->gT("Uploaded Resources Management") . "</a></li>";
+ <li><a href='#up_resmgmt'>" . $clang->gT("Uploaded resources management") . "</a></li>";
?>
</ul>
@@ -66,7 +66,7 @@
else
{
?>
- <td><img src='<?php echo Yii::app()->getConfig('imageurl') ?>/handle.png' /></td>
+ <td><img src='<?php echo $sImageURL; ?>handle.png' /></td>
<td>
<input type='hidden' class='hiddencode' value='<?php echo $row['code'] ?>' />
<input type='text' class='codeval'id='code_<?php echo $row['sortorder'] ?>' name='code_<?php echo $row['sortorder'] ?>' maxlength='5' size='6' value='<?php echo $row['code'] ?>'/>
@@ -89,8 +89,8 @@
{
?>
<td style='text-align:center;'>
- <img src='<?php echo Yii::app()->getConfig('imageurl') ?>/addanswer.png' class='btnaddanswer' />
- <img src='<?php echo Yii::app()->getConfig('imageurl') ?>/deleteanswer.png' class='btndelanswer' />
+ <img src='<?php echo $sImageURL; ?>addanswer.png' class='btnaddanswer' />
+ <img src='<?php echo $sImageURL; ?>deleteanswer.png' class='btndelanswer' />
</td>
<?php
}
@@ -104,7 +104,7 @@
</tbody>
</table>
<button class='btnquickadd' id='btnquickadd' type='button'><?php $clang->eT('Quick add...') ?></button>
- <p><input type='submit' name='method' value='<?php $clang->eT("Save Changes") ?>' id='saveallbtn_<?php echo $lslanguage ?>' /></p>
+ <p><input type='submit' name='method' value='<?php $clang->eT("Save changes") ?>' id='saveallbtn_<?php echo $lslanguage ?>' /></p>
</div>
<?php
$first=false;
@@ -119,13 +119,13 @@
<li>
<label>&nbsp;</label>
<?php echo CHtml::dropDownList('type', 'files', array('files' => $clang->gT('Files'), 'flash' => $clang->gT('Flash'), 'images' => $clang->gT('Images'))); ?>
- <input type='submit' value="<?php $clang->eT("Browse Uploaded Resources") ?>" />
+ <input type='submit' value="<?php $clang->eT("Browse uploaded resources") ?>" />
</li>
<li>
<label>&nbsp;</label>
<input type='button'<?php echo hasResources($lid, 'label') === false ? ' disabled="disabled"' : '' ?>
onclick='window.open("<?php echo $this->createUrl("/admin/export/resources/export/label/lid/$lid"); ?>", "_blank")'
- value="<?php $clang->eT("Export Resources As ZIP Archive") ?>" />
+ value="<?php $clang->eT("Export resources as ZIP archive") ?>" />
</li>
</ul>
</form>
@@ -137,12 +137,12 @@
<input type='hidden' name='action' value='importlabelresources' />
<ul style='list-style-type:none; text-align:center'>
<li>
- <label for='the_file'><?php $clang->eT("Select ZIP File:") ?></label>
+ <label for='the_file'><?php $clang->eT("Select ZIP file:") ?></label>
<input id='the_file' name="the_file" type="file" size="50" />
</li>
<li>
<label>&nbsp;</label>
- <input type='button' value='<?php $clang->eT("Import Resources ZIP Archive") ?>'
+ <input type='button' value='<?php $clang->eT("Import resources ZIP archive") ?>'
<?php echo !function_exists("zip_open") ? "onclick='alert(\"" . $clang->gT("zip library not supported by PHP, Import ZIP Disabled", "js") . "\");'" : "onclick='if (validatefilename(this.form,\"" . $clang->gT('Please select a file to import!', 'js') . "\")) { this.form.submit();}'" ?>/>
</li>
</ul>
@@ -23,7 +23,7 @@
var duplicateanswercode='<?php $clang->eT('Error: You are trying to use duplicate answer codes.','js'); ?>';
var strNoLabelSet='<?php $clang->eT('There are no label sets which match the survey default language','js'); ?>';
var langs='<?php echo implode(';',$anslangs); ?>';
- var ci_path="<?php echo Yii::app()->getConfig('imageurl'); ?>";
+ var sImageURL ="<?php echo Yii::app()->getConfig('imageurl'); ?>";
var saveaslabletitle = '<?php $clang->eT('Save as label set','js'); ?>';
var lanameurl = '<?php echo Yii::app()->createUrl('/admin/labels/getAllSets'); ?>';
var lasaveurl = '<?php echo Yii::app()->createUrl('/admin/labels/ajaxSets'); ?>';
@@ -98,7 +98,7 @@
<?php if ($first)
{ ?>
- <img class='handle' src='<?php echo Yii::app()->getConfig('imageurl'); ?>/handle.png' /></td><td><input type='hidden' class='oldcode' id='oldcode_<?php echo $position; ?>_<?php echo $scale_id; ?>' name='oldcode_<?php echo $position; ?>_<?php echo $scale_id; ?>' value="<?php echo $row['code']; ?>" /><input type='text' class='code' id='code_<?php echo $position; ?>_<?php echo $scale_id; ?>' name='code_<?php echo $position; ?>_<?php echo $scale_id; ?>' value="<?php echo $row['code']; ?>" maxlength='5' size='5'
+ <img class='handle' src='<?php echo $sImageURL; ?>handle.png' /></td><td><input type='hidden' class='oldcode' id='oldcode_<?php echo $position; ?>_<?php echo $scale_id; ?>' name='oldcode_<?php echo $position; ?>_<?php echo $scale_id; ?>' value="<?php echo $row['code']; ?>" /><input type='text' class='code' id='code_<?php echo $position; ?>_<?php echo $scale_id; ?>' name='code_<?php echo $position; ?>_<?php echo $scale_id; ?>' value="<?php echo $row['code']; ?>" maxlength='5' size='5'
onkeypress="return goodchars(event,'1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWZYZ_')"
/>
<?php }
@@ -137,8 +137,8 @@
<?php echo getEditor("editanswer","answer_".$row['language']."_{$row['sortorder']}_{$scale_id}", "[".$clang->gT("Answer:", "js")."](".$row['language'].")",$surveyid,$gid,$qid,'editanswer'); ?>
- </td><td><img src='<?php echo Yii::app()->getConfig('imageurl'); ?>/addanswer.png' class='btnaddanswer' />
- <img src='<?php echo Yii::app()->getConfig('imageurl'); ?>/deleteanswer.png' class='btndelanswer' />
+ </td><td><img src='<?php echo $sImageURL; ?>addanswer.png' class='btnaddanswer' />
+ <img src='<?php echo $sImageURL; ?>deleteanswer.png' class='btndelanswer' />
</td></tr>
<?php $position++;
Oops, something went wrong.

0 comments on commit e3c9652

Please sign in to comment.