Browse Source

projects/users page tweaks

Nathaniel van Diepen 11 years ago
parent
commit
2a87195efd
3 changed files with 20 additions and 3 deletions
  1. 6 0
      data/pages/projects.template
  2. 2 2
      data/pages/users.template
  3. 12 1
      js/index.js

+ 6 - 0
data/pages/projects.template

@@ -4,6 +4,12 @@
 	</a>
 {{/if}}
 <div class="accordion">
+	<span class="icons">
+		{
+			"header": "ui-icon-wrench",
+			"activeHeader": "ui-icon-wrench"
+		}
+	</span>
 	{{#each projects}}
 		<h3>
 			{{title}}

+ 2 - 2
data/pages/users.template

@@ -1,6 +1,6 @@
 {{#each users}}
-	<a href="#~{{name}}">
+	<a class="button align-left" style="" href="#~{{name}}">
+		<span class="ui-icon ui-icon-person" style="float: left;"></span>
 		{{name}}
 	</a>
-	<br/>
 {{/each}}

+ 12 - 1
js/index.js

@@ -228,7 +228,18 @@
 				$(window).resize();
 			},
 			accordions: function(selector){
-				$(selector).find('.accordion').accordion();
+				$(selector).find('.accordion').each(function(){
+					var icons = {};
+					if($(this).children('.icons').length == 1){
+						icons = JSON.parse($(this).children('.icons').text());
+						$(this).children('.icons').remove();
+					}
+					$(this).accordion({
+						collapsible: true,
+						icons: icons,
+						active: false
+					});
+				});
 			},
 			buttons: function(selector){
 				$(selector).find('.button').button();