UNPKG

986 BJavaScriptView Raw
1import {cjsRightPanel} from "./cjs-right-panel";
2
3export default class cjsLeftPanel extends cjsRightPanel {
4 constructor() {
5 super();
6 this.componentId = "cjsLeftPanel";
7 this.template = require("./cjs-left-panel.html");
8 this.handledSwipeState = "leftBorder";
9 this.transition = "coverLeft";
10 this.nativeShowTransition = "showleftpanel";
11 this.nativeHideTransition = "hideleftpanel";
12 }
13 controller($scope) {
14 var self = $scope.componentDefinition;
15 super.controller($scope);
16
17 $scope.hideModal = function() {
18 var routeScope = self.app.scopesForRoutes[self.route];
19 if (self.data.closeCallback) {
20 routeScope.$eval(self.data.closeCallback)(self.data);
21 }
22
23 // need to reset this so the popup doesnt reopen if the page is reactivated.
24 self.app.setSharedUiComponentState(routeScope, self.id, false, true, self.data);
25 };
26 }
27}
\No newline at end of file