Skip to content

Commit

Permalink
bugfix: confirm dialog no footer
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangle committed Sep 19, 2016
1 parent 33c59a5 commit 06c6cf6
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 9 deletions.
10 changes: 4 additions & 6 deletions apollo-portal/src/main/resources/static/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@
apollo-detail="'确定要回滚吗?'"
apollo-show-cancel-btn="true" apollo-confirm="rollback"></apolloconfirmdialog>


<div class="modal fade" id="showText" tabindex="-1" role="dialog">
<div class="modal-dialog" style="width: 960px;">
<div class="modal-content no-radius">
Expand Down Expand Up @@ -227,16 +228,13 @@ <h4 class="modal-title">发布</h4>
<td width="20%" title="{{config.item.key}}">
<span class="label label-danger"
ng-show="config.isDeleted">deleted</span>
<span ng-bind="config.item.key | limitTo: 250"></span>
<span ng-bind="config.item.key.length > 250 ? '...' :''"></span>
<span ng-bind="config.item.key"></span>
</td>
<td width="25%" title="{{config.oldValue}}">
<span ng-bind="config.oldValue | limitTo: 250"></span>
<span ng-bind="config.oldValue.length > 250 ? '...': ''"></span>
<span ng-bind="config.oldValue"></span>
</td>
<td width="25%" title="{{config.newValue}}">
<span ng-bind="config.newValue | limitTo: 250"></span>
<span ng-bind="config.newValue.length > 250 ? '...': ''"></span>
<span ng-bind="config.newValue"></span>
</td>
<td width="15%" ng-bind="config.item.dataChangeLastModifiedBy">
</td>
Expand Down
24 changes: 23 additions & 1 deletion apollo-portal/src/main/resources/static/config/sync.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ <h4 ng-bind="pageContext.namespaceName"></h4>
<span ng-bind="item.key | limitTo: 250"></span>
<span ng-bind="item.key.length > 250 ? '...' : ''"></span>
</td>
<td width="40%">
<td class="cursor-pointer" width="40%" ng-click="showText(item.value)">
<span ng-bind="item.value | limitTo: 250"></span>
<span ng-bind="item.value.length > 250 ? '...' : ''"></span>
</td>
Expand Down Expand Up @@ -196,8 +196,29 @@ <h3>同步失败!</h3>

</div>
</section>

<div class="modal fade" id="showText" tabindex="-1" role="dialog">
<div class="modal-dialog" style="width: 960px;">
<div class="modal-content no-radius">
<div class="modal-header panel-primary">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">&times;</span></button>

<button class="btn close clipboard" data-clipboard-text="{{text}}" data-tooltip="tooltip"
data-placement="bottom" title="复制">
<img class="i-20" src="../img/clippy.svg" style="margin-right: 5px;margin-top: -2px;">
</button>
<h4 class="modal-title">查看</h4>
</div>
<pre id="watchText" class="modal-body no-radius" style="margin-bottom: 0" ng-bind="text"></pre>

</div>
</div>
</div>
</div>



<div ng-include="'../views/common/footer.html'"></div>

<!-- jquery.js -->
Expand All @@ -217,6 +238,7 @@ <h3>同步失败!</h3>
<!--nicescroll-->
<script src="../vendor/jquery.nicescroll.min.js"></script>

<script src="../vendor/clipboard.min.js" type="text/javascript"></script>
<!--biz-->
<script type="application/javascript" src="../scripts/app.js"></script>
<script type="application/javascript" src="../scripts/services/AppService.js"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ sync_item_module.controller("SyncItemController",

$scope.filter = filter;
$scope.resetFilter = resetFilter;

$scope.showText = showText;

init();

Expand Down Expand Up @@ -222,5 +224,13 @@ sync_item_module.controller("SyncItemController",
filter();
}

function showText(text) {
$scope.text = text;
$('#showText').modal('show');
}


new Clipboard('.clipboard');

}]);

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<hr>
<p class="text-center">
<span class="glyphicon glyphicon-copyright-mark" aria-hidden="true"></span>携程 框架研发部<br>
<a href="http://conf.ctripcorp.com/display/FRAM/Apollo" target="_blank">wiki</a>
<a href="https://github.com/ctripcorp/apollo" target="_blank">github</a>
</p>
</div>
<iframe src="/sso_heartbeat" class="hide"></iframe>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ <h4 class="modal-title">{{title}}</h4>
<div class="modal-body">
{{detail}}
</div>
<div class="modal-footer" ng-show="showFooter">
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal" ng-show="showCancelBtn">取消</button>
<button type="button" class="btn btn-danger" data-dismiss="modal"
ng-click="confirm()">
Expand Down

0 comments on commit 06c6cf6

Please sign in to comment.