Commit 6d6a617d by zhangle

text model can copy config

parent b264b490
...@@ -154,7 +154,7 @@ ...@@ -154,7 +154,7 @@
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">&times;</span></button> aria-hidden="true">&times;</span></button>
<button class="btn close" data-clipboard-text="{{text}}" data-tooltip="tooltip" <button class="btn close clipboard" data-clipboard-text="{{text}}" data-tooltip="tooltip"
data-placement="bottom" title="复制"> data-placement="bottom" title="复制">
<img class="i-20" src="img/clippy.svg" style="margin-right: 5px;margin-top: -2px;"> <img class="i-20" src="img/clippy.svg" style="margin-right: 5px;margin-top: -2px;">
</button> </button>
......
...@@ -385,6 +385,7 @@ application_module.controller("ConfigNamespaceController", ...@@ -385,6 +385,7 @@ application_module.controller("ConfigNamespaceController",
} }
$('.config-item-container').removeClass('hide'); $('.config-item-container').removeClass('hide');
new Clipboard('.btn');
new Clipboard('.clipboard');
}]); }]);
...@@ -94,6 +94,13 @@ ...@@ -94,6 +94,13 @@
</ul> </ul>
</div> </div>
<div class="col-md-4 text-right"> <div class="col-md-4 text-right">
<a class="clipboard"
data-clipboard-text="{{namespace.text}}"
data-tooltip="tooltip" data-placement="bottom" title="复制文本"
ng-show="!namespace.isTextEditing && namespace.viewType == 'text' && namespace.hasModifyPermission">
<img src="img/copy.png" class="ns_btn">
</a>
&nbsp;
<a data-tooltip="tooltip" data-placement="bottom" title="取消修改" <a data-tooltip="tooltip" data-placement="bottom" title="取消修改"
ng-show="namespace.isTextEditing && namespace.viewType == 'text'" ng-show="namespace.isTextEditing && namespace.viewType == 'text'"
ng-click="toggleTextEditStatus(namespace)"> ng-click="toggleTextEditStatus(namespace)">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment