Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/angular.panels.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/angular.panels.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
require('./angular.panels');
module.exports = angular.panels;
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"name": "angular.panels",
"version": "1.0.0",
"version": "1.0.1",
"description": "Pure AngularJS based SidePanels (no jQuery)",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
Expand Down
12 changes: 10 additions & 2 deletions src/angular.panels.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@

//add panel
if (panel && panel.id) {
if(!panel.hasOwnProperty('dim')){
panel.dim = true;
}
panelList[panel.id] = panel;

}

//for chaining
Expand Down Expand Up @@ -53,10 +57,13 @@
panelElement.attr('style', panelsFactory.style(panel, true));
//if type of closeAction is function..
typeof openCallbackFunction == 'function' && openCallbackFunction();

panelsFactory.dim = panel.dim;
}

//open panel
panelsFactory.opened = id;

},

//panel close method
Expand All @@ -79,6 +86,7 @@

//close panel
panelsFactory.opened = undefined;
panelsFactory.dim = undefined;
},

//panel style
Expand Down Expand Up @@ -132,9 +140,9 @@
});

//add dim
element.append($compile('<div class="dimming" data-ng-class="{open : panels.opened}" data-ng-click="panels.close();"></div>')(scope));
element.append($compile('<div class="dimming" data-ng-class="{open : panels.dim}" data-ng-click="panels.close();"></div>')(scope));
}
}
};
}]);

})(angular);