1 |
- "use strict";app.controller("AlertDemoCtrl",["$scope",function(t){t.alerts=[{type:"danger",msg:"Oh snap! Change a few things up and try submitting again."},{type:"success",msg:"Well done! You successfully read this important alert message."}],t.addAlert=function(){t.alerts.push({msg:"Another alert!"})},t.closeAlert=function(e){t.alerts.splice(e,1)}}]).controller("ButtonsCtrl",["$scope",function(t){t.singleModel=1,t.radioModel="Middle",t.checkModel={left:!1,middle:!0,right:!1}}]).controller("ProgressDemoCtrl",["$scope",function(t){t.max=200,t.random=function(e){t.dynamic=e,t.type=type},t.random(),t.randomStacked=function(){t.stacked=[];for(var e=["success","info","warning","danger"],o=0,n=Math.floor(4*Math.random()+1);o<n;o++){var a=Math.floor(4*Math.random());t.stacked.push({value:Math.floor(30*Math.random()+1),type:e[a]})}},t.randomStacked()}]).controller("TooltipDemoCtrl",["$scope",function(t){t.dynamicTooltip="I am a dynamic Tooltip text",t.dynamicTooltipText="I am a dynamic Tooltip Popup text",t.htmlTooltip="I've been made <b>bold</b>!"}]).controller("PopoverDemoCtrl",["$scope",function(t){t.dynamicPopover="Hello, World!",t.dynamicPopoverTitle="Title",t.popoverType="bottom"}]).controller("PaginationDemoCtrl",["$scope","$log",function(t,e){t.totalItems=64,t.currentPage=4,t.setPage=function(e){t.currentPage=e},t.pageChanged=function(){e.log("Page changed to: "+t.currentPage)},t.maxSize=5,t.bigTotalItems=175,t.bigCurrentPage=1}]).controller("RatingDemoCtrl",["$scope",function(t){t.rate=7,t.max=10,t.isReadonly=!1,t.hoveringOver=function(e){t.overStar=e,t.percent=100*(e/t.max)},t.ratingStates=[{stateOn:"glyphicon-ok-sign",stateOff:"glyphicon-ok-circle"},{stateOn:"glyphicon-star",stateOff:"glyphicon-star-empty"},{stateOn:"glyphicon-heart",stateOff:"glyphicon-ban-circle"},{stateOn:"glyphicon-heart"},{stateOff:"glyphicon-off"}]}]).controller("DropdownCtrl",["$scope","$log",function(t,e){t.items=["The first choice!","And another choice for you.","but wait! A third!"],t.status={isopen:!1},t.toggled=function(t){e.log("Dropdown is now: ",t)},t.toggleDropdown=function(e){e.preventDefault(),e.stopPropagation(),t.status.isopen=!t.status.isopen}}]).controller("TabsDemoCtrl",["$scope","SweetAlert",function(t,e){t.tabs=[{title:"Dynamic Title 1",content:"Dynamic content 1"},{title:"Dynamic Title 2",content:"Dynamic content 2",disabled:!1}],t.alertMe=function(){setTimeout(function(){e.swal({title:"You've selected the alert tab!",confirmButtonColor:"#007AFF"})})}}]).controller("AccordionDemoCtrl",["$scope",function(t){t.oneAtATime=!0,t.groups=[{title:"Dynamic Group Header - 1",content:"Dynamic Group Body - 1"},{title:"Dynamic Group Header - 2",content:"Dynamic Group Body - 2"}],t.items=["Item 1","Item 2","Item 3"],t.addItem=function(){var e=t.items.length+1;t.items.push("Item "+e)},t.status={isFirstOpen:!0,isFirstDisabled:!1}}]).controller("DatepickerDemoCtrl",["$scope","$log",function(t,e){t.today=function(){t.dt=new Date},t.today(),t.clear=function(){t.dt=null},t.disabled=function(t,e){return"day"===e&&(0===t.getDay()||6===t.getDay())},t.toggleMin=function(){t.minDate=t.minDate?null:new Date},t.toggleMin(),t.open=function(e){e.preventDefault(),e.stopPropagation(),t.opened=!t.opened},t.endOpen=function(e){e.preventDefault(),e.stopPropagation(),t.startOpened=!1,t.endOpened=!t.endOpened},t.startOpen=function(e){e.preventDefault(),e.stopPropagation(),t.endOpened=!1,t.startOpened=!t.startOpened},t.dateOptions={formatYear:"yy",startingDay:1},t.formats=["dd-MMMM-yyyy","yyyy/MM/dd","dd.MM.yyyy","shortDate"],t.format=t.formats[0],t.hstep=1,t.mstep=15,t.options={hstep:[1,2,3],mstep:[1,5,10,15,25,30]},t.ismeridian=!0,t.toggleMode=function(){t.ismeridian=!t.ismeridian},t.update=function(){var e=new Date;e.setHours(14),e.setMinutes(0),t.dt=e},t.changed=function(){e.log("Time changed to: "+t.dt)},t.clear=function(){t.dt=null}}]).controller("DropdownCtrl",["$scope","$log",function(t,e){t.items=["The first choice!","And another choice for you.","but wait! A third!"],t.status={isopen:!1},t.toggled=function(t){e.log("Dropdown is now: ",t)},t.toggleDropdown=function(e){e.preventDefault(),e.stopPropagation(),t.status.isopen=!t.status.isopen}}]).controller("ModalDemoCtrl",["$scope","$modal","$log",function(t,e,o){t.items=["item1","item2","item3"],t.open=function(n){var a=e.open({templateUrl:"myModalContent.html",controller:"ModalInstanceCtrl",size:n,resolve:{items:function(){return t.items}}});a.result.then(function(e){t.selected=e},function(){o.info("Modal dismissed at: "+new Date)})}}]),app.controller("ModalInstanceCtrl",["$scope","$modalInstance","items",function(t,e,o){t.items=o,t.selected={item:t.items[0]},t.ok=function(){e.close(t.selected.item)},t.cancel=function(){e.dismiss("cancel")}}]);
|