Changeset 3893

Show
Ignore:
Timestamp:
09/12/08 06:34:21 (2 months ago)
Author:
hans
Message:

permalink am image detail

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/projects/quickhoney/website/static/javascript.js

    r3888 r3893  
    250250} 
    251251 
     252function permalink(path) { 
     253    return A({ href: '/' + path, onclick: function () { document.location.href = '#' + path; return false; } }, 'permalink'); 
     254} 
     255 
    252256function make_upload_item(item) 
    253257{ 
     
    261265                   H1(null, item.name), 
    262266                   item.date, ' by ', item.owner, ' | ', 
    263                    A({ href: '/' + path, onclick: function () { jump_to(path) } }, 'permalink'), 
     267                   permalink(path), 
    264268                   BR(), 
    265269                   item.description)); 
     
    285289                   H1(null, item.title), 
    286290                   item.date, ' by ', item.owner, ' | ', 
    287                    A({ href: 'news/' + item.name }, 'permalink'), 
     291                   permalink('news/' + item.name), 
    288292                   BR(), 
    289293                   DIV({ 'class': 'item-text' }, item.text), 
     
    10051009    var image_info = []; 
    10061010 
    1007     replaceChildNodes("metadata", "Image name: ", current_image.name, BR()); 
     1011    var link = current_directory + '/' + current_subdirectory + '/' + encodeURI(query_result[query_position].name); 
     1012 
     1013    replaceChildNodes("metadata", "Image name: ", current_image.name, " ", permalink(link), BR()); 
    10081014    if (current_image.client != "") { 
    10091015        appendChildNodes("metadata", "Client: ", current_image.client, BR()); 
    10101016    } 
    1011     appendChildNodes("metadata", current_image.width + "x" + current_image.height + "px | " + percent + "%"); 
     1017 
     1018    appendChildNodes("metadata", current_image.width + "x" + current_image.height 
     1019                     + "px | " + percent + "%"); 
    10121020 
    10131021    if (may_enlarge) { 
    1014         replaceChildNodes("full_click", A({ href: '#' + current_directory + '/' + current_subdirectory + '/' 
    1015                                                       + encodeURI(query_result[query_position].name), onclick: enlarge }, 
     1022        replaceChildNodes("full_click", A({ href: '#' + link, onclick: enlarge }, 
    10161023                                          "full size")); 
    10171024    } else {