66 var controllers ;
77 ( function ( controllers ) {
88 /*@ngInject */
9- function BaseCtrl ( $scope , $rootScope , $location , $filter , $modal , $data , routingService , formGenerator , recordHandler ) {
9+ function BaseCtrl ( $scope , $rootScope , $location , $filter , $uibModal , $data , routingService , formGenerator , recordHandler ) {
1010 var sharedStuff = $data ;
1111 var ctrlState = {
1212 master : { } ,
@@ -17,7 +17,7 @@ var fng;
1717 $scope . modelNameDisplay = sharedStuff . modelNameDisplay || $filter ( 'titleCase' ) ( $scope . modelName ) ;
1818 $rootScope . $broadcast ( 'fngFormLoadStart' , $scope ) ;
1919 formGenerator . decorateScope ( $scope , formGenerator , recordHandler , sharedStuff ) ;
20- recordHandler . decorateScope ( $scope , $modal , recordHandler , ctrlState ) ;
20+ recordHandler . decorateScope ( $scope , $uibModal , recordHandler , ctrlState ) ;
2121 recordHandler . fillFormWithBackendSchema ( $scope , formGenerator , recordHandler , ctrlState ) ;
2222 // Tell the 'model controllers' that they can start fiddling with basescope
2323 for ( var i = 0 ; i < sharedStuff . modelControllers . length ; i ++ ) {
@@ -26,7 +26,7 @@ var fng;
2626 }
2727 }
2828 }
29- BaseCtrl . $inject = [ "$scope" , "$rootScope" , "$location" , "$filter" , "$modal " , "$data" , "routingService" , "formGenerator" , "recordHandler" ] ;
29+ BaseCtrl . $inject = [ "$scope" , "$rootScope" , "$location" , "$filter" , "$uibModal " , "$data" , "routingService" , "formGenerator" , "recordHandler" ] ;
3030 controllers . BaseCtrl = BaseCtrl ;
3131 } ) ( controllers = fng . controllers || ( fng . controllers = { } ) ) ;
3232} ) ( fng || ( fng = { } ) ) ;
@@ -36,18 +36,18 @@ var fng;
3636 var controllers ;
3737 ( function ( controllers ) {
3838 /*@ngInject */
39- function SaveChangesModalCtrl ( $scope , $modalInstance ) {
39+ function SaveChangesModalCtrl ( $scope , $uibModalInstance ) {
4040 $scope . yes = function ( ) {
41- $modalInstance . close ( true ) ;
41+ $uibModalInstance . close ( true ) ;
4242 } ;
4343 $scope . no = function ( ) {
44- $modalInstance . close ( false ) ;
44+ $uibModalInstance . close ( false ) ;
4545 } ;
4646 $scope . cancel = function ( ) {
47- $modalInstance . dismiss ( 'cancel' ) ;
47+ $uibModalInstance . dismiss ( 'cancel' ) ;
4848 } ;
4949 }
50- SaveChangesModalCtrl . $inject = [ "$scope" , "$modalInstance " ] ;
50+ SaveChangesModalCtrl . $inject = [ "$scope" , "$uibModalInstance " ] ;
5151 controllers . SaveChangesModalCtrl = SaveChangesModalCtrl ;
5252 } ) ( controllers = fng . controllers || ( fng . controllers = { } ) ) ;
5353} ) ( fng || ( fng = { } ) ) ;
@@ -358,11 +358,11 @@ var fng;
358358 return {
359359 restrict : 'AE' ,
360360 replace : true ,
361- template : '<li ng-show="items.length > 0" class="dropdown mcdd" dropdown>' +
362- ' <a class="dropdown-toggle" dropdown-toggle>' +
361+ template : '<li ng-show="items.length > 0" class="mcdd" uib- dropdown>' +
362+ ' <a uib- dropdown-toggle>' +
363363 ' {{contextMenu}} <b class="caret"></b>' +
364364 ' </a>' +
365- ' <ul class="dropdown-menu">' +
365+ ' <ul class="uib-dropdown-menu dropdown-menu">' +
366366 ' <li ng-repeat="choice in items" ng-hide="isHidden($index)" ng-class="dropdownClass($index)">' +
367367 ' <a ng-show="choice.text" class="dropdown-option" ng-href="{{choice.url}}" ng-click="doClick($index, $event)">' +
368368 ' {{choice.text}}' +
@@ -695,21 +695,21 @@ var fng;
695695 }
696696 }
697697 if ( tabNo >= 0 ) {
698- result . before = '<tab select="updateQueryForTab(\'' + info . title + '\')" heading="' + info . title + '"' ;
698+ result . before = '<uib- tab select="updateQueryForTab(\'' + info . title + '\')" heading="' + info . title + '"' ;
699699 if ( tabNo > 0 ) {
700700 result . before += 'active="tabs[' + tabNo + '].active"' ;
701701 }
702702 result . before += '>' ;
703- result . after = '</tab>' ;
703+ result . after = '</uib- tab>' ;
704704 }
705705 else {
706706 result . before = '<p>Error! Tab ' + info . title + ' not found in tab list</p>' ;
707707 result . after = '' ;
708708 }
709709 break ;
710710 case 'tabset' :
711- result . before = '<tabset>' ;
712- result . after = '</tabset>' ;
711+ result . before = '<uib- tabset>' ;
712+ result . after = '</uib- tabset>' ;
713713 break ;
714714 case 'well' :
715715 result . before = '<div class="well">' ;
@@ -957,7 +957,7 @@ var fng;
957957 // maintain support for simplified tabset syntax for now
958958 if ( tabsSetup === tabsSetupState . N ) {
959959 tabsSetup = tabsSetupState . Forced ;
960- result += '<tabset>' ;
960+ result += '<uib- tabset>' ;
961961 }
962962 result += parts . before ;
963963 result += processInstructions ( info . content , null , options ) ;
@@ -1032,7 +1032,7 @@ var fng;
10321032 }
10331033 elementHtml += processInstructions ( newValue , true , attrs ) ;
10341034 if ( tabsSetup === tabsSetupState . Forced ) {
1035- elementHtml += '</tabset>' ;
1035+ elementHtml += '</uib- tabset>' ;
10361036 }
10371037 elementHtml += attrs . subschema ? '' : '</form>' ;
10381038 //console.log(elementHtml);
@@ -2287,8 +2287,10 @@ var fng;
22872287 $scope . getListData = function ( record , fieldName ) {
22882288 return recordHandlerInstance . getListData ( record , fieldName , $scope . select2List ) ;
22892289 } ;
2290- $scope . setPristine = function ( ) {
2291- $scope . dismissError ( ) ;
2290+ $scope . setPristine = function ( clearErrors ) {
2291+ if ( clearErrors ) {
2292+ $scope . dismissError ( ) ;
2293+ }
22922294 if ( $scope [ $scope . topLevelFormName ] ) {
22932295 $scope [ $scope . topLevelFormName ] . $setPristine ( ) ;
22942296 }
@@ -3160,7 +3162,7 @@ var fng;
31603162 }
31613163 else {
31623164 processServerData ( data , $scope , ctrlState ) ;
3163- $scope . setPristine ( ) ;
3165+ $scope . setPristine ( false ) ;
31643166 }
31653167 }
31663168 else {
@@ -3291,7 +3293,7 @@ var fng;
32913293 } ,
32923294 convertIdToListValue : convertIdToListValue ,
32933295 handleError : handleError ,
3294- decorateScope : function decorateScope ( $scope , $modal , recordHandlerInstance , ctrlState ) {
3296+ decorateScope : function decorateScope ( $scope , $uibModal , recordHandlerInstance , ctrlState ) {
32953297 $scope . handleHttpError = handleError ( $scope ) ;
32963298 $scope . cancel = function ( ) {
32973299 angular . copy ( ctrlState . master , $scope . record ) ;
@@ -3313,6 +3315,7 @@ var fng;
33133315 } ;
33143316 $scope . dismissError = function ( ) {
33153317 delete $scope . errorMessage ;
3318+ delete $scope . alertTitle ;
33163319 } ;
33173320 $scope . save = function ( options ) {
33183321 options = options || { } ;
@@ -3355,7 +3358,7 @@ var fng;
33553358 $scope . $on ( '$locationChangeStart' , function ( event , next ) {
33563359 if ( ! ctrlState . allowLocationChange && ! $scope . isCancelDisabled ( ) ) {
33573360 event . preventDefault ( ) ;
3358- var modalInstance = $modal . open ( {
3361+ var modalInstance = $uibModal . open ( {
33593362 template : '<div class="modal-header">' +
33603363 ' <h3>Record modified</h3>' +
33613364 '</div>' +
@@ -3383,7 +3386,7 @@ var fng;
33833386 } ) ;
33843387 $scope . deleteClick = function ( ) {
33853388 if ( $scope . record . _id ) {
3386- var modalInstance = $modal . open ( {
3389+ var modalInstance = $uibModal . open ( {
33873390 template : '<div class="modal-header">' +
33883391 ' <h3>Delete Item</h3>' +
33893392 '</div>' +
0 commit comments