Skip to content

Commit

Permalink
Move prefs-related CSS to separate CSS file
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Oct 20, 2014
1 parent 6628ec7 commit 04a1bc7
Show file tree
Hide file tree
Showing 11 changed files with 149 additions and 116 deletions.
4 changes: 4 additions & 0 deletions imp/lib/Basic/Pgp.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ protected function _importKeyDialog($target)
'$$("INPUT.horde-cancel").first().observe("click", function() { window.close(); })'
), true);

/* Import CSS located with prefs CSS. */
$p_css = new Horde_Themes_Element('prefs.css');
$page_output->addStylesheet($p_css->fs, $p_css->uri);

$this->title = _("Import PGP Key");

/* Need to use regular status notification - AJAX notifications won't
Expand Down
4 changes: 4 additions & 0 deletions imp/lib/Basic/Smime.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ protected function _importKeyDialog($target)
'$$("INPUT.horde-cancel").first().observe("click", function() { window.close(); })'
), true);

/* Import CSS located with prefs CSS. */
$p_css = new Horde_Themes_Element('prefs.css');
$page_output->addStylesheet($p_css->fs, $p_css->uri);

$this->title = _("Import Personal S/MIME Certificate");

/* Need to use regular status notification - AJAX notifications won't
Expand Down
3 changes: 3 additions & 0 deletions imp/lib/Prefs/Special/Flag.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ public function display(Horde_Core_Prefs_Ui $ui)
$page_output->addScriptFile('prefs/flag.js');
}

$p_css = new Horde_Themes_Element('prefs.css');
$page_output->addStylesheet($p_css->fs, $p_css->uri);

$page_output->addInlineJsVars(array(
'ImpFlagPrefs.new_prompt' => _("Please enter the label for the new flag:"),
'ImpFlagPrefs.confirm_delete' => _("Are you sure you want to delete this flag?")
Expand Down
3 changes: 3 additions & 0 deletions imp/lib/Prefs/Special/PgpPrivateKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ public function display(Horde_Core_Prefs_Ui $ui)

$page_output->addScriptPackage('IMP_Script_Package_Imp');

$p_css = new Horde_Themes_Element('prefs.css');
$page_output->addStylesheet($p_css->fs, $p_css->uri);

$view = new Horde_View(array(
'templatePath' => IMP_TEMPLATES . '/prefs'
));
Expand Down
3 changes: 3 additions & 0 deletions imp/lib/Prefs/Special/PgpPublicKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ public function display(Horde_Core_Prefs_Ui $ui)

$page_output->addScriptPackage('IMP_Script_Package_Imp');

$p_css = new Horde_Themes_Element('prefs.css');
$page_output->addStylesheet($p_css->fs, $p_css->uri);

$imp_pgp = $injector->getInstance('IMP_Crypt_Pgp');

/* Get list of Public Keys on keyring. */
Expand Down
3 changes: 3 additions & 0 deletions imp/lib/Prefs/Special/Remote.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ public function display(Horde_Core_Prefs_Ui $ui)
'ImpRemotePrefs.wait' => _("Please wait...")
));

$p_css = new Horde_Themes_Element('prefs.css');
$page_output->addStylesheet($p_css->fs, $p_css->uri);

$view = new Horde_View(array(
'templatePath' => IMP_TEMPLATES . '/prefs'
));
Expand Down
3 changes: 3 additions & 0 deletions imp/lib/Prefs/Special/Searches.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ public function display(Horde_Core_Prefs_Ui $ui)
$page_output->addScriptFile('hordecore.js', 'horde');
$page_output->addScriptFile('prefs/searches.js');

$p_css = new Horde_Themes_Element('prefs.css');
$page_output->addStylesheet($p_css->fs, $p_css->uri);

$imp_search = $injector->getInstance('IMP_Search');
$fout = $vout = array();

Expand Down
3 changes: 3 additions & 0 deletions imp/lib/Prefs/Special/SmimePrivateKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ public function display(Horde_Core_Prefs_Ui $ui)

$page_output->addScriptPackage('IMP_Script_Package_Imp');

$p_css = new Horde_Themes_Element('prefs.css');
$page_output->addStylesheet($p_css->fs, $p_css->uri);

$view = new Horde_View(array(
'templatePath' => IMP_TEMPLATES . '/prefs'
));
Expand Down
3 changes: 3 additions & 0 deletions imp/lib/Prefs/Special/SmimePublicKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ public function display(Horde_Core_Prefs_Ui $ui)

$page_output->addScriptPackage('IMP_Script_Package_Imp');

$p_css = new Horde_Themes_Element('prefs.css');
$page_output->addStylesheet($p_css->fs, $p_css->uri);

$imp_smime = $injector->getInstance('IMP_Crypt_Smime');

/* Get list of Public Keys on keyring. */
Expand Down
118 changes: 118 additions & 0 deletions imp/themes/default/prefs.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
/* Flags */
table.flagmanagement thead td {
font-weight: bold;
text-decoration: underline;
}
table.flagmanagement div.flagUser {
border: 1px solid gray;
margin-right: 2px;
}
table.flagmanagement tbody td.flagicon {
text-align: center;
}

