# # # patch "ChangeLog" # from [3f046bf2dc333bdf0170e7d97ec08d933be77c11] # to [ffae33a4ed59b6f6fe964e79afedd57c6040a7e3] # # patch "genproxy.py" # from [0b4728f487b54331d27276f09fe86a7b13ef07ce] # to [f12812546af3e41d55b8d50c8bb661917bdc02e7] # # patch "release.py" # from [df0ab88561367dd15fff84282bf2699eeae86ee4] # to [b1486b628b15f1a003ebfb3fb34b01d1532aa6ad] # # patch "release.sh" # from [43e9d9753e5aa10695a21b9e2923237b805a3bad] # to [8aea63031f694b1749b6c5b65f4204d782e0eb60] # # patch "static/viewmtn.js" # from [5ea878eedde809bf77a05cb33a4ed3277f4c93bc] # to [001ab5902c148053998d2d6877c82ee3da848d70] # # patch "templates/base.html" # from [a4e831c3b5391f5a636aa118b531e9e30402c4f5] # to [d91e420efdc71dfd514a1514ee751b4a616697b5] # ============================================================ --- ChangeLog 3f046bf2dc333bdf0170e7d97ec08d933be77c11 +++ ChangeLog ffae33a4ed59b6f6fe964e79afedd57c6040a7e3 @@ -1,11 +1,17 @@ 2007-04-01 Grahame Bowland * fix a number of places where dynamic_join() was called with the first argument beginning with '/' resulting in an absolute link to / -2007-03-30 Grahame Bowland +2007-03-31 Grahame Bowland + * remove accidental hardcoded absolute URI in + viewmtn.js; we now get the URI from a JS variable + output into the document by a template. + +2007-03-31 Grahame Bowland + * don't fail entirely if xdg_* can't be found; add a new module option to fdo/xdgbasedir determining whether exceptions should be raised, ============================================================ --- genproxy.py 0b4728f487b54331d27276f09fe86a7b13ef07ce +++ genproxy.py f12812546af3e41d55b8d50c8bb661917bdc02e7 @@ -1,3 +1,5 @@ +#!/usr/bin/env python + # Copyright (C) 2005 Grahame Bowland # # This program is made available under the GNU GPL version 2.0 or @@ -7,8 +9,6 @@ # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. -#!/usr/bin/env python - class GeneratorProxy(object): def __init__(self, generator): self.generator = generator ============================================================ --- release.py df0ab88561367dd15fff84282bf2699eeae86ee4 +++ release.py b1486b628b15f1a003ebfb3fb34b01d1532aa6ad @@ -1,14 +1,6 @@ -# Copyright (C) 2005 Grahame Bowland -# -# This program is made available under the GNU GPL version 2.0 or -# greater. See the accompanying file COPYING for details. -# -# This program is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. - version='0.07beta' -authors='''Authors: +authors=''' +Authors: Grahame Bowland Contributors: @@ -17,5 +9,7 @@ David Reiss Bruce Stephens Lapo Luchini David Reiss +Matthias Radestock +Matthew Nicholson ''' ============================================================ --- release.sh 43e9d9753e5aa10695a21b9e2923237b805a3bad +++ release.sh 8aea63031f694b1749b6c5b65f4204d782e0eb60 @@ -1,3 +1,5 @@ +#!/bin/sh + # Copyright (C) 2005 Grahame Bowland # # This program is made available under the GNU GPL version 2.0 or @@ -7,8 +9,6 @@ # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. -#!/bin/sh - # generate the help file data OUT="release.py" RELEASE="0.07beta" ============================================================ --- static/viewmtn.js 5ea878eedde809bf77a05cb33a4ed3277f4c93bc +++ static/viewmtn.js 001ab5902c148053998d2d6877c82ee3da848d70 @@ -1,85 +1,96 @@ var pendingFor = null; var theBox; var callbacksInstalled = false; var pendingDeferred = null; var pendingFor = null; +var baseURI = null; -function installCallbacks() +function installCallbacks(for_uri) { - if (callbacksInstalled != false) { - return; - } - callbacksInstalled = true; + if (callbacksInstalled != false) { + return; + } + callbacksInstalled = true; + + if (for_uri == null) { + return; + } + // if anyone knows of a decent urljoin() for JS, that'd + // be much nicer than this hack.. + if (for_uri[for_uri.length-1] == '/') { + for_uri = for_uri.substr(0, for_uri.length-1); + } + baseURI = for_uri; - cbinst = function (e) { - updateNodeAttributes(e, { "onmouseover" : partial(mouseOverHandler, e), - "onmouseout" : partial(mouseOutHandler, e) } ); - } + cbinst = function (e) { + updateNodeAttributes(e, { "onmouseover" : partial(mouseOverHandler, e), + "onmouseout" : partial(mouseOutHandler, e) } ); + } - var elems = getElementsByTagAndClassName(null, "BranchLink"); - map(cbinst, elems); + var elems = getElementsByTagAndClassName(null, "BranchLink"); + map(cbinst, elems); - var elems = getElementsByTagAndClassName(null, "RevisionLink"); - map(cbinst, elems); + var elems = getElementsByTagAndClassName(null, "RevisionLink"); + map(cbinst, elems); - var elems = getElementsByTagAndClassName(null, "DirLink"); - map(cbinst, elems); + var elems = getElementsByTagAndClassName(null, "DirLink"); + map(cbinst, elems); - theBox = $("popupBox"); + theBox = $("popupBox"); } function updatePopup(boundTo, className) { - var jsonData = boundTo.jsonData; - var error_string = null; - var info = null; - var pos = elementPosition(boundTo); - var newBox; - - if (jsonData == null) { - error_string = "JSON-RPC error - please report"; - } else if (jsonData.error_string != null) { - error_string = jsonData.error_string; - } - - if (error_string == null) { - if (jsonData.type == "branch") { - info = "branch changed " + jsonData.ago + " ago by " + jsonData.author; - } else if (jsonData.type == "revision") { - info = "revision made " + jsonData.ago + " ago by " + jsonData.author; - } else if (jsonData.type == "manifest") { - info = "manifest contains " + jsonData.file_count + " files in " + jsonData.directory_count + " directories."; - } else { - info = "unknown type: " + jsonData.type; - } + var jsonData = boundTo.jsonData; + var error_string = null; + var info = null; + var pos = elementPosition(boundTo); + var newBox; + + if (jsonData == null) { + error_string = "JSON-RPC error - please report"; + } else if (jsonData.error_string != null) { + error_string = jsonData.error_string; + } + + if (error_string == null) { + if (jsonData.type == "branch") { + info = "branch changed " + jsonData.ago + " ago by " + jsonData.author; + } else if (jsonData.type == "revision") { + info = "revision made " + jsonData.ago + " ago by " + jsonData.author; + } else if (jsonData.type == "manifest") { + info = "manifest contains " + jsonData.file_count + " files in " + jsonData.directory_count + " directories."; } else { - info = "error: " + error_string; + info = "unknown type: " + jsonData.type; } + } else { + info = "error: " + error_string; + } - newBox = DIV({ 'id' : 'popupBox', 'style' : 'font-size: small'}, info); + newBox = DIV({ 'id' : 'popupBox', 'style' : 'font-size: small'}, info); - if (boundTo.offsetHeight) { - offset_height = boundTo.offsetHeight; - } else { - offset_height = 24; // yick - } + if (boundTo.offsetHeight) { + offset_height = boundTo.offsetHeight; + } else { + offset_height = 24; // yick + } - newY = pos.y + offset_height; - newX = pos.x; + newY = pos.y + offset_height; + newX = pos.x; - newBox.style.position = "absolute" - newBox.style.top = newY + 'px'; - newBox.style.left = newX + 'px'; - swapDOM(theBox, newBox); - theBox = newBox; + newBox.style.position = "absolute" + newBox.style.top = newY + 'px'; + newBox.style.left = newX + 'px'; + swapDOM(theBox, newBox); + theBox = newBox; } function jsonLoadComplete(boundTo, className, jsonData) { - boundTo.jsonData = jsonData; - updatePopup(boundTo, className); - pendingDeferred = null; - pendingFor = null; + boundTo.jsonData = jsonData; + updatePopup(boundTo, className); + pendingDeferred = null; + pendingFor = null; } function squashPendingRequest() @@ -108,25 +119,25 @@ function mouseOverHandler(boundTo, evt) function mouseOverHandler(boundTo, evt) { - var className = getNodeAttribute(boundTo, "class"); + var className = getNodeAttribute(boundTo, "class"); - if (boundTo != pendingFor) { - squashPendingRequest(); - } - if (boundTo.jsonData) { - return updatePopup(boundTo, className); - } - if (boundTo.id) { - var uri = "/json/" + encodeURIComponent(className) + "/" + encodeURIComponent(boundTo.id); - pendingDeferred = callLater(1, partial(dampenedJSON, uri, boundTo, className)); - pendingFor = boundTo; - } + if (boundTo != pendingFor) { + squashPendingRequest(); + } + if (boundTo.jsonData) { + return updatePopup(boundTo, className); + } + if (boundTo.id) { + var uri = baseURI + "/json/" + encodeURIComponent(className) + "/" + encodeURIComponent(boundTo.id); + pendingDeferred = callLater(1, partial(dampenedJSON, uri, boundTo, className)); + pendingFor = boundTo; + } } function mouseOutHandler(boundTo, evt) { - squashPendingRequest(); - var newBox = DIV({'id' : 'popupBox', 'class' : 'invisible'}); - swapDOM(theBox, newBox); - theBox = newBox; + squashPendingRequest(); + var newBox = DIV({'id' : 'popupBox', 'class' : 'invisible'}); + swapDOM(theBox, newBox); + theBox = newBox; } ============================================================ --- templates/base.html a4e831c3b5391f5a636aa118b531e9e30402c4f5 +++ templates/base.html d91e420efdc71dfd514a1514ee751b4a616697b5 @@ -31,7 +31,7 @@ #end block