When I double click the card the dialog pops up, and it is then possible to create comments. So far so good. When creating the comments it is possible to delete it.
The issue is, that the timestamps can't be removed. The way I'm trying to remove the timestamps is by this line: $('.labelStyle').remove();
I want to be able to remove the timestamps, like the others elements but how?
Live Demo
JQuery: "click" handler
$('#divComments').on('click', '.delete', function (e) {
var uniqueval = $(this).attr("for")
var NameOfDataValue = $('label[for=' + uniqueval + ']').text();
$('img[for=' + uniqueval + ']').remove();
$('label[for=' + uniqueval + ']').remove();
$('p[for=' + uniqueval + ']').remove();
$('.labelStyle').remove();
var arr = $('#divComments').data('comments');
var theIndex = -1;
for (var i = 0; i < arr.length; i++) {
if (arr[i].commentString== NameOfDataValue) {
theIndex = i;
break;
}
}
if (theIndex == -1) {
alert("Error");
}
else {
$('#divComments').data("comments").splice(theIndex, 1);
}
});
JQuery: Add comment function
function addComment(commentString) {
var container = $('#divComments');
var inputs = container.find('label');
var id = inputs.length + 1;
var data1 = {
commentString: commentString
};
var div = $('<div />', { class: 'CommentStyle' });
$('<label />', {
id: 'comment' + id,
for: 'comment' + id,
text: commentString
}).on('change', function () {
data1.commentString = $(this).text();
}).appendTo(div);
$('<br/>').appendTo(div);
var $Image = $('<img />',
{
"src": "/Pages/Images/alert.png",
"class": "CommentImage",
"for": "comment" + id
}).appendTo(container);
var d = new Date();
var $fulaDate = $('<div>' + d.getDate()
+ "-" + monthNames[d.getMonth()]
+ "-" + d.getFullYear()
+ "//" + d.getHours()
+ ":" + d.getMinutes()
+ '</div>').addClass('labelStyle').append(' ~').appendTo(div);
var $edit = $('<p />', {
class: 'edit',
for: 'comment' + id,
text: 'Edit'
}).append(' ~').appendTo(div);
var $delete = $('<p />', {
class: 'delete',
for: 'comment' + id,
text: 'Delete'
}).appendTo(div);
div.appendTo(container).focus();
container.data('comments').push(data1);
}
You could do:
$(this).parent().find('.labelStyle').remove();
This will select the parent of the clicked button (.CommentStyle) then find the .labelStyle and remove it.
Related
I am working on a web application in Visual Studio using visual basic and master pages. I have 10 textbox fields on a child page where I would like to emulate the iPhone password entry (ie. show the character entered for a short period of time then change that character to a bullet). This is the definition of one of the text box controls:
<asp:TextBox ID="txtMID01" runat="server" Width="200" MaxLength="9"></asp:TextBox>
At the bottom of the page where the above control is defined, I have the following:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript" src="lib/jQuery.dPassword.js"></script>
<script type="text/javascript">
$(function () {
var textbox01 = $("[id$=txtMID01]");
alert(textbox01.attr("id"));
$("[id$=txtMID01]").dPassword()
});
</script>
When the page loads, the alert displays MainContent_txtMID01 which is the ID of the control preceeded with the name of the content place holder.
The following is the contents of lib/jQuery.dPassword.js (which I found on the internet):
(function ($) {
$.fn.dPassword = function (options) {
var defaults = {
interval: 200,
duration: 3000,
replacement: '%u25CF',
// prefix: 'password_',
prefix: 'MainContent_',
debug: false
}
var opts = $.extend(defaults, options);
var checker = new Array();
var timer = new Array();
$(this).each(function () {
if (opts.debug) console.log('init [' + $(this).attr('id') + ']');
// get original password tag values
var name = $(this).attr('name');
var id = $(this).attr('id');
var cssclass = $(this).attr('class');
var style = $(this).attr('style');
var size = $(this).attr('size');
var maxlength = $(this).attr('maxlength');
var disabled = $(this).attr('disabled');
var tabindex = $(this).attr('tabindex');
var accesskey = $(this).attr('accesskey');
var value = $(this).attr('value');
// set timers
checker.push(id);
timer.push(id);
// hide field
$(this).hide();
// add debug span
if (opts.debug) {
$(this).after('<span id="debug_' + opts.prefix + name + '" style="color: #f00;"></span>');
}
// add new text field
$(this).after(' <input name="' + (opts.prefix + name) + '" ' +
'id="' + (opts.prefix + id) + '" ' +
'type="text" ' +
'value="' + value + '" ' +
(cssclass != '' ? 'class="' + cssclass + '"' : '') +
(style != '' ? 'style="' + style + '"' : '') +
(size != '' ? 'size="' + size + '"' : '') +
(maxlength != -1 ? 'maxlength="' + maxlength + '"' : '') +
// (disabled != '' ? 'disabled="' + disabled + '"' : '') +
(tabindex != '' ? 'tabindex="' + tabindex + '"' : '') +
(accesskey != undefined ? 'accesskey="' + accesskey + '"' : '') +
'autocomplete="off" />');
// change label
$('label[for=' + id + ']').attr('for', opts.prefix + id);
// disable tabindex
$(this).attr('tabindex', '');
// disable accesskey
$(this).attr('accesskey', '');
// bind event
$('#' + opts.prefix + id).bind('focus', function (event) {
if (opts.debug) console.log('event: focus [' + getId($(this).attr('id')) + ']');
clearTimeout(checker[getId($(this).attr('id'))]);
checker[getId($(this).attr('id'))] = setTimeout("check('" + getId($(this).attr('id')) + "', '')", opts.interval);
});
$('#' + opts.prefix + id).bind('blur', function (event) {
if (opts.debug) console.log('event: blur [' + getId($(this).attr('id')) + ']');
clearTimeout(checker[getId($(this).attr('id'))]);
});
setTimeout("check('" + id + "', '', true);", opts.interval);
});
getId = function (id) {
var pattern = opts.prefix + '(.*)';
var regex = new RegExp(pattern);
regex.exec(id);
id = RegExp.$1;
return id;
}
setPassword = function (id, str) {
if (opts.debug) console.log('setPassword: [' + id + ']');
var tmp = '';
for (i = 0; i < str.length; i++) {
if (str.charAt(i) == unescape(opts.replacement)) {
tmp = tmp + $('#' + id).val().charAt(i);
}
else {
tmp = tmp + str.charAt(i);
}
}
$('#' + id).val(tmp);
}
check = function (id, oldValue, initialCall) {
if (opts.debug) console.log('check: [' + id + ']');
var bullets = $('#' + opts.prefix + id).val();
if (oldValue != bullets) {
setPassword(id, bullets);
if (bullets.length > 1) {
var tmp = '';
for (i = 0; i < bullets.length - 1; i++) {
tmp = tmp + unescape(opts.replacement);
}
tmp = tmp + bullets.charAt(bullets.length - 1);
$('#' + opts.prefix + id).val(tmp);
}
else {
}
clearTimeout(timer[id]);
timer[id] = setTimeout("convertLastChar('" + id + "')", opts.duration);
}
if (opts.debug) {
$('#debug_' + opts.prefix + id).text($('#' + id).val());
}
if (!initialCall) {
checker[id] = setTimeout("check('" + id + "', '" + $('#' + opts.prefix + id).val() + "', false)", opts.interval);
}
}
convertLastChar = function (id) {
if ($('#' + opts.prefix + id).val() != '') {
var tmp = '';
for (i = 0; i < $('#' + opts.prefix + id).val().length; i++) {
tmp = tmp + unescape(opts.replacement);
}
$('#' + opts.prefix + id).val(tmp);
}
}
};
})(jQuery);
When I execute my code, the code behind populates the value of the textbox with "123456789" and when the page gets rendered, all the characters have been changed to bullets, which is correct. The problem I am having is that the textbox has been disabled so I can not edit the data in the textbox.
I removed (by commenting out) the references to the disabled attribute but the control still gets rendered as disabled.
As a side note, the code that I found on the internet was originally designed to work with a textbox with a type of password but when I set the TextMode to password, not only does the control get rendered as disabled, but the field gets rendered with no value so I left the TextMode as SingleLine.
Any suggestions or assistance is greatly appreciated.
Thanks!
As far as I know, it is not possible to have it so that while you type a password, the last letter is visible for a second and then turns into a bullet or star.
However what you can do is as the user types in password, with a delay of lets say 500ms store the string the user has typed in so far into some variable and replace the content of the password field or the text field with stars or black bullets. This will give you what you are looking for.
I am looking to assign a class to each clndr.js event that appears in my calendar based on the value itself. var temp shows an example of the data received. I want to the style each event on type being 1 or 2. The code shows the default template which I want to modify to simply add in the value passed in type as a class so I can then style it.
link to the source library on github
link to a similar problem on github
// This is the default calendar template. This can be overridden.
var clndrTemplate =
"<div class='clndr-controls'>" +
"<div class='clndr-control-button'>" +
"<span class='clndr-previous-button'>previous</span>" +
"</div>" +
"<div class='month'><%= month %> <%= year %></div>" +
"<div class='clndr-control-button rightalign'>" +
"<span class='clndr-next-button'>next</span>" +
"</div>" +
"</div>" +
"<table class='clndr-table' border='0' cellspacing='0' cellpadding='0'>" +
"<thead>" +
"<tr class='header-days'>" +
"<% for(var i = 0; i < daysOfTheWeek.length; i++) { %>" +
"<td class='header-day'><%= daysOfTheWeek[i] %></td>" +
"<% } %>" +
"</tr>" +
"</thead>" +
"<tbody>" +
"<% for(var i = 0; i < numberOfRows; i++){ %>" +
"<tr>" +
"<% for(var j = 0; j < 7; j++){ %>" +
"<% var d = j + i * 7; %>" +
"<td class='<%= days[d].classes %>'>" +
"<div class='day-contents <%= days[d].type %>'><%= days[d].day %></div>" +
"</td>" +
"<% } %>" +
"</tr>" +
"<% } %>" +
"</tbody>" +
"</table>";
var calendars = {};
$(document).ready(function () {
var thisMonth = moment().format('YYYY-MM');
var eventArray = {{ data|tojson }};
var temp = [{
date: thisMonth + '-22',
type: 1
}, {
date: thisMonth + '-27',
type: 2
}, {
date: thisMonth + '-13',
type: 1
}];
calendars.clndr1 = $('.cal1').clndr({
events: eventArray,
targets: {
day: 'day',
},
clickEvents: {
click: function (target) {
console.log('Cal-1 clicked: ', target);
},
today: function () {
console.log('Cal-1 today');
},
nextMonth: function () {
console.log('Cal-1 next month');
},
previousMonth: function () {
console.log('Cal-1 previous month');
},
onMonthChange: function () {
console.log('Cal-1 month changed');
},
nextYear: function () {
console.log('Cal-1 next year');
},
previousYear: function () {
console.log('Cal-1 previous year');
},
onYearChange: function () {
console.log('Cal-1 year changed');
},
nextInterval: function () {
console.log('Cal-1 next interval');
},
previousInterval: function () {
console.log('Cal-1 previous interval');
},
onIntervalChange: function () {
console.log('Cal-1 interval changed');
}
},
multiDayEvents: {
singleDay: 'date',
endDate: 'endDate',
startDate: 'startDate'
},
showAdjacentMonths: true,
adjacentDaysChangeMonth: false
});
// Bind all clndrs to the left and right arrow keys
$(document).keydown(function (e) {
// Left arrow
if (e.keyCode == 37) {
calendars.clndr1.back();
calendars.clndr2.back();
calendars.clndr3.back();
}
// Right arrow
if (e.keyCode == 39) {
calendars.clndr1.forward();
calendars.clndr2.forward();
calendars.clndr3.forward();
}
});
});
I don't know your code, so I'm working with the test of CLNDR from github - folder "tests".
Add at the bottom of test.js (basically just make sure it's after clndr activation)
var thisMonth = moment().format('YYYY-MM');
var temp = [{
date: thisMonth + '-22',
type: 1
}, {
date: thisMonth + '-27',
type: 2
}, {
date: thisMonth + '-13',
type: 1
}];
for (event of temp) {
$('.calendar-day-' + event.date).addClass('ev-type-' + event.type);
};
Then add some css styles to test.html <head> just to clearly see it's working
.ev-type-1 {
background: #F00 !important;
color: #fff !important;
}
.ev-type-2 {
background: #0F0 !important;
color: #fff !important;
}
refreshFileList = function() {
$("#filedetails tr").remove();
for (i = 0, j = fileDetails.length; i < j; ++i) {
$("#filedetails").append("<tr data-filesize='" + fileDetails[i].SIZE + "' data-filename='" + fileDetails[i].KEY + "'><td><strong>" + fileDetails[i].FILENAME + "</strong></td><td class='nodesize'>" + fileDetails[i].SIZE + " MB</td><td>" + fileDetails[i].EXT + "</td>" + fileDetails[i].TAG + "</tr>");
}
},
fileDelete = function(e) {
e.preventDefault();
var parentRow = jQuery(this).closest('tr')
, fileName = fileDetails[i].KEY
, fileSize = fileDetails[i].SIZE;
ajaxFileDelete(fileName, parentRow, fileSize);
},
Into the fileDelete function I don't want to use data-filename and data-filesize but when I am going to use fileName = fileDetails[i].KEY or fileSize = fileDetails[i].SIZE its always deleting the first value of the array instead of specific value but with data-attributes it working as expected.
Add i to the <tr> as a data attribute.
refreshFileList = function() {
$("#filedetails tr").remove();
for (var i = 0, j = fileDetails.length; i < j; ++i) {
$("#filedetails").append("<tr data-index='" + i + "'><td><strong>" + fileDetails[i].FILENAME + "</strong></td><td class='nodesize'>" + fileDetails[i].SIZE + " MB</td><td>" + fileDetails[i].EXT + "</td>" + fileDetails[i].TAG + "</tr>");
}
},
fileDelete = function(e) {
e.preventDefault();
var parentRow = jQuery(this).closest('tr')
, i = parentRow.data('index')
, fileName = fileDetails[i].KEY
, fileSize = fileDetails[i].SIZE;
ajaxFileDelete(fileName, parentRow, fileSize);
},
When I double click the card the dialog pops up, and it is then possible to create comments. So far so good. When creating the comments it is possible to edit it.
Then I want to have a countdown for the "edit" eg. after 3 sec the "edit" might be invisible for the user. So far so good.
The issue is, after closing the window or saving the data via button and opening the same card the edit appears again for 3 sec and so on.
I want when creating the comments, and after 3 sec the "edit" never appears again. Just like on this site.
Any idea how to implement this?
Live Demo
jQuery: Countdown,
// Set the timer to countdown
var sec = 3;
var timer = window.setInterval(function () {
sec--;
if (sec == -1) {
$('.edit').addClass('hidden');
clearInterval(timer);
}
}, 1000);
jQuery: Add comment,
function addComment(commentString) {
var container = $('#divComments');
var inputs = container.find('label');
var id = inputs.length + 1;
var data1 = {
commentString: commentString
};
var div = $('<div />', { class: 'CommentStyle' });
$('<label />', {
id: 'comment' + id,
for: 'comment' + id,
text: commentString
}).on('change', function () {
data1.commentString = $(this).text();
}).appendTo(div);
$('<br/>').appendTo(div);
var $Image = $('<img />',
{
"src": "/Pages/Images/alert.png",
"class": "CommentImage",
"for": "comment" + id
}).appendTo(container);
var d = new Date();
var $fulaDate = $('<div>' + d.getDate()
+ "-" + monthNames[d.getMonth()]
+ "-" + d.getFullYear()
+ "//" + d.getHours()
+ ":" + d.getMinutes()
+ '</div>').addClass('labelStyle').append(' ~').appendTo(div);
var $edit = $('<p />', {
class: 'edit',
for: 'comment' + id,
text: 'Edit'
}).append(' ~').appendTo(div);
var $delete = $('<p />', {
class: 'delete',
for: 'comment' + id,
text: 'Delete'
}).appendTo(div);
// Set the timer to countdown
var sec = 3;
var timer = window.setInterval(function () {
sec--;
if (sec == -1) {
$('.edit').addClass('hidden');
clearInterval(timer);
}
}, 1000);
div.appendTo(container).focus();
container.data('comments').push(data1);
}
EDIT
Please put this line after:
$.each($currentTarget.data('comments'), function (i, comment) {
addComment(comment.commentString);
});
$(".edit").each(function(){
$(this).addClass("hidden");
});
Rest all the lines should work fine. Try this solution. This may help you.
I have created a Check box JQuery Plugin, but when i want to get the value of the check box when selected the check box value always returns false. I have taken out the plugin and used the check box in a raw state but still returns false when check box is selected.
JAVASCRIPT
function DialogWindowDragMediaItems(userPageType, imageParams, idParams) {
idParams = idParams.replace(/~/g, "|")
var divBGContainer = $("<div/>");
var lengthVideos = imageParams.split("~").length - 1;
var divInfoText1 = $("<div/>"); ;
$(divBGContainer).append(divInfoText1);
$(divInfoText1).text("What would you like to do with the videos selected?");
$(divInfoText1).attr("class", "videosselecteddraginfo");
var checkBox1 = $("<input type='checkbox'/>");
$(divBGContainer).append(checkBox1);
$(checkBox1).genCheckBox({ name: 'copymedia', text: 'Move and Copy', checked: true });
$(checkBox1).attr("id", "copymediamoveandcopy");
var checkBox2 = $("<input type='checkbox'/>");
$(divBGContainer).append(checkBox2);
$(checkBox2).genCheckBox({ name: 'copymedia', text: 'Move and Delete' });
var buttonMove = GetDialogWindowButton("Move Items", "DestroyDialogWindowHideTransparent('DialogWindowDragMediaItemsAddID'); WebForm_DoCallback('MainPageControl1','dragmediatomedia~" + userPageType + "~" + idParams + "~' + $('#copymediamoveandcopy').is(':checked'),null,null,null,true)");
CreateGenericWindowDialog($(divBGContainer), "DialogWindowDragMediaItemsAddID", 500, "images/mainpage/dialogwindow/titleimageaddmedia.png", "Move Items", "Cancel", buttonMove, true);
}
function CreateGenericWindowDialog(content, id, width, imageUrl, title, buttonText, button, destroyAndHideTransparent) {
var divContainer = $("<div/>");
$("body").append(divContainer);
$(divContainer).attr("class", "divaddvideomediacontrolcontainer");
$(divContainer).attr("id", id);
var divInnerContainer = $("<div/>");
$(divContainer).append(divInnerContainer);
$(divInnerContainer).attr("class", "divaddvideomediainnercontrolcontainer");
$(divInnerContainer).css("width", width + "px");
var divTopLeftCornerContainer = $("<div/>");
$(divInnerContainer).append(divTopLeftCornerContainer);
$(divTopLeftCornerContainer).attr("class", "divgenericwindowtopleftcorner");
var divTopCenterCornerContainer = $("<div/>");
$(divInnerContainer).append(divTopCenterCornerContainer);
$(divTopCenterCornerContainer).attr("class", "divcentergenericwindow");
$(divTopCenterCornerContainer).css("width", width - 16 + "px");
var divTopRightCornerContainer = $("<div/>");
$(divInnerContainer).append(divTopRightCornerContainer);
$(divTopRightCornerContainer).attr("class", "divgenericwindowtoprightcorner");
var imageTitle = $("<img/>");
$(divTopCenterCornerContainer).append(imageTitle);
$(imageTitle).attr("class", "imagetitledialogwindow");
$(imageTitle).attr("src", imageUrl);
var divTitleContainer = $("<div/>");
$(divTopCenterCornerContainer).append(divTitleContainer);
$(divTitleContainer).attr("class", "divgenericwindowtitlecontainer");
$(divTitleContainer).text(title);
var divControlsContainer = $("<div/>");
$(divInnerContainer).append(divControlsContainer);
$(divControlsContainer).attr("class", "divgenericwindowcontrolscontainer");
$(divControlsContainer).css("width", width - 6 + "px");
$(divControlsContainer).append($(content));
var divBottomLeftCornerContainer = $("<div/>");
$(divInnerContainer).append(divBottomLeftCornerContainer);
$(divBottomLeftCornerContainer).attr("class", "divgenericwindowbottomleftcorner");
var divBottomCenterContainer = $("<div/>");
$(divInnerContainer).append(divBottomCenterContainer);
$(divBottomCenterContainer).attr("class", "divbottomcentergenericwindow");
$(divBottomCenterContainer).css("width", width - 16 + "px");
var divBottomRightCornerContainer = $("<div/>");
$(divInnerContainer).append(divBottomRightCornerContainer);
$(divBottomRightCornerContainer).attr("class", "divgenericwindowbottomrightcorner");
if (destroyAndHideTransparent) {
$(divBottomCenterContainer).append(GetDialogWindowButton(buttonText, "DestroyDialogWindowHideTransparent('" + id + "')"));
}
else {
$(divBottomCenterContainer).append(GetDialogWindowButton(buttonText, "DestroyDialogWindow('" + id + "')"));
}
if (button != null && button.length > 0) {
$(divBottomCenterContainer).append(button);
}
CenterGenericControl(id);
$(divContainer).show();
}
function GetDialogWindowButton(text, linkCall) {
var linkCancel = $("<a/>");
$(linkCancel).attr("class", "linkgenericdialogbutton");
$(linkCancel).attr("href", "javascript:" + linkCall);
$(linkCancel).css("marginTop", 14 + "px");
$(linkCancel).css("marginRight", 10 + "px");
var divCancel = $("<div/>");
$(linkCancel).append(divCancel);
$(divCancel).attr("class", "divlinkaddmediaurlbuttontext");
$(divCancel).text(text);
return linkCancel;
}
JQUERY CHECKBOX PLUGIN
(function($) {
$.fn.genCheckBox = function(settings) {
var def = {
height: 15,
width: 15
};
settings = $.extend(def, settings)
$(this).attr("name", settings.name);
$(this).css("display", "none");
$(this).prop("checked", settings.checked);
var divContainer = $("<div style='clear:left;float:left;padding:10px;'/>");
$(divContainer).insertAfter(this);
var span = $("<span class='checkbox' style='float:left'/>");
if (settings.checked) {
$(span).css("background-position", "0px 17px");
}
else {
$(span).css("background-position", "0px 0px");
}
$(divContainer).append(span);
//$(span).attr("name", settings.name);
var div = $("<div style='float:left;margin-left:10px;disply:block'/>");
$(div).insertAfter(span);
$(div).text(settings.text);
$(span).click(function() {
var position = $(this).css("background-position");
if (position == '0px 0px') {
$(".checkbox").css("background-position", "0px 0px");
var el = document.getElementsByName(settings.name);
for (var i = 0; i < el.length; i++) {
var input = el[i];
$(input).prop("checked", false);
}
$(this).css("background-position", "0px 17px");
var checkBox = $($(this).parent()).prev();
$(checkBox).prop("checked", true);
}
});
}
})(jQuery);
I split the code up from the button click event and then i could retrieve the value from the check box. Weird i still don't understand why it shouldn't work first time.
function DialogWindowDragMediaItems(userPageType, imageParams, idParams) {
idParams = idParams.replace(/~/g, "|")
var divBGContainer = $("<div/>");
var lengthVideos = imageParams.split("~").length - 1;
var divInfoText1 = $("<div/>"); ;
$(divBGContainer).append(divInfoText1);
$(divInfoText1).text("What would you like to do with the videos selected?");
$(divInfoText1).attr("class", "videosselecteddraginfo");
var checkBox1 = $("<input type='checkbox'/>");
$(divBGContainer).append(checkBox1);
$(checkBox1).genCheckBox({ name: 'copymedia', text: 'Move and Copy', checked: true, id: 'copymediamoveandcopy' });
var checkBox2 = $("<input type='checkbox'/>");
$(divBGContainer).append(checkBox2);
$(checkBox2).genCheckBox({ name: 'copymedia', text: 'Move and Delete' });
var buttonMove = GetDialogWindowButton("Move Items", "");
CreateGenericWindowDialog($(divBGContainer), "DialogWindowDragMediaItemsAddID", 500, "images/mainpage/dialogwindow/titleimageaddmedia.png", "Move Items", "Cancel", $(buttonMove), true);
//$(buttonMove).attr("href", "javascript:DestroyDialogWindowHideTransparent('DialogWindowDragMediaItemsAddID'); WebForm_DoCallback('MainPageControl1','dragmediatomedia~" + userPageType + "~" + idParams + "~' + $('#copymediamoveandcopy').is('checked'),null,null,null,true)");
$(buttonMove).attr("href", "javascript:MoveItemsClick('" + userPageType + "','" + idParams + "')");
}
function MoveItemsClick(userPageType, idParams) {
var booleanValue = $('#copymediamoveandcopy')[0].checked;
DestroyDialogWindowHideTransparent('DialogWindowDragMediaItemsAddID');
WebForm_DoCallback('MainPageControl1', 'dragmediatomedia~' + userPageType + '~' + idParams + '~' + booleanValue, null, null, null, true);
}