Commit 4f59a9df45b98d92690eee49dc6fc0d4824bc4dd
1 parent
3edf656b
called DAController function from jspanel to close the jspanel and open DA view list.
Showing
2 changed files
with
24 additions
and
11 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
400-SOURCECODE/AIAHTML5.Web/libs/jquery/jquery_plugin/jsPanel/jspanel/jquery.jspanel.js
... | ... | @@ -69,7 +69,7 @@ var jsPanel = { |
69 | 69 | '<div class="jsPanel-hdr jsPanel-theme-default">' + |
70 | 70 | '<h3 class="jsPanel-title"></h3>' + |
71 | 71 | '<div class="jsPanel-hdr-r">' + |
72 | - '<div class="jsPanel-btn-close"><span class="jsglyph jsglyph-remove"></span></div>' + | |
72 | + '<div class="jsPanel-btn-close ng-click= openBodyView"><span class="jsglyph jsglyph-remove"></span></div>' + | |
73 | 73 | '<div class="jsPanel-btn-max"><span class="jsglyph jsglyph-maximize"></span></div>' + |
74 | 74 | '<div class="jsPanel-btn-norm"><span class="jsglyph jsglyph-normalize"></span></div>' + |
75 | 75 | '<div class="jsPanel-btn-min"><span class="jsglyph jsglyph-minimize"></span></div>' + |
... | ... | @@ -1441,8 +1441,12 @@ var jsPanel = { |
1441 | 1441 | panel.option.panelstatus = status; |
1442 | 1442 | panel.data("panelstatus", status); |
1443 | 1443 | panel.alterClass("jsPanel-state-*", "jsPanel-state-" + status); |
1444 | - } | |
1444 | + }, | |
1445 | 1445 | |
1446 | + getScope: function (ctrlName) { | |
1447 | + var sel = 'div[ng-controller="' + ctrlName + '"]'; | |
1448 | + return angular.element(sel).scope(); | |
1449 | + }, | |
1446 | 1450 | }; |
1447 | 1451 | |
1448 | 1452 | console.log("jsPanel version: " + jsPanel.version); |
... | ... | @@ -1604,17 +1608,22 @@ console.log("jsPanel version: " + jsPanel.version); |
1604 | 1608 | // jsPanel close |
1605 | 1609 | $('.jsPanel-btn-close', jsP).on('click', function (e) { |
1606 | 1610 | alert('2') |
1607 | - e.preventDefault(); | |
1608 | - if (!jsP.option.controls.confirmClose) { | |
1609 | - jsPanel.close(jsP, jsP.parentElmtTagname); | |
1610 | - } else { | |
1611 | - if (window.confirm(jsP.option.controls.confirmClose) === true) { | |
1612 | - jsPanel.close(jsP, jsP.parentElmtTagname); | |
1613 | - } | |
1614 | - } | |
1615 | - window.location.href = "da-view-list"; | |
1611 | + //e.preventDefault(); | |
1612 | + //if (!jsP.option.controls.confirmClose) { | |
1613 | + // jsPanel.close(jsP, jsP.parentElmtTagname); | |
1614 | + //} else { | |
1615 | + // if (window.confirm(jsP.option.controls.confirmClose) === true) { | |
1616 | + // jsPanel.close(jsP, jsP.parentElmtTagname); | |
1617 | + // } | |
1618 | + //} | |
1619 | + var $scope = jsPanel.getScope('DAController'); | |
1620 | + $scope.openParent(); | |
1621 | + $scope.$apply(); | |
1616 | 1622 | }); |
1617 | 1623 | |
1624 | + | |
1625 | + | |
1626 | + | |
1618 | 1627 | // jsPanel minimize |
1619 | 1628 | $('.jsPanel-btn-min', jsP).on('click', function (e) { |
1620 | 1629 | e.preventDefault(); | ... | ... |