mirror of
https://github.com/flynx/PortableMag.git
synced 2025-10-28 10:40:07 +00:00
fixed title and some other minor stuff...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
7b4e7c20e6
commit
d8463700d0
@ -206,11 +206,14 @@ function str2ab(str) {
|
||||
function loadMagazineDOM(data){
|
||||
var data = $(data)
|
||||
// get the .magazine element...
|
||||
data = data.hasClass('magazine') ? data.children() : data.find('.magazine').children()
|
||||
data = data.hasClass('magazine') ? data : data.find('.magazine')
|
||||
var title = data.attr('name')
|
||||
|
||||
var mag = $('.magazine')
|
||||
mag.children().remove()
|
||||
mag.append(data)
|
||||
mag
|
||||
.append(data.children())
|
||||
.attr('name', title)
|
||||
|
||||
runMagazineTemplates()
|
||||
togglePageView(togglePageView('?'))
|
||||
|
||||
@ -1625,6 +1625,12 @@ function createCoverPage(data){
|
||||
// NOTE: for these to be self-aplicable they must only replace the content
|
||||
// of the matched elements and not touch the element itself.
|
||||
var MagazineTemplates = {
|
||||
/*
|
||||
'.magazine[name]': function(elem){
|
||||
$('.magazine-title-text').text($(elem).attr('name'))
|
||||
},
|
||||
*/
|
||||
|
||||
'.image-fit': function(elem){
|
||||
var w = $('.content').width()
|
||||
var h = $('.content').height()
|
||||
@ -1636,7 +1642,6 @@ var MagazineTemplates = {
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
// set dpi value...
|
||||
'.dpi': function(elem){
|
||||
elem.text(getDPI())
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user