merged
This commit is contained in:
commit
0864ef02de
|
@ -10,7 +10,7 @@ try:
|
||||||
import json
|
import json
|
||||||
except:
|
except:
|
||||||
import simplejson as json
|
import simplejson as json
|
||||||
from django.template import Template, Context
|
from django.template import Template, Context, RequestContext
|
||||||
from django.template.loader import get_template
|
from django.template.loader import get_template
|
||||||
from os.path import join
|
from os.path import join
|
||||||
from settings import MEDIA_ROOT, SITE_BASE, UPLOAD_ROOT, PROJECT_PATH
|
from settings import MEDIA_ROOT, SITE_BASE, UPLOAD_ROOT, PROJECT_PATH
|
||||||
|
@ -585,6 +585,7 @@ def article_webalone(request, article_id):
|
||||||
'articles_before': [],
|
'articles_before': [],
|
||||||
'articles_after': []
|
'articles_after': []
|
||||||
}
|
}
|
||||||
|
d = RequestContext(request, d)
|
||||||
return render_to_response("article_frontend.html", d)
|
return render_to_response("article_frontend.html", d)
|
||||||
|
|
||||||
def poll_changes(request):
|
def poll_changes(request):
|
||||||
|
|
|
@ -20,8 +20,8 @@ ADMINS = (
|
||||||
# ('Your Name', 'your_email@domain.com'),
|
# ('Your Name', 'your_email@domain.com'),
|
||||||
)
|
)
|
||||||
|
|
||||||
LOGIN_URL = "/sandbox/account"
|
LOGIN_URL = "/account"
|
||||||
LOGIN_REDIRECT_URL = "/sandbox/"
|
LOGIN_REDIRECT_URL = "/home"
|
||||||
MANAGERS = ADMINS
|
MANAGERS = ADMINS
|
||||||
|
|
||||||
DATABASE_ENGINE = 'mysql' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
|
DATABASE_ENGINE = 'mysql' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
|
||||||
|
|
|
@ -48,7 +48,9 @@ $(document).ready(function() {
|
||||||
// $('.audioBtn').colorbox({width: '350px', height: '180px', inline: true, href: '#audioWrap'});
|
// $('.audioBtn').colorbox({width: '350px', height: '180px', inline: true, href: '#audioWrap'});
|
||||||
$('.videoBtn').colorbox({width: '445px', height: '550px', inline: true, href: '#videoWrap'});
|
$('.videoBtn').colorbox({width: '445px', height: '550px', inline: true, href: '#videoWrap'});
|
||||||
// $('.audioBtn').colorbox({width: '445px', height: '550px', inline: true, href: '#audioWrap'});
|
// $('.audioBtn').colorbox({width: '445px', height: '550px', inline: true, href: '#audioWrap'});
|
||||||
|
|
||||||
scrollPages();
|
scrollPages();
|
||||||
|
|
||||||
$('#languageBtn').toggle(function() {
|
$('#languageBtn').toggle(function() {
|
||||||
$('.arabicBtn').hide();
|
$('.arabicBtn').hide();
|
||||||
$('.englishBtn').show();
|
$('.englishBtn').show();
|
||||||
|
@ -70,7 +72,7 @@ function scrollPages() {
|
||||||
var DOT_DEFAULT = '/static/images/pageOff.png';
|
var DOT_DEFAULT = '/static/images/pageOff.png';
|
||||||
var DOT_HOVER = '/static/images/pagehover.png';
|
var DOT_HOVER = '/static/images/pagehover.png';
|
||||||
var DOT_CURRENT = '/static/images/pageOn.png';
|
var DOT_CURRENT = '/static/images/pageOn.png';
|
||||||
var PAGE_HEIGHT = 1270;
|
var PAGE_HEIGHT = $('.page').eq(0).height() + 20;
|
||||||
var OFFSET_VAL = 80;
|
var OFFSET_VAL = 80;
|
||||||
var noOfPages = $('.page').length;
|
var noOfPages = $('.page').length;
|
||||||
var currentPage = -1;
|
var currentPage = -1;
|
||||||
|
|
|
@ -1341,7 +1341,7 @@ $(".box").live("mouseout", function(){
|
||||||
|
|
||||||
function cropImage(c)
|
function cropImage(c)
|
||||||
{
|
{
|
||||||
url = '/edit/imagebox/crop/?x1=' + c.x + '&y1=' + c.y + '&x2=' + c.x2 + '&y2=' + c.y2 + '&width=' + c.w + '&height=' + c.h + '&id=' + this_imagebox_id + '&uuid=' + UUID;
|
crop_url = '/edit/imagebox/crop/?x1=' + c.x + '&y1=' + c.y + '&x2=' + c.x2 + '&y2=' + c.y2 + '&width=' + c.w + '&height=' + c.h + '&id=' + this_imagebox_id + '&uuid=' + UUID;
|
||||||
crop_dimensions = c;
|
crop_dimensions = c;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1534,28 +1534,29 @@ $(".box").live("click", function(e){
|
||||||
$(".do_crop_imagebox").bind("click", function(e){
|
$(".do_crop_imagebox").bind("click", function(e){
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
box.resizable( 'enable' );
|
box.resizable( 'enable' );
|
||||||
|
|
||||||
// console.log(url);
|
// console.log(url);
|
||||||
$.getJSON(url, {
|
$.getJSON(crop_url, {
|
||||||
'article_id': ARTICLE_ID
|
'article_id': ARTICLE_ID
|
||||||
}, function(data) {
|
}, function(data) {
|
||||||
// console.log(data.path);
|
// console.log(data.path);
|
||||||
new_top = parseInt(box_top) + crop_dimensions.y;
|
new_top = parseInt(box_top) + crop_dimensions.y;
|
||||||
new_left = parseInt(box_left) + crop_dimensions.x;
|
new_left = parseInt(box_left) + crop_dimensions.x;
|
||||||
boxObj.setCSS({'width': crop_dimensions.w, 'height': crop_dimensions.h}, false);
|
boxObj.setCSS({'width': crop_dimensions.w, 'height': crop_dimensions.h}, false);
|
||||||
boxObj.setCSS({'top': new_top, 'left': new_left});
|
boxObj.setCSS({'top': new_top, 'left': new_left});
|
||||||
jcrop.destroy();
|
jcrop.destroy();
|
||||||
box.find('.edgeImage').attr("width", crop_dimensions.w);
|
box.find('.edgeImage').attr("width", crop_dimensions.w);
|
||||||
box.find('.edgeImage').attr("height", crop_dimensions.h);
|
box.find('.edgeImage').attr("height", crop_dimensions.h);
|
||||||
box.find('.edgeImage').attr('src', data.path);
|
box.find('.edgeImage').attr('src', data.path);
|
||||||
$('.imagebox_crop').remove();
|
$('.imagebox_crop').remove();
|
||||||
text_edit_mode = false;
|
text_edit_mode = false;
|
||||||
REVISION_NO = data.rev_id;
|
REVISION_NO = data.rev_id;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".cancel_crop_imagebox").bind("click", function(e){
|
$(".cancel_crop_imagebox").bind("click", function(e){
|
||||||
|
e.preventDefault();
|
||||||
jcrop.destroy();
|
jcrop.destroy();
|
||||||
$('.imagebox_crop').remove();
|
$('.imagebox_crop').remove();
|
||||||
box.resizable( 'enable' );
|
box.resizable( 'enable' );
|
||||||
|
|
|
@ -167,6 +167,7 @@ p {
|
||||||
|
|
||||||
<div id="righttitle" class="english"> Vol. 0, July 2011</div>
|
<div id="righttitle" class="english"> Vol. 0, July 2011</div>
|
||||||
<div id="righttitle1" class="arabic">ادجوار رود ، المجلد 1 يناير 2011</div>
|
<div id="righttitle1" class="arabic">ادجوار رود ، المجلد 1 يناير 2011</div>
|
||||||
|
<<<<<<< TREE
|
||||||
<div id="languageBtn"><span class="arabicBtn">االقائمة العربية</span> <span class="englishBtn">English Menu</span></div>
|
<div id="languageBtn"><span class="arabicBtn">االقائمة العربية</span> <span class="englishBtn">English Menu</span></div>
|
||||||
</div>-->
|
</div>-->
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,17 @@ urlpatterns = patterns('',
|
||||||
(r'^sandbox/$', 'main.views.home'),
|
(r'^sandbox/$', 'main.views.home'),
|
||||||
(r'^debug/$', 'main.views.debug'),
|
(r'^debug/$', 'main.views.debug'),
|
||||||
(r'^error/$', 'main.views.error'),
|
(r'^error/$', 'main.views.error'),
|
||||||
|
(r'^home$', 'main.views.home'),
|
||||||
|
(r'^contact$', 'main.views.contact'),
|
||||||
|
(r'^archive$', 'files.views.browse'),
|
||||||
|
(r'^publish$', 'main.views.publish'),
|
||||||
|
(r'^browse$', 'main.views.browse'),
|
||||||
|
(r'^upload$', 'files.views.upload_files'),
|
||||||
|
(r'^faq$', 'main.views.faq'),
|
||||||
|
(r'^help$', 'main.views.help'),
|
||||||
|
(r'^account$', login),
|
||||||
|
(r'^logout$', logout),
|
||||||
|
|
||||||
(r'^sandbox/home$', 'main.views.home'),
|
(r'^sandbox/home$', 'main.views.home'),
|
||||||
(r'^sandbox/contact$', 'main.views.contact'),
|
(r'^sandbox/contact$', 'main.views.contact'),
|
||||||
(r'^sandbox/archive$', 'files.views.browse'),
|
(r'^sandbox/archive$', 'files.views.browse'),
|
||||||
|
@ -25,6 +36,7 @@ urlpatterns = patterns('',
|
||||||
(r'^sandbox/help$', 'main.views.help'),
|
(r'^sandbox/help$', 'main.views.help'),
|
||||||
(r'^sandbox/account$', login),
|
(r'^sandbox/account$', login),
|
||||||
(r'^sandbox/logout$', logout),
|
(r'^sandbox/logout$', logout),
|
||||||
|
|
||||||
(r'^$', 'django.views.generic.simple.redirect_to', {'url': '/slider/'}),
|
(r'^$', 'django.views.generic.simple.redirect_to', {'url': '/slider/'}),
|
||||||
(r'^robots.txt(?P<path>)$', 'django.views.static.serve', { 'document_root' : "/home/itf/soc/edgware/static/txt/robots.txt" } ),
|
(r'^robots.txt(?P<path>)$', 'django.views.static.serve', { 'document_root' : "/home/itf/soc/edgware/static/txt/robots.txt" } ),
|
||||||
# Uncomment the admin/doc line below and add 'django.contrib.admindocs'
|
# Uncomment the admin/doc line below and add 'django.contrib.admindocs'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user