22 var commentModal = null;
26 var assigneeSelected = 0;
27 var statusSelected = 0;
31 $(document).ready(
function () {
32 table = createBrowseTable();
33 $(
'#insert_browsetbl_filter').append($(
'#browsetbl_filter'));
35 table.on(
'draw',
function () {
38 $(
'.cc').dblclick(
function (){
39 var source=table.cell(
this).data();
40 openCommentModal(source[0],source[1],source[2]);
42 $(
'select.goto-active-option').change(
function() {
43 var url = $(
this).val();
44 if(url){ window.location = url;}
47 commentModal = $(
'#commentModal').plainModal();
48 $(document).tooltip({
'items':
"img"});
51 function initPrioClick() {
52 $(
"td.priobucket").click(
function () {
53 table = createBrowseTable();
54 elementData = table.cell(
this).data();
55 yourKey = elementData[0];
56 if (myKey > 0 && myKey !== yourKey) {
57 changePriority(myKey, yourKey);
62 else if (yourKey === myKey) {
68 myKey = elementData[0];
69 myVal = elementData[1];
74 function initPrioDraw() {
75 $(
"td.priobucket").each(
function () {
76 $(
'.ui-tooltip').
remove();
77 $(
this).html(
function () {
78 return prioColumn(table.cell(
this).data(),
'display');
82 $(
'.limit-mover').click(
function(){
83 var uploadId = $(
this).attr(
'data-source');
84 var dir = $(
this).attr(
'data-dir');
85 move2limit(uploadId,dir);
90 function move2limit(uploadId, direction) {
94 "direction": direction
98 url:
"?mod=browse-processPost",
104 function openCommentModal(upload, status, comment) {
107 $(
"#commentText").val(comment);
108 commentModal.plainModal(
'open');
111 function closeCommentModal() {
112 $(staSel).val( $(staSel).find(
'option[selected]').val() );
113 commentModal.plainModal(
'close');
117 function mysuccess() {
118 var oTable = createBrowseTable();
122 function mysuccess3() {
124 var oTable = createBrowseTable();
128 function mysuccess4() {
131 var oTable = createBrowseTable();
135 function changeTableEntry(sel, uploadId, columnName) {
136 if (columnName ==
'status_fk' && (sel.value == 3 || sel.value == 4)) {
138 openCommentModal(uploadId, sel.value,
'');
142 "columnName": columnName,
143 "uploadId": uploadId,
148 url:
"?mod=browse-processPost",
155 function filterAssignee() {
156 assigneeSelected = $(
'#assigneeSelector').val();
157 var oTable = createBrowseTable();
161 function filterStatus() {
162 statusSelected = $(
'#statusSelector').val();
163 var oTable = createBrowseTable();
167 function changePriority(move, beyond) {
174 url:
"?mod=browse-processPost",
180 function submitComment( ) {
182 "uploadId": uploadId,
183 "commentText": $(
"#commentText").val(),
188 url:
"?mod=browse-processPost",