浏览代码

Customer portal : Form, sticky buttons as pictos only in both plain page and modal layouts. Also, pictos were added to regular bottom buttons

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@4097 a333f486-631f-4898-b8df-5754b55c2be0
glajarige 9 年之前
父节点
当前提交
172afc90f6

+ 13 - 9
datamodels/2.x/itop-portal-base/portal/src/views/bricks/object/mode_create.html.twig

@@ -30,8 +30,14 @@
 			{% endif %}
 			<div class="form_btn_regular">
 				{% if form.editable_fields_count is defined and form.editable_fields_count > 0 %}
-					<button class="btn btn-default form_btn_cancel" type="button" value="cancel" title="{{ 'Portal:Button:Cancel'|dict_s }}" data-dismiss="modal">{{ 'Portal:Button:Cancel'|dict_s }}</button>
-					<button class="btn btn-primary form_btn_submit" type="submit" value="submit" title="{{ 'Portal:Button:Submit'|dict_s }}">{{ 'Portal:Button:Submit'|dict_s }}</button>
+					<button class="btn btn-default form_btn_cancel" type="button" value="cancel" title="{{ 'Portal:Button:Cancel'|dict_s }}" data-dismiss="modal">
+						<span class="glyphicon glyphicon-remove"></span>
+						{{ 'Portal:Button:Cancel'|dict_s }}
+					</button>
+					<button class="btn btn-primary form_btn_submit" type="submit" value="submit" title="{{ 'Portal:Button:Submit'|dict_s }}">
+						<span class="glyphicon glyphicon-ok"></span>
+						{{ 'Portal:Button:Submit'|dict_s }}
+					</button>
 				{% else %}
 					{% if tIsModal %}
 						<input class="btn btn-default form_btn_cancel" type="button" value="{{ 'Portal:Button:Close'|dict_s }}" data-dismiss="modal">
@@ -66,13 +72,11 @@
 			var oNormalRegularButtons_{{ sFormIdSanitized }} = $('#{{ sFormId }} .form_btn_regular');
 			var oStickyRegularButtons_{{ sFormIdSanitized }} = oNormalRegularButtons_{{ sFormIdSanitized }}.clone(true, true);
 			oStickyRegularButtons_{{ sFormIdSanitized }}.addClass('sticky');
-			{% if tIsModal == true %}
-				oStickyRegularButtons_{{ sFormIdSanitized }}.find('.form_btn_submit').html('<span class="glyphicon glyphicon-ok"></span>');
-				oStickyRegularButtons_{{ sFormIdSanitized }}.find('.form_btn_cancel').html('<span class="glyphicon glyphicon-remove"></span>');
-				$('#{{ sFormId }}').closest('.modal').append(oStickyRegularButtons_{{ sFormIdSanitized }});
-			{% else %}
-				$('#{{ sFormId }}').closest('#main-content').append(oStickyRegularButtons_{{ sFormIdSanitized }});
-			{% endif %}
+			oStickyRegularButtons_{{ sFormIdSanitized }}.find('.form_btn_submit').html( oStickyRegularButtons_{{ sFormIdSanitized }}.find('.form_btn_submit span.glyphicon')[0].outerHTML );
+			oStickyRegularButtons_{{ sFormIdSanitized }}.find('.form_btn_cancel').html( oStickyRegularButtons_{{ sFormIdSanitized }}.find('.form_btn_cancel span.glyphicon')[0].outerHTML );
+			
+			$('#{{ sFormId }}').closest({% if tIsModal == true %}'.modal'{% else %}'#main-content'{% endif %}).append(oStickyRegularButtons_{{ sFormIdSanitized }});
+			
 			// - Global timeout for any
 			var oScrollTimeout;
 			// - Scroll handler

+ 18 - 16
datamodels/2.x/itop-portal-base/portal/web/css/portal.css

@@ -616,6 +616,10 @@ table .group-actions .item-action-wrapper .panel-body > p:last-child{
 	margin-left: 0.5em;
 	font-size: 0.85em;
 	color: #d9230f; /* TODO : SASS this to primary color */
+	transition: transform 0.2s linear;
+}
+.form_linkedset_toggler > .glyphicon.collapsed{
+	transform: rotateZ(-90deg);
 }
 /* - DataTables : Loader */
 .form_linkedset_wrapper .datatables_overlay{
@@ -769,6 +773,9 @@ table .group-actions .item-action-wrapper .panel-body > p:last-child{
 .form_buttons .form_btn_transitions{
 	margin-bottom: 20px;
 }
+.form_buttons .btn .glyphicon{
+	margin-right: 0.5em;
+}
 .form_btn_regular.sticky{
 	display: none;
 }
@@ -786,32 +793,27 @@ table .group-actions .item-action-wrapper .panel-body > p:last-child{
 	.form_btn_regular.sticky{
 		display: block;
 		position: fixed;
+		bottom: 5em;
+		right: -2px; /* TODO : SASS this to col-xs-12 padding */
 		padding: 15px;
 		background-color: #FFF; /* TODO : SASS this to panel bg */
 		border: 1px solid #DDD; /* TODO : SASS this to panel border */
 		border-radius: 4px; /* TODO : SASS this to panel border */
-	}
-	/* - For regular layout */
-	#main-content .form_btn_regular.sticky{
-		bottom: 0px;
-		right: 15px; /* TODO : SASS this to col-xs-12 padding */
-		transition: bottom 0.3s;
-	}
-	#main-content .form_btn_regular.sticky.closed{
-		bottom: -80px;
-	}
-	/* - For modal layout */
-	.modal.in .form_btn_regular.sticky{
-		bottom: 5em;
-		right: 15px; /* TODO : SASS this to col-xs-12 padding */
 		transition: right 0.3s;
 	}
-	.modal.in .form_btn_regular.sticky.closed{
+	.form_btn_regular.sticky.closed{
 		right: -75px;
 	}
-	.modal.in .form_btn_regular.sticky button{
+	.form_btn_regular.sticky button{
 		display: block;
 	}
+	.form_btn_regular.sticky button:first-child{
+		margin-bottom: 4px;
+	}
+	/* - Adjustments for modal sticky buttons */
+	.modal.in .form_btn_regular.sticky{
+		/*right: 15px;*/ /* TODO : SASS this to col-xs-12 padding */
+	}
 }
 
 /* CKEditor : Adding BS error feedback */