From 7c296a6cf915da6630422ceb8e253ebf9f004964 Mon Sep 17 00:00:00 2001
From: kondou
Date: Sun, 18 Aug 2013 17:37:22 +0200
Subject: [PATCH] Move .errormsg from settings-css to .warning in core.
Reusable!
---
core/css/styles.css | 12 +++++++++++-
settings/css/settings.css | 8 --------
settings/js/apps.js | 10 +++++-----
settings/templates/apps.php | 2 +-
4 files changed, 17 insertions(+), 15 deletions(-)
diff --git a/core/css/styles.css b/core/css/styles.css
index becf0af9056..39121fccb23 100644
--- a/core/css/styles.css
+++ b/core/css/styles.css
@@ -389,7 +389,7 @@ label.infield { cursor:text !important; top:1.05em; left:.85em; }
/* Warnings and errors are the same */
-.warning, .update, .error {
+#body-login .warning, #body-login .update, #body-login .error {
display: block;
padding: 10px;
color: #dd3b3b;
@@ -401,6 +401,16 @@ label.infield { cursor:text !important; top:1.05em; left:.85em; }
border-radius: 5px;
cursor: default;
}
+
+#body-user .warning, #body-settings .warning {
+ margin-top: 8px;
+ padding: 5px;
+ background: #fdd;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+}
+
.warning legend,
.warning a,
.error a {
diff --git a/settings/css/settings.css b/settings/css/settings.css
index 38c28dd33b9..d5ffe448482 100644
--- a/settings/css/settings.css
+++ b/settings/css/settings.css
@@ -92,14 +92,6 @@ span.version { margin-left:1em; margin-right:1em; color:#555; }
.appslink { text-decoration: underline; }
.score { color:#666; font-weight:bold; font-size:0.8em; }
-.errormsg {
- margin: 20px;
- padding: 5px;
- background: #fdd;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
-}
/* LOG */
#log { white-space:normal; }
diff --git a/settings/js/apps.js b/settings/js/apps.js
index 0ca1b5f7719..d9817aff6b6 100644
--- a/settings/js/apps.js
+++ b/settings/js/apps.js
@@ -51,10 +51,10 @@ OC.Settings.Apps = OC.Settings.Apps || {
page.find('span.score').hide();
}
if (typeof($('#leftcontent li[data-id="'+app.id+'"]').data('errormsg')) !== "undefined") {
- page.find(".errormsg").show();
- page.find(".errormsg").text($('#leftcontent li[data-id="'+app.id+'"]').data('errormsg'));
+ page.find(".warning").show();
+ page.find(".warning").text($('#leftcontent li[data-id="'+app.id+'"]').data('errormsg'));
} else {
- page.find(".errormsg").hide();
+ page.find(".warning").hide();
}
},
enableApp:function(appid, active, element) {
@@ -190,8 +190,8 @@ OC.Settings.Apps = OC.Settings.Apps || {
});
},
showErrorMessage: function(message) {
- $('#rightcontent .errormsg').show();
- $('#rightcontent .errormsg').text(message);
+ $('.appinfo .warning').show();
+ $('.appinfo .warning').text(message);
}
};
diff --git a/settings/templates/apps.php b/settings/templates/apps.php
index b6b731ac9c5..0b76f775fea 100644
--- a/settings/templates/apps.php
+++ b/settings/templates/apps.php
@@ -41,6 +41,6 @@
print_unescaped($l->t('-licensed by '));?>
-
+
--
2.39.5