/* Searches */
table.searchesmanagement {
border-bottom: 1px solid gray;
border-collapse: collapse;
margin-bottom: 1em;
}
table.searchesmanagement td,
table.searchesmanagement th {
border: 1px solid gray;
border-right-color: lightgray;
border-bottom-width: 0;
}
table.searchesmanagement td:last-child,
table.searchesmanagement th:last-child {
border-right-color: gray;
}
table.searchesmanagement th {
text-align: left;
}
table.searchesmanagement td.searchdescription {
background-color: #ffa;
border-top-color: lightgray;
width: 500px;
}
.editImg {
background-image: url("graphics/edit.png");
}

/* Remote accounts */
div.remotemanagement table {
width: auto;
}
table.remotemanagement {
margin-bottom: 10px;
border-left: 1px solid #d0d0d0;
border-right: 1px solid #d0d0d0;
}
table.remotemanagement td.required {
color: red;
}
table.remotemanagement td.noneconfigured {
font-style: italic;
}

/* PGP/SMIME */
.prefsPgpContainer,
.prefsSmimeContainer {
border: 1px solid black;
margin: 5px 0;
padding: 4px;
}
.prefsPgpHeader,
.prefsSmimeHeader {
margin-bottom: 5px;
}
.prefsPgpWarning,
.prefsSmimeWarning {
color: red;
padding: 5px 10px;
}

/* ACL */
.prefsAclTable {
padding-bottom: 8px;
width: 100%;
}
.prefsAclHeader {
border-bottom: 1px dashed #999;
cursor: help;
}
.prefsAclNegative {
text-decoration: line-through;
}
.prefsAclNegativeLabel {
border: 1px dotted red;
color: red;
padding: 1px;
}

/* Newmail */
.sound-list li {
height: auto;
}
.sound-list audio {
margin-left: 8px;
padding-bottom: 2px;
vertical-align: middle;
}

/* Key import */
.importKeyTable {
border-collapse: collapse;
width: 100%;
}
.importKeyHowto {
padding: 8px;
}
.importKeyOr {
color: red !important;
font-weight: bold;
}
.importKeyText,
.importKeyUpload {
font-weight: bold;
}
118 changes: 2 additions & 116 deletions imp/themes/default/screen.css
Original file line number Diff line number Diff line change
Expand Up @@ -167,104 +167,6 @@ span.iconImg.flagDeleted {
background-image: url("graphics/flags/deleted-inv.png");
}

/* Prefs management styles. */
table.flagmanagement thead td {
font-weight: bold;
text-decoration: underline;
}
table.flagmanagement div.flagUser {
border: 1px solid gray;
margin-right: 2px;
}
table.flagmanagement tbody td.flagicon {
text-align: center;
}

table.searchesmanagement {
border-bottom: 1px solid gray;
border-collapse: collapse;
margin-bottom: 1em;
}
table.searchesmanagement td, table.searchesmanagement th {
border: 1px solid gray;
border-right-color: lightgray;
border-bottom-width: 0;
}
table.searchesmanagement td:last-child,
table.searchesmanagement th:last-child {
border-right-color: gray;
}
table.searchesmanagement th {
text-align: left;
}
table.searchesmanagement td.searchdescription {
background-color: #ffa;
border-top-color: lightgray;
width: 500px;
}

div.remotemanagement table {
width: auto;
}
table.remotemanagement {
margin-bottom: 10px;
border-left: 1px solid #d0d0d0;
border-right: 1px solid #d0d0d0;
}
table.remotemanagement td.required, .remoteNotSecure {
color: red;
}
table.remotemanagement td.noneconfigured {
font-style: italic;
}
.remoteSecure {
color: green;
}

/* Prefs styles. */
.prefsPgpContainer, .prefsSmimeContainer {
border: 1px solid black;
margin: 5px 0;
padding: 4px;
}
.prefsPgpHeader, .prefsSmimeHeader {
margin-bottom: 5px;
}
.prefsPgpWarning, .prefsSmimeWarning {
color: red;
padding: 5px 10px;
}

.prefsAclTable {
padding-bottom: 8px;
width: 100%;
}
.prefsAclHeader {
border-bottom: 1px dashed #999;
cursor: help;
}
.prefsAclNegative {
text-decoration: line-through;
}
.prefsAclNegativeLabel {
border: 1px dotted red;
color: red;
padding: 1px;
}
.prefsViews {
font-weight: bold;
font-size: 110%;
padding: 10px 0;
}
.sound-list li {
height: auto;
}
.sound-list audio {
margin-left: 8px;
padding-bottom: 2px;
vertical-align: middle;
}

/* Quota styles. */
.quotawarn {
color: yellow;
Expand Down Expand Up @@ -303,22 +205,6 @@ table.remotemanagement td.noneconfigured {
text-decoration: underline;
}

/* Key import popup. */
.importKeyTable {
border-collapse: collapse;
width: 100%;
}
.importKeyHowto {
padding: 8px;
}
.importKeyOr {
color: red !important;
font-weight: bold;
}
.importKeyText, .importKeyUpload {
font-weight: bold;
}

/* Thread page */
.threadSummary {
margin: 5px 3px;
Expand Down Expand Up @@ -430,8 +316,8 @@ span.mimePartInfoSize {
.closeImg {
background-image: url("graphics/close.png");
}
.editImg {
background-image: url("graphics/edit.png");
.reloadImg {
background-image: url("graphics/reload.png");
}
.readonlyImg,
.horde-buttonbar li.readonlyImg {
Expand Down

0 comments on commit 04a1bc7

Please sign in to comment.