summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-FE-common/client/app/views/functionalMenu/functionalMenu-dialog/menu-details.modal.html
blob: bae0e776b71df573e25d13916220a675f66c4282 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<div class="functionalMenu-details-modal">

		<div class="b2b-modal-header">
			<h2 class="titles" id="microservice-add-details-title">{{ngDialogData.title}}</h2>

			<div class="corner-button in">
				<button type="button" class="close" aria-label="Close"
					ng-click="$dismiss('cancel')"></button>
			</div>
		</div>

		<div class="b2b-modal-body">
		    <div class="functionalMenu-properties-main" scroll-top="functionalMenuDetails.scrollApi">

		   <form name="functionalMenuForm">

            <div class="span6" >
					<div class="item-label">Parent</div>
					<input id="input-parent" ddh-reset class="functionalMenu-height"
						 ng-model="functionalMenuDetails.menuLocation"
						type="text"	name="menuItem"  readonly="readonly"  />
			</div>
				
            <div class="span6" >
                <div class="item-label">Title</div>
                <input id="input-title" ddh-reset ng-readonly="!functionalMenuDetails.formEditable ? 'checked':'' " placeholder="Enter text"class="functionalMenu-height" ng-model="functionalMenuDetails.menutitle" type="text" name="text"/>
                <div id="div-error-conflict" class="error-container" ng-show="functionalMenuDetails.conflictMessages.text">
                    <small id="msg-error-conflict" id="functionalMenuDetails-input-title-conflict" class="err-message" ng-bind="functionalMenuDetails.conflictMessages.text"></small>
                </div>
            </div>
            
            
              <div class="span6">
                <div class="left-item">
                   <div class="item-label">URL</div>
                    <input id="input-url" ddh-reset ng-readonly="!functionalMenuDetails.formEditable ? 'checked':'' " class="functionalMenu-height" placeholder="http://" class="input-field" ng-model="functionalMenuDetails.menuItem.menu.url" type="url" name="url"/>
					<div id="error-url-conflict" ng-show="functionalMenuForm.url.$error.url">
					<small class="err-message error-msg-txt">Not valid URL!</small>
				</div>                
				</div>
                </div>
                 <div class="right-item">
                    <div class="item-label">App</div>
                 <div class="custom-select-wraps" ng-readonly="checked">
                    				<div id='ecomp-small-spinner' class="ecomp-small-spinner"
                    									ng-if="isAllApplications"></div>
                    				<div ng-if="!isAllApplications">
                                                
                         <div class="table-dropdown" >
							<select id="select-app" b2b-dropdown placeholder-text="Select Application" ng-model="functionalMenuDetails.selectedAppIndex" ng-change="functionalMenuDetails.updateSelectedApp(functionalMenuDetails.selectedAppIndex);">
				            	<option b2b-dropdown-list option-repeat="app in functionalMenuDetails.availableApps track by app.index" value="{{app.index}}">{{app.title}}</option>
				            </select>
						</div>
                    </div>
                    </div>
                    
                   
                    <!--<span class="err-message" ng-show="functionalMenuForm.app.$dirty && functionalMenuForm.app.$error.required"> Please select App!</span>-->
                 <!--   <pre>{{functionalMenuDetails.menuItem | json}}</pre> -->
                </div>
                
                <div class="item"
				ng-show="functionalMenuDetails.displayRoles==true">
				<div class="item-label">Roles</div>
				<div>
					<multiple-select id="dropdown-roles" unique-data="{{$index}}"
						placeholder="Select Roles"
						on-change="functionalMenuDetails.preSelectedRoles.roles"
						ng-model="functionalMenuDetails.availableRoles" name-attr="rolename"
						value-attr="isApplied"> </multiple-select>
				</div>
				</div>
            <div ng-show="functionalMenuDetails.selectedApp && functionalMenuDetails.selectedApp.isDisabled" class="err-message">Application is disabled</div>
           
        </form>
		  </div>
	
			</div>
			<br>
			<div class="b2b-modal-footer">
				 <div class="dialog-control">
        <div ng-if="ngDialogData.source!='view'">
            <span class="ecomp-save-spinner" ng-show="functionalMenuDetails.isSaving"></span>
            <span ng-if="ngDialogData.source=='edit' && functionalMenuDetails.isLeafMenuItem()">
                <button class="btn btn-alt btn-small" id="add-menu-button-save"
                        ng-show="!functionalMenuDetails.menuItem.menu.url ||
                        !(functionalMenuDetails.selectedApp.index>0) ||
                        functionalMenuDetails.displayRoles"
                        ng-disabled="!functionalMenuForm.text.$valid"
                        ng-click="functionalMenuDetails.saveChanges()">Save</button>
                <button class="btn btn-alt btn-small" id="add-menu-button-continue"
                        ng-show="!!functionalMenuDetails.menuItem.menu.url &&
                        functionalMenuDetails.selectedApp.index>0 &&
                        functionalMenuDetails.menutitle &&
                        !functionalMenuDetails.displayRoles"
                        ng-disabled="!functionalMenuForm.url.$valid" ng-click="functionalMenuDetails.continue()">Continue</button>
            </span>
            <span ng-if="ngDialogData.source=='add' || (ngDialogData.source=='edit' && !functionalMenuDetails.isLeafMenuItem())">
                <button id="button-save-add"
                        class="btn btn-alt btn-small" ng-show="!functionalMenuDetails.menuItem.menu.url || !(functionalMenuDetails.selectedApp.index>0)
                || functionalMenuDetails.isRoleSelected() || !functionalMenuDetails.menutitle" ng-disabled="!functionalMenuForm.text.$valid || !functionalMenuDetails.menutitle"
                        ng-click="functionalMenuDetails.saveChanges()">Save</button>
                <button id="button-save-continue" class="btn btn-alt btn-small" ng-show="!!functionalMenuDetails.menuItem.menu.url && functionalMenuDetails.selectedApp.index>0 && functionalMenuDetails.menutitle
                && !functionalMenuDetails.isRoleSelected()" ng-disabled="!functionalMenuForm.url.$valid"
                        ng-click="functionalMenuDetails.continue()">Continue</button>
            </span>
            <button id="button-cancel-close-dialog" class="btn btn-alt btn-small" ng-click="$dismiss('cancel')">Cancel</button>
        </div>
        <div ng-if="ngDialogData.source=='view'">
            <div  id="div-close-dialog"  class="btn btn-alt btn-small" ng-click="$dismiss('cancel')">Close</div>
        </div>
    </div>
			</div>
			
			
			

</div>