Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: jgsmith/perl-ookook
base: 8492bac5ff
...
head fork: jgsmith/perl-ookook
compare: cff4955b7f
  • 3 commits
  • 6 files changed
  • 0 commit comments
  • 1 contributor
View
1  META.yml
@@ -30,6 +30,7 @@ requires:
Catalyst::Plugin::StackTrace: 0
Catalyst::Plugin::Static::Simple: 0
Catalyst::Plugin::StatusMessage: 0
+ Catalyst::Plugin::Unicode::Encoding: 0
Catalyst::Runtime: 5.90012
CatalystX::RoleApplicator: 0
Config::General: 0
View
1  Makefile.PL
@@ -24,6 +24,7 @@ requires 'Catalyst::Plugin::StackTrace';
requires 'Catalyst::Plugin::StatusMessage';
requires 'Catalyst::Plugin::Session';
requires 'Catalyst::Plugin::Session::State::Cookie';
+requires 'Catalyst::Plugin::Unicode::Encoding';
requires 'CatalystX::RoleApplicator';
View
3  lib/OokOok.pm
@@ -21,6 +21,8 @@ use Catalyst qw/
ConfigLoader
Static::Simple
+ Unicode::Encoding
+
Session
Session::Store::FastMmap
Session::State::Cookie
@@ -55,6 +57,7 @@ __PACKAGE__->config(
# Disable deprecated behavior needed by old applications
disable_component_resolution_regex_fallback => 1,
enable_catalyst_header => 1, # Send X-Catalyst header
+ encoding => 'UTF-8',
);
__PACKAGE__->config(
'View::HTML' => {
View
7 lib/OokOok/Controller/Project.pm
@@ -581,13 +581,14 @@ sub page_PUT {
}
if($c -> req -> data -> {page_parts}) {
my $parts = $c -> req -> data -> {page_parts};
- my $q = $page -> page_parts;
- my($pp, $info);
+ my($pp, $info, $page_part);
while(($pp, $info) = each(%$parts)) {
if(exists $info->{content}) {
- $page -> page_parts -> find({ name => $pp }) -> update({
+
+ $page_part = $page -> page_parts -> find({ name => $pp }) -> update({
content => $info->{content}
});
+ $page = $page_part -> page;
}
}
}
View
6 root/src/project/project.tt2
@@ -27,7 +27,7 @@
</div>
[% ELSE %]
<table id="sitemap-content" width="100%">
- <tr><th width="60%">Slug</th><th width="25%">Page</th><th width="15%">Modify</th></tr>
+ <tr><th width="60%">Path</th><th width="25%">Page Title</th><th width="15%">Modify</th></tr>
</table>
[% END %]
</div>
@@ -231,6 +231,10 @@ $(function() {
success: cb
});
},
+ previewItem: function(path, item, cb) {
+ var uri = path.join("/");
+ window.open('[% c.uri_for("/v/dev/" _ project.uuid) %]' + uri, 'ookook-preview-' + item.visual);
+ },
editItem: function(path, item, cb) {
// change the page we're pointing to
var url;
View
10 root/static/js/application.js
@@ -68,7 +68,15 @@ $.fn.tree = function(config) {
pageTitleTd.text(config.pages[item.visual].title);
});
});
- td.find(".drowndown-menu").append(t);
+ td.find(".dropdown-menu").append(t);
+
+ if(item.visual != null) {
+ t = $("<a href='#'>Preview</a>");
+ t.click(function() {
+ ops.previewItem(item.path, item);
+ });
+ td.find(".dropdown-menu").append(t);
+ }
t = $("<a href='#'>Add</a>");
// add click handler for adding a child

No commit comments for this range

Something went wrong with that request. Please try again.