Commit 35b58018 authored by Athina Bekakou's avatar Athina Bekakou Committed by Giorgos Korfiatis

admin-ui: Rename attribute 'data-key' to 'name'

parent e450833e
......@@ -195,7 +195,7 @@ snf = {
},
html: {
singleItemInfo: '<dl class="dl-horizontal info-list" data-itemid=<%= id %>><dt>Name:</dt><dd><%= name %></dd><dt>ID:</dt><dd><%= id %></dd><dl>',
singleItemInfoWithEmailInput: '<dl class="dl-horizontal info-list" data-itemid=<%= id %>><dt>Name:</dt><dd><%= name %></dd><dt>ID:</dt><dd><%= id %></dd><dt>New e-mail:</dt><dd><input placeholder="new e-mail" class="new-email" data-key="new_email"><a data-error="invalid-email" data-toggle="popover" data-trigger="hover" class="error-sign snf-exclamation-sign" href="#" rel="tooltip" data-content="Invalid e&#8209mail address."></a></dd><dl>',
singleItemInfoWithEmailInput: '<dl class="dl-horizontal info-list" data-itemid=<%= id %>><dt>Name:</dt><dd><%= name %></dd><dt>ID:</dt><dd><%= id %></dd><dt>New e-mail:</dt><dd><input placeholder="new e-mail" class="new-email" name="new_email"><a data-error="invalid-email" data-toggle="popover" data-trigger="hover" class="error-sign snf-exclamation-sign" href="#" rel="tooltip" data-content="Invalid e&#8209mail address."></a></dd><dl>',
removeLogLine: '<a href="" class="remove-icon remove-log" title="Remove this line">X</a>',
notifyPending: '<p class="log" id="<%= logID %>"><span class="pending state-icon snf-font-admin snf-exclamation-sign"></span>Action <b>"<%= actionName %>"</b><% if (itemsCount==1) { %> for <%= itemsCount %> item <% } else if (itemsCount>0) { %> for <%= itemsCount %> items <% } %> is <b class="pending">pending</b>.<%= removeBtn %></p>',
notifySuccess: '<p class="log"><span class="success state-icon snf-font-admin snf-ok"></span>Action <b>"<%= actionName %>"</b><% if (itemsCount==1) { %> for <%= itemsCount %> item <% } else if (itemsCount>0) { %> for <%= itemsCount %> items <% } %> <b class="succeed">succeeded</b>.<%= removeBtn %></p>',
......@@ -209,7 +209,7 @@ snf = {
warningDuplicates: '<p class="warning-duplicate">Duplicate accounts have been detected.</p>',
commonRow: '<tr data-itemid=<%= itemID %> <% if(hidden) { %> class="hidden-row" <% } %> ><td class="item-name"><%= itemName %></td><td class="item-id"><%= itemID %></td><td class="owner-name"><%= ownerName %></td><td class="owner-email"><div class="wrap"><a class="remove" title="Remove item from selection">X</a><%= ownerEmail %></div></td></tr>',
contactRow: '<tr <% if(showAssociations) { %> title="related with: <%= associations %>" <% } %> data-itemid=<%= itemID %> <% if(hidden) { %> class="hidden-row" <% } %> ><td class="full-name"><%= fullName %></td><td class="email"><div class="wrap"><a class="remove" title="Remove item from selection">X</a><%= email %></div></td></tr>',
modifyEmailRow: '<tr data-itemid=<%= itemID %> <% if(hidden) { %> class="hidden-row" <% } %> ><td class="full-name"><%= fullName %></td><td class="item-id"><%= itemID %></td><td class="email"><div class="wrap"><%= email %></div></td><td class="wrap td-with-input"><input placeholder="new e-mail" class="new-email" data-key="new_email"><a data-error="invalid-email" data-toggle="popover" data-trigger="hover" class="error-sign snf-exclamation-sign" href="#" rel="tooltip" data-content="Invalid e&#8209mail address."></a><a class="remove" title="Remove item from selection">X</a></td></tr>',
modifyEmailRow: '<tr data-itemid=<%= itemID %> <% if(hidden) { %> class="hidden-row" <% } %> ><td class="full-name"><%= fullName %></td><td class="item-id"><%= itemID %></td><td class="email"><div class="wrap"><%= email %></div></td><td class="wrap td-with-input"><input placeholder="new e-mail" class="new-email" name="new_email"><a data-error="invalid-email" data-toggle="popover" data-trigger="hover" class="error-sign snf-exclamation-sign" href="#" rel="tooltip" data-content="Invalid e&#8209mail address."></a><a class="remove" title="Remove item from selection">X</a></td></tr>',
}
},
......
......@@ -151,7 +151,7 @@ $(document).ready(function() {
itemData['id'] = $list.attr('data-itemid');
if(hasInputs) {
itemData['data'] = {};
var key = $list.find('dd input').attr('data-key');
var key = $list.find('dd input').attr('name');
var value = $list.find('dd input').val();
itemData['data'][key] = value;
}
......
......@@ -694,7 +694,7 @@ $(document).ready(function() {
itemData['id'] = $(this).attr('data-itemid');
if(hasInputs) {
$(this).find('input').each(function() {
var key = $(this).attr('data-key');
var key = $(this).attr('name');
itemData['data'][key] = $(this).val();
})
}
......
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