Skip to content
Snippets Groups Projects
Commit 65aa29c3 authored by Armand Bahi's avatar Armand Bahi
Browse files

Interface générateur d'URL

parent e85ab019
Branches
Tags
No related merge requests found
...@@ -125,6 +125,27 @@ nsVmap.nsToolsManager.Urlexporter.prototype.urlExporterController.prototype.urlC ...@@ -125,6 +125,27 @@ nsVmap.nsToolsManager.Urlexporter.prototype.urlExporterController.prototype.urlC
this["urlToExport"] = sUrl; this["urlToExport"] = sUrl;
}; };
/**
* Copy the generated URL on the clipboard
*
* @export
*/
nsVmap.nsToolsManager.Urlexporter.prototype.urlExporterController.prototype.copyUrl = function () {
oVmap.log("nsVmap.nsToolsManager.Urlexporter.urlExporterController.copyUrl");
/* Get the text field */
var copyText = document.getElementById("urlExporterField");
/* Select the text field */
copyText.select();
/* Copy the text inside the text field */
document.execCommand("copy");
$.notify('Copié', 'success');
}
// Définit la directive et le controller // Définit la directive et le controller
oVmap.module.directive('appUrlExporter', nsVmap.nsToolsManager.Urlexporter.prototype.urlExporterDirective); oVmap.module.directive('appUrlExporter', nsVmap.nsToolsManager.Urlexporter.prototype.urlExporterDirective);
oVmap.module.controller('AppUrlExporterController', nsVmap.nsToolsManager.Urlexporter.prototype.urlExporterController); oVmap.module.controller('AppUrlExporterController', nsVmap.nsToolsManager.Urlexporter.prototype.urlExporterController);
...@@ -8,9 +8,9 @@ ...@@ -8,9 +8,9 @@
<div> <div>
<li role="presentation" style="position: inherit" class="basic-tools-dropdown"> <li role="presentation" style="position: inherit" class="basic-tools-dropdown">
<a class="basic-tools-element pointer" <a class="basic-tools-element pointer"
title="Générateur d'URL" title="Lien vers la carte en cours"
onclick="oVmap.getToolsManager().getBasicTools().toggleTool(this)"> onclick="oVmap.getToolsManager().getBasicTools().toggleTool(this)">
<span class="icon-at" aria-hidden="true"></span> <span class="fa fa-link" aria-hidden="true"></span>
</a> </a>
<div app-url-exporter app-lang="ctrl.lang" app-map="ctrl.map" <div app-url-exporter app-lang="ctrl.lang" app-map="ctrl.map"
id="basic-tools-dropdown-urlexporter" id="basic-tools-dropdown-urlexporter"
......
<!--UrlExporter--> <!--UrlExporter-->
<div class="row margin-sides-0 margin-10"> <div class="row margin-sides-0 margin-10">
<div class="col-md-3" ng-show="ctrl.properties.allow_public_connection"> <div class="col-md-12">
<input type="checkbox" ng-model="ctrl.usePublicToken" id="publicAccountCheckbox"> <div class="left">
<label for="publicAccountCheckbox" class="control-label">Public</label> <label for="urlExporterField" class="control-label">Lien vers la carte en cours</label>
</div> </div>
<div class="" ng-class="{'col-md-9' : ctrl.properties.allow_public_connection, 'col-md-12': !ctrl.properties.allow_public_connection}"> <div class="right" ng-if="ctrl.properties.allow_public_connection">
<label for="urlExporterField" class="control-label">URL</label> <div class="checkbox checkbox-info checkbox-inline">
<input id="publicAccountCheckbox"
type="checkbox"
style="cursor:pointer;"
title=">Activer / Désactiver le mode public"
ng-model="ctrl.usePublicToken">
<label for="publicAccountCheckbox"
style="cursor:pointer"
title="Activer / Désactiver le mode public">
Public
</label>
</div>
</div>
</div>
<div class="col-md-12">
<div class="input-group">
<input type="text" class="form-control" ng-model="ctrl.urlToExport" id="urlExporterField"> <input type="text" class="form-control" ng-model="ctrl.urlToExport" id="urlExporterField">
<span class="input-group-btn">
<button type="button" class="btn btn-default" ng-click="ctrl.copyUrl()"><span class="icon-copy"></span></button>
</span>
</div>
</div> </div>
</div> </div>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment