Skip to content

Commit

Permalink
first pass -- Django1.5 upgrade, various library upgrades, collectstatic
Browse files Browse the repository at this point in the history
  • Loading branch information
sdreher committed Mar 4, 2014
1 parent ad8034b commit 03d7c51
Show file tree
Hide file tree
Showing 91 changed files with 390 additions and 427 deletions.
12 changes: 1 addition & 11 deletions apache/sample.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Allow from all
</Directory>

Alias /site_media/ /var/www/mediathread/mediathread/media/
Alias /media/ /var/www/mediathread/mediathread/media/
Alias /favicon.ico /var/www/mediathread/mediathread/media/favicon.ico
Alias /robots.txt /var/www/mediathread/mediathread/media/robots.txt
<Directory /var/www/mediathread/mediathread/media/>
Expand All @@ -29,16 +29,6 @@
AddOutputFilterByType DEFLATE text/css application/x-javascript
</Directory>

Alias /media/ /var/www/mediathread/mediathread/ve/lib/python2.7/site-packages/django/contrib/admin/static/
<Directory /var/www/mediathread/mediathread/ve/lib/python2.7/site-packages/django/contrib/admin/static/>
Order deny,allow
Allow from all
FileETag None
ExpiresActive on
ExpiresDefault "access plus 10 years"
AddOutputFilterByType DEFLATE text/css application/x-javascript
</Directory>

Alias /uploads/ /var/www/mediathread/uploads/
<Directory /var/www/mediathread/uploads/>
Order deny,allow
Expand Down
18 changes: 9 additions & 9 deletions bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@
exit(ret)

# install javascript libraries
libs = [l.strip() for l in open(os.path.join(pwd, "requirements/js.txt"))]
jsdir = os.path.abspath(os.path.join(pwd, "media/js/"))
os.chdir(jsdir)
for lib in libs:
ret = subprocess.call(["tar",
"xvzf",
"../../%s" % lib])
if ret:
exit(ret)
# libs = [l.strip() for l in open(os.path.join(pwd, "requirements/js.txt"))]
# jsdir = os.path.abspath(os.path.join(pwd, "media/js/"))
# os.chdir(jsdir)
# for lib in libs:
# ret = subprocess.call(["tar",
# "xvzf",
# "../../%s" % lib])
# if ret:
# exit(ret)
10 changes: 5 additions & 5 deletions media/css/mediathread.css
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ div.arrowIcon {
}

a.arrowClosed div.arrowIcon {
background-image: url(/site_media/img/arrowOpen.png);
background-image: url(/media/img/arrowOpen.png);
}


Expand Down Expand Up @@ -703,7 +703,7 @@ input.autocomplete.default {
.ui-icon-reverse {
width: 16px;
height: 16px;
background-image: url(/site_media/jquery/css/images/ui-icons_ffffff_256x240.png);
background-image: url(/media/jquery/css/images/ui-icons_ffffff_256x240.png);
}

.help-overlay {
Expand Down Expand Up @@ -1231,7 +1231,7 @@ div.button-form form, div.button-form.inline form {
}

.errornote {
background: url("/site_media/img/icon_alert.png") no-repeat 5px 5px #FFEBE8;
background: url("/media/img/icon_alert.png") no-repeat 5px 5px #FFEBE8;
border: 1px solid #c00 !important;
display: block;
font-size: 11px !important;
Expand Down Expand Up @@ -3615,7 +3615,7 @@ div.collection_table {
padding:0 0 0 7px;
margin:0;
position:absolute;
background:url('/site_media/img/bookendleft.gif') top left no-repeat ;
background:url('/media/img/bookendleft.gif') top left no-repeat ;
z-index:0;
}

Expand All @@ -3636,7 +3636,7 @@ div.collection_table {
width:0px;
height:7px;
padding:0 6px 0 0;
background:url('/site_media/img/bookendright.gif') top right no-repeat;
background:url('/media/img/bookendright.gif') top right no-repeat;
position:absolute;
z-index:0;
}
Expand Down
4 changes: 2 additions & 2 deletions media/jquery/css/jquery.websitetour.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ div.tooltip-highlighted-content h2 input {
.tooltip_arrow_TR,
.tooltip_arrow_BL,
.tooltip_arrow_BR{
background-image:url(/site_media/img/topbottom.png);
background-image:url(/media/img/topbottom.png);
width:13px;
height:7px;
}
Expand All @@ -63,7 +63,7 @@ div.tooltip-highlighted-content h2 input {
.tooltip_arrow_LB,
.tooltip_arrow_RT,
.tooltip_arrow_RB{
background-image:url(/site_media/img/leftright.png);
background-image:url(/media/img/leftright.png);
width:7px;
height:13px;
}
Expand Down
2 changes: 1 addition & 1 deletion media/js/app/assetmgr/collection.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ var CollectionList = function (config) {
});

jQuery.ajax({
url: '/site_media/templates/' + config.template + '.mustache?nocache=v2',
url: '/media/templates/' + config.template + '.mustache?nocache=v2',
dataType: 'text',
cache: false, // Chrome && Internet Explorer has aggressive caching policies.
success: function (text) {
Expand Down
2 changes: 1 addition & 1 deletion media/js/app/panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
} else {
// pull it off the wire
jQuery.ajax({
url: '/site_media/templates/' + self.panels[idx].template + '.mustache?nocache=v3',
url: '/media/templates/' + self.panels[idx].template + '.mustache?nocache=v3',
dataType: 'text',
cache: false, // Chrome && Internet Explorer have aggressive caching policies.
success: function (text) {
Expand Down
2 changes: 1 addition & 1 deletion media/js/app/projects/projectlist.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var ProjectList = function (config) {
self.switcher_context = {};

jQuery.ajax({
url: '/site_media/templates/' + config.template + '.mustache?nocache=v2',
url: '/media/templates/' + config.template + '.mustache?nocache=v2',
dataType: 'text',
cache: false, // Chrome && Internet Explorer has aggressive caching policies.
success: function (text) {
Expand Down
2 changes: 1 addition & 1 deletion media/js/app/projects/projectpanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ var ProjectPanelHandler = function (el, parent, panel, space_owner) {
var select = jQuery(self.el).find("select[name='participants']")[0];
jQuery(select).addClass("selectfilter");
SelectFilter.init("id_participants_" + panel.context.project.id,
"participants", 0, "/site_media/admin/");
"participants", 0, "/media/admin/");

// HACK: move the save options around due to django form constraints
var assignment_elt = jQuery(self.el).find("label[for='id_publish_2']").parent();
Expand Down
6 changes: 3 additions & 3 deletions media/js/app/tiny_mce_init3.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var tiny_mce_settings = {
theme: "advanced",
content_css: "/site_media/css/project.css",
content_css: "/media/css/project.css",
mode: "specific_textareas",
editor_selector: "mceEditor",
entity_encoding : "numeric",
Expand Down Expand Up @@ -133,8 +133,8 @@ var tiny_mce_settings = {
"ul[class|compact<compact|id|title|type]"
};

tinymce.PluginManager.load('citation', '/site_media/js/sherdjs/lib/mcePlugin_citation/editor_plugin.js');
tinymce.PluginManager.load('editorwindow', '/site_media/js/sherdjs/lib/mcePlugin_editorwindow/editor_plugin.js');
tinymce.PluginManager.load('citation', '/media/js/sherdjs/lib/mcePlugin_citation/editor_plugin.js');
tinymce.PluginManager.load('editorwindow', '/media/js/sherdjs/lib/mcePlugin_editorwindow/editor_plugin.js');
tinyMCE.init(tiny_mce_settings);


32 changes: 32 additions & 0 deletions media/stick.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
(function(exports) {
"use strict";
/*
* A simpler boomerang: https://github.com/yahoo/boomerang that just
* does navigation timing. Requires jquery.
*/

exports.send = function(url) {
/* Sends the timing data to the given URL */
var perf = window.performance || window.msPerformance ||
window.webkitPerformance || window.mozPerformance;
if (perf) {
setTimeout(function() {
$.post(url, {
'window.performance.timing.navigationStart': perf.timing.navigationStart,
'window.performance.timing.domComplete': perf.timing.domComplete,
'window.performance.timing.domInteractive': perf.timing.domInteractive,
'window.performance.timing.domLoading': perf.timing.domLoading,
'window.performance.timing.loadEventEnd': perf.timing.loadEventEnd,
'window.performance.timing.responseStart': perf.timing.responseStart,
'window.performance.navigation.redirectCount': perf.navigation.redirectCount,
'window.performance.navigation.type': perf.navigation.type,
'client': 'stick'
});
}, 1000);
}
};

})(typeof exports === 'undefined' ? (this.stick = {}) : exports);



Loading

0 comments on commit 03d7c51

Please sign in to comment.