From d0e683e2b102e6d2a336e47c099af16049c1b244 Mon Sep 17 00:00:00 2001 From: Balwinder Katoch Date: Mon, 14 Dec 2015 20:28:03 +0000 Subject: [PATCH] changes --- bower.json | 8 +++++--- dist/avamUI.controller.js | 25 +++--------------------- help.txt | 1 + package.json | 9 ++++++--- src/avamUI.controller.ts | 31 +++-------------------------- src/avamUi.css | 41 --------------------------------------- tsd.json | 7 +++++-- 7 files changed, 23 insertions(+), 99 deletions(-) delete mode 100644 src/avamUi.css diff --git a/bower.json b/bower.json index 5840291..8ea5c84 100644 --- a/bower.json +++ b/bower.json @@ -28,10 +28,12 @@ ], "dependencies": { "angular": "~1.4.8", + "angular-ui-router": "ui-router#~0.2.15", "jquery": "~2.1.4", "bootstrap": "~3.3.6", - "font-awesome": "~4.5.0", - "avam-menu": "https://github.com/vickykatoch/avam-menu.git", - "dist": "https://github.com/vickykatoch/avam-menu/tree/master/dist" + "font-awesome": "~4.5.0" + }, + "devDependencies": { + "angular-animate": "~1.4.8" } } diff --git a/dist/avamUI.controller.js b/dist/avamUI.controller.js index 2ee89db..299f9b7 100644 --- a/dist/avamUI.controller.js +++ b/dist/avamUI.controller.js @@ -14,12 +14,6 @@ var avam; this.isMenuVisible = true; this.isMenuButtonVisible = false; this.route = ""; - // $(window).on('resize.avam', function(){ - // this.scope.$apply(function(){ - // this.checkWidth(); - // this.broadcastMenuState(); - // }) - // }); $(window).on('resize.avam', function (evt, args) { _this.scope.$apply(function () { _this.checkWidth(); @@ -33,20 +27,6 @@ var avam; _this.checkWidth(); _this.broadcastMenuState(); }, 0); - // ngTimeout(function(){ - // this.checkWidth(); - // this.broadcastMenuState(); - // },0); - // var checkWidth= function(){ - // var width = Math.max($(ngWin).width(), ngWin.innerWidth); - // scope.vm.isMenuVisible = (width >= 768); - // scope.vm.isMenuButtonVisible = !scope.vm.isMenuVisible; - // } - // var broadcastMenuState = function(){ - // rootScope.$broadcast('AVAM-MENU-VISIBILITY-CHANGED', { - // show: scope.vm.isMenuVisible, - // }); - // } } AvamUIModelController.prototype.checkWidth = function () { var width = Math.max($(this.ngWin).width(), this.ngWin.innerWidth); @@ -55,7 +35,9 @@ var avam; }; AvamUIModelController.prototype.broadcastMenuState = function () { this.rootScope.$broadcast('AVAM-MENU-VISIBILITY-CHANGED', { - show: this.isMenuVisible + show: this.isMenuVisible, + isVertical: this.isMenuButtonVisible, + allowToggle: !this.isMenuButtonVisible }); }; AvamUIModelController.prototype.onRouteChanged = function () { @@ -72,7 +54,6 @@ var avam; AvamUIModelController.prototype.toggleMenu = function () { this.isMenuVisible = !this.isMenuVisible; this.broadcastMenuState(); - this.scope.$apply(); }; AvamUIModelController.$inject = ['$scope', '$rootScope', '$window', '$timeout']; return AvamUIModelController; diff --git a/help.txt b/help.txt index 23baa81..78991cf 100644 --- a/help.txt +++ b/help.txt @@ -2,6 +2,7 @@ node ./node_modules/tsd/build/cli.js install node ./node_modules/gulp/bin/gulp.js build ./node_modules/bower/bin/bower install ./node_modules/http-server/bin/http-server +cp ./dist/*.* ../avamUI/lib/avam-menu/dist when files are deleted: git commit -a -m "message" \ No newline at end of file diff --git a/package.json b/package.json index cb680d7..af46714 100644 --- a/package.json +++ b/package.json @@ -22,8 +22,11 @@ "gulp-angular-filesort": "^1.1.1", "gulp-angular-templatecache": "^1.8.0", "gulp-concat": "^2.6.0", - "gulp-typescript": "^2.9.2", + "gulp-typescript": "^2.10.0", "gulp-uglify": "^1.5.1", - "http-server": "^0.8.5" - } + "http-server": "^0.8.5", + "typescript": "^1.7.3", + "tsd": "^0.6.5", + "bower": "^1.7.1" + } } diff --git a/src/avamUI.controller.ts b/src/avamUI.controller.ts index 05b666b..555009e 100644 --- a/src/avamUI.controller.ts +++ b/src/avamUI.controller.ts @@ -26,13 +26,6 @@ module avam.ui{ static $inject =['$scope', '$rootScope', '$window','$timeout']; constructor(private scope : IIAvamUIScope, private rootScope: ng.IRootScopeService, private ngWin : ng.IWindowService, private ngTimeout : ng.ITimeoutService){ - - // $(window).on('resize.avam', function(){ - // this.scope.$apply(function(){ - // this.checkWidth(); - // this.broadcastMenuState(); - // }) - // }); $(window).on('resize.avam',(evt: JQueryEventObject, args:any[]):any=> { this.scope.$apply(()=>{ @@ -50,23 +43,6 @@ module avam.ui{ this.checkWidth(); this.broadcastMenuState(); },0); - - // ngTimeout(function(){ - // this.checkWidth(); - // this.broadcastMenuState(); - // },0); - - // var checkWidth= function(){ - // var width = Math.max($(ngWin).width(), ngWin.innerWidth); - // scope.vm.isMenuVisible = (width >= 768); - // scope.vm.isMenuButtonVisible = !scope.vm.isMenuVisible; - // } - // var broadcastMenuState = function(){ - // rootScope.$broadcast('AVAM-MENU-VISIBILITY-CHANGED', { - // show: scope.vm.isMenuVisible, - // }); - // } - } checkWidth():void{ var width = Math.max($(this.ngWin).width(), this.ngWin.innerWidth); @@ -75,7 +51,9 @@ module avam.ui{ } broadcastMenuState():void { this.rootScope.$broadcast('AVAM-MENU-VISIBILITY-CHANGED', { - show: this.isMenuVisible + show: this.isMenuVisible, + isVertical : this.isMenuButtonVisible, + allowToggle : !this.isMenuButtonVisible }); } @@ -93,9 +71,6 @@ module avam.ui{ toggleMenu():void{ this.isMenuVisible= !this.isMenuVisible; this.broadcastMenuState(); - this.scope.$apply(); - - } } } \ No newline at end of file diff --git a/src/avamUi.css b/src/avamUi.css deleted file mode 100644 index fa83367..0000000 --- a/src/avamUi.css +++ /dev/null @@ -1,41 +0,0 @@ -.avam-header{ - background-color: white; - padding: 0 10px; - border-bottom: 2px solid red; - vertical-align: middle; -} -.avam-logo-area{ - -} -.avam-icon{ - display: inline-block; - width: 50px; - height: 50px; - margin: 8px; - vertical-align: top; - border: 1px solid #999; -} -.avam-title-area{ - display: inline-block; -} -.avam-logo-title{ - color: #111; - margin-top: 6px; - font-size: 22px; -} -.avam-logo-subtitle{ - font-size: 13px; - margin-top: -13px; -} -.avam-collapsed-menu { - line-height: 60px; - display: inline-block; - height: 100%; -} -.avam-right-side-controls{ - line-height: 60px; -} - -.avam-right-side-controls > div { - text-align: center; -} \ No newline at end of file diff --git a/tsd.json b/tsd.json index f6bf91a..60d14b0 100644 --- a/tsd.json +++ b/tsd.json @@ -6,10 +6,13 @@ "bundle": "typings/tsd.d.ts", "installed": { "angularjs/angular.d.ts": { - "commit": "e5a27ea95e47b95333784f1f0d590127b4e39a89" + "commit": "8ea42cd8bb11863ed6f242d67c502288ebc45a7b" }, "jquery/jquery.d.ts": { - "commit": "e5a27ea95e47b95333784f1f0d590127b4e39a89" + "commit": "8ea42cd8bb11863ed6f242d67c502288ebc45a7b" + }, + "angular-ui-router/angular-ui-router.d.ts": { + "commit": "8ea42cd8bb11863ed6f242d67c502288ebc45a7b" } } }