Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Balwinder Katoch committed Dec 14, 2015
1 parent 36f4fde commit d0e683e
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 99 deletions.
8 changes: 5 additions & 3 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
25 changes: 3 additions & 22 deletions dist/avamUI.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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);
Expand All @@ -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 () {
Expand All @@ -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;
Expand Down
1 change: 1 addition & 0 deletions help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
31 changes: 3 additions & 28 deletions src/avamUI.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(()=>{
Expand All @@ -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);
Expand All @@ -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
});
}

Expand All @@ -93,9 +71,6 @@ module avam.ui{
toggleMenu():void{
this.isMenuVisible= !this.isMenuVisible;
this.broadcastMenuState();
this.scope.$apply();


}
}
}
41 changes: 0 additions & 41 deletions src/avamUi.css

This file was deleted.

7 changes: 5 additions & 2 deletions tsd.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}

0 comments on commit d0e683e

Please sign in to comment.