Project

General

Profile

« Previous | Next » 

Revision 7959

use icons for associated party list editing

View differences:

lib/style/common/templates/metacatui/entryForm.js
232 232
    return link;
233 233
}
234 234

  
235
function createIconLink(iconClass, iconAlt, iconOnClick, cursor) {
236
    var link = document.createElement("a");
237
    var icon = document.createElement("i");
238
    icon.setAttribute("class", iconClass);
239
    icon.setAttribute("alt", iconAlt);
240
    if (navigator.userAgent.toLowerCase().indexOf('msie')!= -1 && document.all) {
241
        link.style.setAttribute("cursor", cursor);
242
        icon.attachEvent("onclick", new Function(iconOnClick));
243
    } else {
244
        link.setAttribute("style", "cursor:"+cursor);
245
        icon.setAttribute("onClick", iconOnClick);
246
    }
247
    link.appendChild(icon);        
248
    return link;
249
}
235 250

  
251

  
236 252
function createTD(colSpan, align, cursor) {
237 253
    var td = document.createElement("td");
238 254
    if (colSpan != "")
......
405 421
    var imgTD = createTD("","right");
406 422
    imgTD.className = 'rightCol';
407 423
        
408
    imgTD.appendChild(createImageLink(contextUrl + "/style/images/previous.gif",
424
    imgTD.appendChild(createIconLink("icon-arrow-up",
409 425
                                      "Move Up","moveUpRow(event)","pointer"));
410 426
    imgTD.appendChild(document.createTextNode(" "));
411
    imgTD.appendChild(createImageLink(contextUrl + "/style/images/next.gif",
427
    imgTD.appendChild(createIconLink("icon-arrow-down",
412 428
                                      "Move Down", "moveDownRow(event, \"addaorow\")",
413 429
                                      "pointer"));
414 430
    imgTD.appendChild(document.createTextNode(" "));
415
    imgTD.appendChild(createImageLink(contextUrl + "/style/images/delete.gif",
431
    imgTD.appendChild(createIconLink("icon-remove-sign",
416 432
                                      "Delete", "delRow(event)",
417 433
                                      "pointer"));
418 434

  

Also available in: Unified diff