still working on layout
This commit is contained in:
parent
2c09f79528
commit
5854aaf6bf
@ -9,7 +9,6 @@ class ComicPressAddonBookmarkWidget extends ComicPressAddon {
|
|||||||
$this->comicpress = $comicpress;
|
$this->comicpress = $comicpress;
|
||||||
|
|
||||||
add_action('wp_head', array(&$this, 'wp_head'));
|
add_action('wp_head', array(&$this, 'wp_head'));
|
||||||
$this->comicpress->additional_javascripts[] = '/js/bookmark.js';
|
|
||||||
|
|
||||||
wp_enqueue_script('prototype');
|
wp_enqueue_script('prototype');
|
||||||
wp_enqueue_script('cookiejar', get_template_directory_uri() . '/js/cookiejar.js', array('prototype'));
|
wp_enqueue_script('cookiejar', get_template_directory_uri() . '/js/cookiejar.js', array('prototype'));
|
||||||
|
@ -16,7 +16,9 @@ var LayoutEditor = Class.create({
|
|||||||
this.section_handles = [];
|
this.section_handles = [];
|
||||||
for (i = 0, il = this.sections.length; i < il; ++i) {
|
for (i = 0, il = this.sections.length; i < il; ++i) {
|
||||||
var sh = Math.floor(this.height * this.sections[i][1]);
|
var sh = Math.floor(this.height * this.sections[i][1]);
|
||||||
var section = new Element("div", { 'style': "height: " + sh + "px" });
|
var section = new Element("div", { 'style': "height: " + sh + "px", "class": this.sections[i][0] });
|
||||||
|
var inside = new Element("div");
|
||||||
|
section.insert(inside);
|
||||||
this.container.insert(section);
|
this.container.insert(section);
|
||||||
this.section_handles.push(section);
|
this.section_handles.push(section);
|
||||||
}
|
}
|
||||||
@ -25,6 +27,8 @@ var LayoutEditor = Class.create({
|
|||||||
var myThis = this;
|
var myThis = this;
|
||||||
$w('left right').each(function(which) {
|
$w('left right').each(function(which) {
|
||||||
myThis.sidebar_handles[which] = new Element("div", { 'style': 'position: absolute; z-index: 1' });
|
myThis.sidebar_handles[which] = new Element("div", { 'style': 'position: absolute; z-index: 1' });
|
||||||
|
var inside = new Element("div");
|
||||||
|
myThis.sidebar_handles[which].insert(inside);
|
||||||
myThis.container.insert(myThis.sidebar_handles[which]);
|
myThis.container.insert(myThis.sidebar_handles[which]);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -4,17 +4,29 @@
|
|||||||
<script type="text/javascript" src="prototype.js"></script>
|
<script type="text/javascript" src="prototype.js"></script>
|
||||||
<script type="text/javascript" src="LayoutEditor.js"></script>
|
<script type="text/javascript" src="LayoutEditor.js"></script>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
#layout-editor-container div {
|
#layout-editor-container > div {
|
||||||
border: solid red 1px ;
|
}
|
||||||
background-color: #aaa
|
|
||||||
|
#layout-editor-container > div > div {
|
||||||
|
border: solid red 1px;
|
||||||
|
background-color: #aaa;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="layout-editor-container" style="width: 300px"></div>
|
<div id="layout-editor-container" style="width: 300px"></div>
|
||||||
<form id="layout-editor-controls">
|
<form id="layout-editor-controls">
|
||||||
<fieldset>
|
<h3>Sidebars</h3>
|
||||||
</fieldset>
|
<?php foreach (array(
|
||||||
|
'left' => array(
|
||||||
|
'name' => 'Left Sidebar'
|
||||||
|
)
|
||||||
|
) as $key => $info) { ?>
|
||||||
|
<h4><?php echo $info['name'] ?></h4>
|
||||||
|
|
||||||
|
<?php } ?>
|
||||||
</form>
|
</form>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
Loading…
Reference in New Issue
Block a user