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

Interface générateur d'URL

parent be845c0e
No related branches found
No related tags found
No related merge requests found
......@@ -125,6 +125,27 @@ nsVmap.nsToolsManager.Urlexporter.prototype.urlExporterController.prototype.urlC
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
oVmap.module.directive('appUrlExporter', nsVmap.nsToolsManager.Urlexporter.prototype.urlExporterDirective);
oVmap.module.controller('AppUrlExporterController', nsVmap.nsToolsManager.Urlexporter.prototype.urlExporterController);
......@@ -8,9 +8,9 @@
<div>
<li role="presentation" style="position: inherit" class="basic-tools-dropdown">
<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)">
<span class="icon-at" aria-hidden="true"></span>
<span class="fa fa-link" aria-hidden="true"></span>
</a>
<div app-url-exporter app-lang="ctrl.lang" app-map="ctrl.map"
id="basic-tools-dropdown-urlexporter"
......
<!--UrlExporter-->
<div class="row margin-sides-0 margin-10">
<div class="col-md-3" ng-show="ctrl.properties.allow_public_connection">
<input type="checkbox" ng-model="ctrl.usePublicToken" id="publicAccountCheckbox">
<label for="publicAccountCheckbox" class="control-label">Public</label>
</div>
<div class="" ng-class="{'col-md-9' : ctrl.properties.allow_public_connection, 'col-md-12': !ctrl.properties.allow_public_connection}">
<label for="urlExporterField" class="control-label">URL</label>
<input type="text" class="form-control" ng-model="ctrl.urlToExport" id="urlExporterField">
<div class="col-md-12">
<div class="left">
<label for="urlExporterField" class="control-label">Lien vers la carte en cours</label>
</div>
<div class="right" ng-if="ctrl.properties.allow_public_connection">
<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>
\ No newline at end of file
<div class="col-md-12">
<div class="input-group">
<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>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment