Index: frontends/php/js/functions.js
===================================================================
--- frontends/php/js/functions.js	(revision 28993)
+++ frontends/php/js/functions.js	(working copy)
@@ -843,13 +843,13 @@
 }
 
 /**
- *  Returns the size of an associative array.
+ * Returns the number of properties of an object.
  *
  * @param obj
  *
  * @return {Number}
  */
-jQuery.objectSize = function(obj) {
+function objectSize(obj) {
 	var size = 0, key;
 	for (key in obj) {
 		if (obj.hasOwnProperty(key)) size++;
Index: frontends/php/js/class.cmap.js
===================================================================
--- frontends/php/js/class.cmap.js	(revision 28993)
+++ frontends/php/js/class.cmap.js	(working copy)
@@ -333,7 +333,7 @@
 				for (linkid in this.data.links) {
 					link = this.data.links[linkid];
 					if (!!selementIds[link.selementid1] && !!selementIds[link.selementid2]
-							|| jQuery.objectSize(selementIds) === 1 && (!!selementIds[link.selementid1] || !!selementIds[link.selementid2])) {
+							|| objectSize(selementIds) === 1 && (!!selementIds[link.selementid1] || !!selementIds[link.selementid2])) {
 						linkIds.push(linkid);
 					}
 				}
@@ -518,6 +518,7 @@
 				jQuery('#formLinkApply').click(function() {
 					var linkData = that.linkForm.getValues();
 					that.links[that.currentLinkId].update(linkData)
+                    that.linkForm.updateList(that.selection.selements);
 				});
 				jQuery('#formLinkClose').click(function() {
 					that.linkForm.hide();
@@ -1473,7 +1474,7 @@
 			 */
 			show: function() {
 				this.domNode.show();
-				jQuery('#elementApply, #elementRemove').button('disable');
+				jQuery('.element-edit-control').button('disable');
 			},
 
 			/**
@@ -1482,7 +1483,7 @@
 			hide: function() {
 				jQuery('#linksList tr').removeClass('selected');
 				jQuery('#linkForm').hide();
-				jQuery('#elementApply, #elementRemove').button('enable');
+				jQuery('.element-edit-control').button('enable');
 			},
 
 			/**
@@ -1530,17 +1531,20 @@
 					i,
 					ln;
 
-				// get currenlty selected element
-				for (selementid in this.sysmap.selection.selements) {
-					selement1 = this.sysmap.selements[selementid];
-				}
+                // if only one element is selected, make sure that element1 is equal to the selected element and
+                // element2 - to the connected
+                if (this.sysmap.selection.count === 1) {
+                    // get currenlty selected element
+                    for (selementid in this.sysmap.selection.selements) {
+                        selement1 = this.sysmap.selements[selementid];
+                    }
 
-				// make that selementi1 always equal to selected element and selementid2 to connected
-				if (selement1.id !== link.selementid1) {
-					tmp = link.selementid1;
-					link.selementid1 = selement1.id;
-					link.selementid2 = tmp;
-				}
+                    if (selement1.id !== link.selementid1) {
+                        tmp = link.selementid1;
+                        link.selementid1 = selement1.id;
+                        link.selementid2 = tmp;
+                    }
+                }
 
 				// populate list of elements to connect with
 				jQuery('#selementid2').empty();
@@ -1654,7 +1658,7 @@
 				if (links.length) {
 					jQuery('#mapLinksContainer').show();
 
-					if (jQuery.objectSize(selementIds) > 1) {
+					if (objectSize(selementIds) > 1) {
 						rowTpl = '#massElementLinkTableRowTpl';
 						linkTable = jQuery('#mass-element-links');
 					}
@@ -1670,7 +1674,7 @@
 
 						// if multiple elements are selected, display element2 as the "to" element
 						// if only one element is selected, display the element on the opposite end
-						if (jQuery.objectSize(selementIds) > 1 || !!selementIds[link.selementid1]) {
+						if (objectSize(selementIds) > 1 || !!selementIds[link.selementid1]) {
 							linkedSelementid = link.selementid2;
 						}
 						else {
Index: frontends/php/include/views/js/configuration.sysmaps.js.php
===================================================================
--- frontends/php/include/views/js/configuration.sysmaps.js.php	(revision 28993)
+++ frontends/php/include/views/js/configuration.sysmaps.js.php	(working copy)
@@ -180,8 +180,8 @@
 			</tr>
 			<tr class="footer">
 				<td colspan="2" class="form_row_last">
-					<input id="elementApply" type="button" name="apply" value="<?php echo _('Apply'); ?>">
-					<input id="elementRemove" type="button" name="remove" value="<?php echo _('Remove'); ?>">
+					<input id="elementApply" class="element-edit-control" type="button" name="apply" value="<?php echo _('Apply'); ?>">
+					<input id="elementRemove" class="element-edit-control" type="button" name="remove" value="<?php echo _('Remove'); ?>">
 					<input id="elementClose" type="button" name="close" value="<?php echo _('Close'); ?>">
 				</td>
 			</tr>
@@ -269,8 +269,8 @@
 			</tr>
 			<tr class="footer">
 				<td colspan="2" class="form_row_last">
-					<input id="massApply" type="button" name="apply" value="<?php echo _('Apply'); ?>">
-					<input id="massRemove" type="button" name="remove" value="<?php echo _('Remove'); ?>">
+					<input id="massApply" class="element-edit-control" type="button" name="apply" value="<?php echo _('Apply'); ?>">
+					<input id="massRemove" class="element-edit-control" type="button" name="remove" value="<?php echo _('Remove'); ?>">
 					<input id="massClose" type="button" name="close" value="<?php echo _('Close'); ?>">
 				</td>
 			</tr>
@@ -289,7 +289,7 @@
 <script type="text/x-jquery-tmpl" id="linkFormTpl">
 	<div id="mapLinksContainer">
 		<table id="element-links" class="tableinfo element-links">
-			<caption><?php echo _('Element links'); ?></caption>
+			<caption><?php echo _('Links for the selected element'); ?></caption>
 			<thead>
 			<tr class="header">
 				<td></td>
