Styling the Permissions area. Fixed some of the BB views. Removed inline styles.


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/6b55be3a
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/6b55be3a
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/6b55be3a

Branch: refs/heads/master
Commit: 6b55be3af8823974f1ac35f65786918290f12de5
Parents: 724b3f2
Author: suelockwood <deathbearbr...@gmail.com>
Authored: Wed Sep 25 15:32:21 2013 -0400
Committer: Garren Smith <garren.sm...@gmail.com>
Committed: Fri Sep 27 11:28:04 2013 +0200

----------------------------------------------------------------------
 .../permissions/assets/less/permissions.less    | 32 ++++++++++++++++++++
 .../app/addons/permissions/templates/item.html  |  6 ++--
 .../permissions/templates/permissions.html      |  2 +-
 .../addons/permissions/templates/section.html   | 27 +++++++++++------
 src/fauxton/app/addons/permissions/views.js     |  7 +++--
 src/fauxton/assets/less/database.less           |  6 ++--
 src/fauxton/assets/less/fauxton.less            |  1 +
 7 files changed, 62 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/6b55be3a/src/fauxton/app/addons/permissions/assets/less/permissions.less
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/permissions/assets/less/permissions.less 
b/src/fauxton/app/addons/permissions/assets/less/permissions.less
new file mode 100644
index 0000000..5f5a0db
--- /dev/null
+++ b/src/fauxton/app/addons/permissions/assets/less/permissions.less
@@ -0,0 +1,32 @@
+.border-hdr {
+  border-bottom: 1px solid #E3E3E3;
+  margin-bottom: 10px;
+  .help{
+
+  }
+  h3{
+    text-transform: capitalize;
+    margin-bottom: 0;
+  }
+}
+
+
+.permission-items.unstyled{
+       margin-left: 0px;
+       li {
+               padding: 5px;
+               border-bottom: 1px solid #E3E3E3;
+               border-right: 1px solid #E3E3E3;
+               border-left: 3px solid #E3E3E3;
+               &:first-child{
+                       border-top: 1px solid #E3E3E3;
+               }
+               &:nth-child(odd){
+      border-left: 3px solid red;
+    }
+    button {
+       float: right;
+       margin-bottom: 6px;
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/couchdb/blob/6b55be3a/src/fauxton/app/addons/permissions/templates/item.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/permissions/templates/item.html 
b/src/fauxton/app/addons/permissions/templates/item.html
index aa01d0b..616ffd6 100644
--- a/src/fauxton/app/addons/permissions/templates/item.html
+++ b/src/fauxton/app/addons/permissions/templates/item.html
@@ -11,7 +11,7 @@ WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied. See the
 License for the specific language governing permissions and limitations under
 the License.
 -->
-<li> 
+
 <span> <%= item %> </span>
-<button type="button" style="float:none; margin-bottom:6px" 
class="close">&times;</button>
-</li> 
+<button type="button" class="close">&times;</button>
+

http://git-wip-us.apache.org/repos/asf/couchdb/blob/6b55be3a/src/fauxton/app/addons/permissions/templates/permissions.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/permissions/templates/permissions.html 
b/src/fauxton/app/addons/permissions/templates/permissions.html
index d247425..99c9ff5 100644
--- a/src/fauxton/app/addons/permissions/templates/permissions.html
+++ b/src/fauxton/app/addons/permissions/templates/permissions.html
@@ -11,5 +11,5 @@ WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied. See the
 License for the specific language governing permissions and limitations under
 the License.
 -->
-<p>Each database contains lists of admins and members. Admins and members are 
each defined by names and roles, which are lists of strings.</p>
+
 <div id="sections"> </div>

http://git-wip-us.apache.org/repos/asf/couchdb/blob/6b55be3a/src/fauxton/app/addons/permissions/templates/section.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/permissions/templates/section.html 
b/src/fauxton/app/addons/permissions/templates/section.html
index 102d857..09acbf2 100644
--- a/src/fauxton/app/addons/permissions/templates/section.html
+++ b/src/fauxton/app/addons/permissions/templates/section.html
@@ -11,27 +11,36 @@ WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied. See the
 License for the specific language governing permissions and limitations under
 the License.
 -->
-<h1> <%= section %> </h1>
+<header class="border-hdr">
+<h3> <%= (section) %> </h3>
 <p id="help"> <%= help %> </p>
+</header>
 
 <div class="row">
   <div class="span6">
-    <h3> Names </h3>
-    <ul id="items-names"></ul>
-
+    <header>
+      <h4> Users </h4>
+      <p>Specify users who will have <%= section %> access to this 
database.</p>
+    </header>
     <form class="permission-item-form form-inline">
       <input data-section="<%= section %>" data-type="names" type="text" 
class="item input-small" placeholder="Add Name">
-      <input type="submit" class="btn" value="Add Name" >
+      <button type="submit" class="button btn green fonticon-circle-plus">Add 
Name</button>
     </form>
-
+    <ul class="clearfix unstyled permission-items span10" id="<%= (section) 
%>-items-names">
+    </ul>
   </div>
   <div class="span6">
-    <h3> Roles </h3>
-    <ul id="items-roles"></ul>
+    <header>
+      <h4> Roles </h4>
+      <p>All users under the following role(s) will have <%= section %> 
access.</p>
+    </header>
+
 
     <form class="permission-item-form form-inline">
       <input data-section="<%= section %>" data-type="roles" type="text" 
class="item input-small" placeholder="Add Role">
-      <input type="submit" class="btn" value="Add Role" >
+      <button type="submit" class="button btn green fonticon-circle-plus">Add 
Role</button>
     </form>
+    <ul class="unstyled permission-items span10" id="<%= (section) 
%>-items-roles">
+    </ul>
   </div>
 </div>

http://git-wip-us.apache.org/repos/asf/couchdb/blob/6b55be3a/src/fauxton/app/addons/permissions/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/permissions/views.js 
b/src/fauxton/app/addons/permissions/views.js
index 4c2987b..eb5a378 100644
--- a/src/fauxton/app/addons/permissions/views.js
+++ b/src/fauxton/app/addons/permissions/views.js
@@ -75,7 +75,7 @@ function (app, FauxtonAPI, Permissions ) {
 
     events: {
       "submit .permission-item-form": "addItem",
-      'click .close': "removeItem"
+      'click button.close': "removeItem"
     },
 
     beforeRender: function () {
@@ -85,14 +85,14 @@ function (app, FauxtonAPI, Permissions ) {
       this.roleViews = [];
 
       _.each(section.names, function (name) {
-        var nameView = this.insertView('#items-names', new 
Permissions.PermissionItem({
+        var nameView = this.insertView('#'+this.section+'-items-names', new 
Permissions.PermissionItem({
           item: name,
         }));
         this.nameViews.push(nameView);
       }, this);
 
       _.each(section.roles, function (role) {
-        var roleView = this.insertView('#items-roles', new 
Permissions.PermissionItem({
+        var roleView = this.insertView('#'+this.section+'-items-roles', new 
Permissions.PermissionItem({
           item: role,
         }));
         this.roleViews.push(roleView);
@@ -164,6 +164,7 @@ function (app, FauxtonAPI, Permissions ) {
   });
 
   Permissions.PermissionItem = FauxtonAPI.View.extend({
+    tagName: "li",
     template: "addons/permissions/templates/item",
     initialize: function (options) {
       this.item = options.item;

http://git-wip-us.apache.org/repos/asf/couchdb/blob/6b55be3a/src/fauxton/assets/less/database.less
----------------------------------------------------------------------
diff --git a/src/fauxton/assets/less/database.less 
b/src/fauxton/assets/less/database.less
index 4b11427..6f2ae92 100644
--- a/src/fauxton/assets/less/database.less
+++ b/src/fauxton/assets/less/database.less
@@ -193,9 +193,9 @@ table.active-tasks{
         width: auto;
     }
 }
-#tabs {
-    height: 40px;
-}
+// #tabs {
+//     height: 40px;
+// }
 
 .databases{
     a.db-actions,

http://git-wip-us.apache.org/repos/asf/couchdb/blob/6b55be3a/src/fauxton/assets/less/fauxton.less
----------------------------------------------------------------------
diff --git a/src/fauxton/assets/less/fauxton.less 
b/src/fauxton/assets/less/fauxton.less
index ddf66f6..42b7836 100644
--- a/src/fauxton/assets/less/fauxton.less
+++ b/src/fauxton/assets/less/fauxton.less
@@ -979,3 +979,4 @@ div.spinner {
     margin-top: -4px;
   }
 }
+

Reply via email to