From d5c96f5d0d08deb78baeb2e7e610a03e15f81310 Mon Sep 17 00:00:00 2001
From: Justin Richer <jricher@mit.edu>
Date: Thu, 23 Oct 2014 23:04:31 -0400
Subject: [PATCH] updated icons list, enhanced editor display

Addresses #679
---
 .../src/main/webapp/resources/js/scope.js     | 50 +++++++++----------
 .../main/webapp/resources/template/scope.html |  4 +-
 2 files changed, 28 insertions(+), 26 deletions(-)

diff --git a/openid-connect-server-webapp/src/main/webapp/resources/js/scope.js b/openid-connect-server-webapp/src/main/webapp/resources/js/scope.js
index df76fb3e9..b027d3fc4 100644
--- a/openid-connect-server-webapp/src/main/webapp/resources/js/scope.js
+++ b/openid-connect-server-webapp/src/main/webapp/resources/js/scope.js
@@ -239,30 +239,29 @@ var SystemScopeFormView = Backbone.View.extend({
 		if (!this.bootstrapIcons) {
 			this.bootstrapIcons = [];
 			
-    		var iconList = ['glass', 'music', 'search', 'envelope', 'heart', 'star',
-    		                'star-empty', 'user', 'film', 'th-large', 'th', 'th-list', 'ok',
-    		                'remove', 'zoom-in', 'zoom-out', 'off', 'signal', 'cog', 'trash',
-    		                'home', 'file', 'time', 'road', 'download-alt', 'download',
-    		                'upload', 'inbox', 'play-circle', 'repeat', 'refresh', 'list-alt',
-    		                'lock', 'flag', 'headphones', 'volume-off', 'volume-down',
-    		                'volume-up', 'qrcode', 'barcode', 'tag', 'tags', 'book',
-                			'bookmark', 'print', 'camera', 'font', 'bold', 'italic',
-                			'text-height', 'text-width', 'align-left', 'align-center',
-                			'align-right', 'align-justify', 'list', 'indent-left',
-                			'indent-right', 'facetime-video', 'picture', 'pencil',
-                			'map-marker', 'tint', 'share', 'move', 'fast-backward', 'backward',
-                			'pause', 'stop', 'forward', 'step-forward', 'eject',
-                			'chevron-right', 'plus-sign', 'minus-sign', 'remove-sign',
-                			'ok-sign', 'question-sign', 'info-sign', 'screenshot',
-                			'remove-circle', 'ok-circle', 'ban-circle', 'arrow-left',
-                			'arrow-right', 'arrow-down', 'share-alt', 'resize-full',
-                			'resize-small', 'plus', 'asterisk', 'exclamation-sign', 'gift',
-                			'leaf', 'fire', 'eye-close', 'plane', 'random', 'magnet',
-                			'chevron-up', 'chevron-down', 'retweet', 'shopping-cart',
-                			'folder-close', 'folder-open', 'resize-vertical',
-                			'resize-horizontal', 'hdd', 'bell', 'thumbs-up', 'hand-right',
-                			'hand-left', 'hand-down', 'circle-arrow-left', 'circle-arrow-up',
-                			'circle-arrow-down', 'globe', 'tasks', 'briefcase' ];
+    		var iconList = ['glass', 'music', 'search', 'envelope', 'heart', 'star', 'star-empty', 
+    		                'user', 'film', 'th-large', 'th', 'th-list', 'ok', 'remove', 'zoom-in', 
+    		                'zoom-out', 'off', 'signal', 'cog', 'trash', 'home', 'file', 'time', 'road', 
+    		                'download-alt', 'download', 'upload', 'inbox', 'play-circle', 'repeat', 
+    		                'refresh', 'list-alt', 'lock', 'flag', 'headphones', 'volume-off', 
+    		                'volume-down', 'volume-up', 'qrcode', 'barcode', 'tag', 'tags', 'book', 
+    		                'bookmark', 'print', 'camera', 'font', 'bold', 'italic', 'text-height', 
+    		                'text-width', 'align-left', 'align-center', 'align-right', 'align-justify', 
+    		                'list', 'indent-left', 'indent-right', 'facetime-video', 'picture', 'pencil', 
+    		                'map-marker', 'adjust', 'tint', 'edit', 'share', 'check', 'move', 'step-backward', 
+    		                'fast-backward', 'backward', 'play', 'pause', 'stop', 'forward', 'fast-forward', 
+    		                'step-forward', 'eject', 'chevron-left', 'chevron-right', 'plus-sign', 
+    		                'minus-sign', 'remove-sign', 'ok-sign', 'question-sign', 'info-sign', 
+    		                'screenshot', 'remove-circle', 'ok-circle', 'ban-circle', 'arrow-left', 
+    		                'arrow-right', 'arrow-up', 'arrow-down', 'share-alt', 'resize-full', 'resize-small', 
+    		                'plus', 'minus', 'asterisk', 'exclamation-sign', 'gift', 'leaf', 'fire', 
+    		                'eye-open', 'eye-close', 'warning-sign', 'plane', 'calendar', 'random', 
+    		                'comment', 'magnet', 'chevron-up', 'chevron-down', 'retweet', 'shopping-cart', 
+    		                'folder-close', 'folder-open', 'resize-vertical', 'resize-horizontal', 
+    		                'hdd', 'bullhorn', 'bell', 'certificate', 'thumbs-up', 'thumbs-down', 
+    		                'hand-right', 'hand-left', 'hand-up', 'hand-down', 'circle-arrow-right', 
+    		                'circle-arrow-left', 'circle-arrow-up', 'circle-arrow-down', 'globe', 
+    		                'wrench', 'tasks', 'filter', 'briefcase', 'fullscreen'];
     		
     		var size = 3;
     		while (iconList.length > 0) {
@@ -342,9 +341,10 @@ var SystemScopeFormView = Backbone.View.extend({
 		var icon = e.target.value;
 		
 		$('#iconDisplay input').val(icon);
-		$('#iconDisplay span').html(icon);
+		$('#iconDisplay #iconName').html(icon);
 		$('#iconDisplay i').removeClass();
 		$('#iconDisplay i').addClass('icon-' + icon);
+		$('#iconDisplay i').addClass('icon-white');
 		
 		$('#iconSelector').modal('hide');
 		
diff --git a/openid-connect-server-webapp/src/main/webapp/resources/template/scope.html b/openid-connect-server-webapp/src/main/webapp/resources/template/scope.html
index e2de14300..a6c540045 100644
--- a/openid-connect-server-webapp/src/main/webapp/resources/template/scope.html
+++ b/openid-connect-server-webapp/src/main/webapp/resources/template/scope.html
@@ -103,7 +103,9 @@
 				<div class="controls">
 
 					<span id="iconDisplay">
-						<i class="icon-<%-icon%>"></i> <span class="uneditable-input"><%-icon%></span>
+						<span class="badge badge-info"><i class="icon-<%-icon%> icon-white"></i> 
+							<span id="iconName"><%-icon%></span>
+						</span>
 
 						<input type="hidden" value="<%-icon%>">
 					</span>