mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-14 10:47:57 +01:00
- Integrate to editor menu
This commit is contained in:
parent
2f52856ea1
commit
65db1acf6a
@ -315,7 +315,7 @@ mindplot.widget.Menu = new Class({
|
||||
var tagElem = $('tagIt');
|
||||
if (tagElem) {
|
||||
this._addButton('tagIt', false, false, function() {
|
||||
var reqDialog = new MooDialog.Request('c/tags.htm?mapId=' + mapId, null,
|
||||
var reqDialog = new MooDialog.Request('c/tags?mapId=' + mapId, null,
|
||||
{'class': 'modalDialog tagItModalDialog',
|
||||
closeButton:true,
|
||||
destroyOnClose:true,
|
||||
@ -333,11 +333,11 @@ mindplot.widget.Menu = new Class({
|
||||
var shareElem = $('shareIt');
|
||||
if (shareElem) {
|
||||
this._addButton('shareIt', false, false, function() {
|
||||
var reqDialog = new MooDialog.Request('c/iframeWrapper.htm?url=c/maps/' + mapId + "/publishf", null,
|
||||
{'class': 'modalDialog shareItModalDialog',
|
||||
var reqDialog = new MooDialog.Request('c/iframeWrapper?url=c/maps/' + mapId + "/sharef", null,
|
||||
{'class': 'modalDialog shareModalDialog',
|
||||
closeButton:true,
|
||||
destroyOnClose:true,
|
||||
title:'Share It'
|
||||
title:'Share'
|
||||
});
|
||||
reqDialog.setRequestOptions({
|
||||
onRequest: function() {
|
||||
@ -353,7 +353,7 @@ mindplot.widget.Menu = new Class({
|
||||
var publishElem = $('publishIt');
|
||||
if (publishElem) {
|
||||
this._addButton('publishIt', false, false, function() {
|
||||
var reqDialog = new MooDialog.Request('c/iframeWrapper.htm?url=c/maps/' + mapId + "/publishf", null,
|
||||
var reqDialog = new MooDialog.Request('c/iframeWrapper?url=c/maps/' + mapId + "/publishf", null,
|
||||
{'class': 'modalDialog publishModalDialog',
|
||||
closeButton:true,
|
||||
destroyOnClose:true,
|
||||
@ -374,7 +374,7 @@ mindplot.widget.Menu = new Class({
|
||||
if (historyElem) {
|
||||
|
||||
this._addButton('history', false, false, function() {
|
||||
var reqDialog = new MooDialog.Request('c/history.htm?action=list&goToMindmapList&mapId=' + mapId, null,
|
||||
var reqDialog = new MooDialog.Request('c/history?action=list&goToMindmapList&mapId=' + mapId, null,
|
||||
{'class': 'modalDialog historyModalDialog',
|
||||
closeButton:true,
|
||||
destroyOnClose:true,
|
||||
|
@ -189,5 +189,13 @@ div.modalDialog .title
|
||||
height:400px;
|
||||
}
|
||||
|
||||
.shareModalDialog .content {
|
||||
height:440px;
|
||||
}
|
||||
|
||||
div.shareModalDialog {
|
||||
width: 550px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -456,7 +456,7 @@ $(function() {
|
||||
var mapId = mapIds[0];
|
||||
$('#' + dialogElemId + ' .modal-body').load(urlTemplate.replace("{mapId}", mapId),
|
||||
function() {
|
||||
$('#' + dialogElemId + ' .btn-accept').click(function() {
|
||||
$('#' + dialogElemId + ' .btn-accept').unbind('click').click(function() {
|
||||
submitDialogForm();
|
||||
});
|
||||
$('#' + dialogElemId).modal();
|
||||
@ -464,11 +464,6 @@ $(function() {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
$("#actionButtons .shareMap").click(function() {
|
||||
});
|
||||
|
||||
|
||||
$('#foldersContainer li').click(function(event) {
|
||||
// Deselect previous option ...
|
||||
$('#foldersContainer li').removeClass('active');
|
||||
|
@ -56,7 +56,7 @@
|
||||
<p><strong>Add People:</strong></p>
|
||||
|
||||
<input type="text" id="collabEmails" name="collabEmails"
|
||||
placeholder="Enter collaborators emails separared by comas."/>
|
||||
placeholder="Enter collaborators emails separared by comas." class="span1"/>
|
||||
|
||||
<div class="btn-group" id="roleBtn">
|
||||
<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">Can edit
|
||||
@ -101,14 +101,14 @@ function onClickShare(aElem) {
|
||||
return role;
|
||||
}
|
||||
|
||||
function addCollaboration(email, role) {
|
||||
function addCollaboration(email, role, changeType) {
|
||||
var rowStr;
|
||||
var tableElem = $("#collabsTable");
|
||||
if (role != "owner") {
|
||||
// Add row to the table ...
|
||||
var rowTemplate = '\
|
||||
<tr data-collab="{email}" data-role="{role}">\
|
||||
<td>{email}</td>\
|
||||
<td>{email}{typeIcon}</td>\
|
||||
<td>\
|
||||
<div class="btn-group">\
|
||||
<a class="btn dropdown-toggle" data-toggle="dropdown" href="#""></a>\
|
||||
@ -123,6 +123,7 @@ function addCollaboration(email, role) {
|
||||
|
||||
rowStr = rowTemplate.replace(/{email}/g, email);
|
||||
rowStr = rowStr.replace(/{role}/g, role);
|
||||
rowStr = rowStr.replace(/{typeIcon}/g, changeType ? ' <span class="label label-success">' + changeType + '</span>' : "");
|
||||
var elem = tableElem.append(rowStr);
|
||||
|
||||
// Register change role event ...
|
||||
@ -228,7 +229,7 @@ $("#addBtn").click(function(event) {
|
||||
$("#collabEmails").val("");
|
||||
for (i = 0; i < emails.length; i++) {
|
||||
email = emails[i];
|
||||
addCollaboration(email, role);
|
||||
addCollaboration(email, role, 'New');
|
||||
}
|
||||
} else {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user