Skip to content

Commit

Permalink
Merge 'develop' into 'file-layout'.
Browse files Browse the repository at this point in the history
  • Loading branch information
kimisgold committed Mar 15, 2016
1 parent 92bbde6 commit 6578e5e
Show file tree
Hide file tree
Showing 116 changed files with 3,175 additions and 2,696 deletions.
9 changes: 8 additions & 1 deletion README.md
Expand Up @@ -63,7 +63,14 @@ You can find Omeka-specific code under `application/`.
## local.config.php options

* `thumbnailer` Default is `Omeka\File\ImageMagickThumbnailer`. Also available are `Omeka\File\IMagickThumbnailer` and `Omeka\File\GdThumbnailer`
* `phpcli_path` Default is to attempt to detect correct path to PHP. Use this option to specify a path if needed in your server configuration.
* `phpcli_path` Default is to attempt to detect correct path to PHP. Use this option to specify a path if needed in your server configuration. For example:
```
'cli' => array(
'phpcli_path' => '/usr/bin/php55',
),
```


## Libraries

Expand Down
3 changes: 2 additions & 1 deletion application/Module.php
Expand Up @@ -20,7 +20,7 @@ class Module extends AbstractModule
/**
* This Omeka version.
*/
const VERSION = '0.4.5-alpha';
const VERSION = '0.5.0-alpha';

/**
* @var array View helpers that need service manager injection
Expand All @@ -37,6 +37,7 @@ class Module extends AbstractModule
'blockLayout' => 'Omeka\View\Helper\BlockLayout',
'userIsAllowed' => 'Omeka\View\Helper\UserIsAllowed',
'navigationLink' => 'Omeka\View\Helper\NavigationLink',
'deleteConfirmForm' => 'Omeka\View\Helper\DeleteConfirmForm'
];

/**
Expand Down
12 changes: 9 additions & 3 deletions application/asset/css/style.css
Expand Up @@ -1207,6 +1207,10 @@ th {
content: "";
}

#menu a.theme:before {
content: "";
}

/* @end */
/* @end */
/* @group ----- Wrappers ----- */
Expand Down Expand Up @@ -2661,6 +2665,7 @@ th {
position: fixed;
top: 5.25em;
left: 100%;
visibility: hidden;
bottom: 0;
background-color: #f7f7f7;
z-index: 3;
Expand All @@ -2673,8 +2678,9 @@ th {
-webkit-transition-duration: 0.5s;
transition-duration: 0.5s;
}
.sidebar.active {
.sidebar.active, .sidebar.always-open {
left: 75.52083%;
visibility: visible;
}
.sidebar .o-icon-close {
position: absolute;
Expand Down Expand Up @@ -3734,11 +3740,11 @@ th {
width: 100%;
}

.sidebar.active {
.sidebar.always-open {
left: 100%;
}

.sidebar.mobile.active,
.sidebar.active,
#resource-details.active #select-item,
.confirm-panel {
left: 0;
Expand Down
81 changes: 44 additions & 37 deletions application/asset/js/global.js
Expand Up @@ -3,7 +3,7 @@ var Omeka = {
//close delete sidebar if open
if (!context.hasClass('delete')) {
if ($('#delete').hasClass('active')) {
$('#delete').removeClass('mobile active');
$('#delete').removeClass('active');
}
}

Expand All @@ -19,38 +19,22 @@ var Omeka = {
if (!$('body').hasClass('sidebar-open')) {
$('body').addClass('sidebar-open');
}
var sidebarConfirm = $('#sidebar-confirm');
if (context.hasClass('sidebar-confirm')) {
sidebarConfirm.show();
$('#sidebar-confirm form').attr(
'action', context.data('sidebar-confirm-url'));
} else {
sidebarConfirm.hide();
}

if (context.attr('data-sidebar-content-url')) {
this.populateSidebarContent(context, sidebar);
}
sidebar.addClass('mobile active');
sidebar.addClass('active');
return sidebar;
},

closeSidebar : function(context) {
if (context.hasClass('mobile-only')) {
context.closest('.active').removeClass('mobile');
} else {
context.closest('.active').removeClass('mobile active');
if ($('.active.sidebar').length < 1) {
$('body').removeClass('sidebar-open');
}
context.removeClass('active');
context.closest('.active').removeClass('active');
if ($('.active.sidebar').length < 1 && $('.always-open.sidebar').length < 1) {
$('body').removeClass('sidebar-open');
}
},

switchActiveSection: function (section) {
$('.section.active, .section-nav li.active').removeClass('active');
section.addClass('active');
$('.section-nav a[href="#' + section.attr('id') + '"]').parent().addClass('active');
},

populateSidebarContent : function(context, sidebar) {
var url = context.data('sidebar-content-url');
var sidebarContent = sidebar.find('.sidebar-content');
Expand All @@ -66,6 +50,12 @@ var Omeka = {
});
},

switchActiveSection: function (section) {
$('.section.active, .section-nav li.active').removeClass('active');
section.addClass('active');
$('.section-nav a[href="#' + section.attr('id') + '"]').parent().addClass('active');
},

filterSelector : function() {
var filter = $(this).val().toLowerCase();
var selector = $(this).closest('.selector');
Expand Down Expand Up @@ -126,15 +116,37 @@ var Omeka = {

$('#content').on('click', 'a.sidebar-content', function(e) {
e.preventDefault();
Omeka.openSidebar($(this));
var sidebarSelector = $(this).data('sidebar-selector');
Omeka.openSidebar($(this), sidebarSelector);
});

// Attach sidebar triggers
$('#content').on('click', 'a.sidebar-confirm', function(e) {
$('#content').on('click', '.button.delete, button.delete', function(e) {
e.preventDefault();
Omeka.openSidebar($(this), '#delete');
});

if ($('.always-open.sidebar').length > 0) {
$('#content').addClass('sidebar-open');
}

$('.sidebar').find('.sidebar-close').click(function(e) {
e.preventDefault();
Omeka.closeSidebar($(this));
});

// Open sidebars on mobile
$('button.mobile-only').on('click', function(e) {
e.preventDefault();
var mobileButton = $(this);
var sidebarId = mobileButton.attr('id');
sidebarId = '#' + sidebarId.replace('-button', '');
$(sidebarId).addClass('active');
mobileButton.parents('form').bind('DOMSubtreeModified', function() {
$('.sidebar.always-open').removeClass('active');
$(this).unbind('DOMSubtreeModified');
});
});

// Make resource public or private
$('#content').on('click', 'a.o-icon-private, a.o-icon-public', function(e) {
e.preventDefault();
Expand All @@ -152,15 +164,6 @@ var Omeka = {
}
});

if ($('.active.sidebar').length > 0) {
$('#content').addClass('sidebar-open');
}

$('.sidebar').find('.sidebar-close').click(function(e) {
e.preventDefault();
Omeka.closeSidebar($(this));
});

// Skip to content button. See http://www.bignerdranch.com/blog/web-accessibility-skip-navigation-links/
$('.skip').click(function(e) {
$('#main').attr('tabindex', -1).on('blur focusout', function() {
Expand Down Expand Up @@ -261,7 +264,7 @@ var Omeka = {
$('#search-form').change(Omeka.updateSearch);
Omeka.updateSearch();
});

$(window).load(function() {
var setSubmittedFlag = function () {
$(this).data('omekaFormSubmitted', true);
Expand All @@ -277,12 +280,16 @@ var Omeka = {
var preventNav = false;
$('form[method=POST]').each(function () {
var form = $(this);
var originalData = form.data('omekaFormOriginalData');
if (form.data('omekaFormSubmitted')) {
return;
}

form.trigger('o:before-form-unload');
if (form.data('omekaFormDirty') || form.data('omekaFormOriginalData') !== form.serialize()) {

if (form.data('omekaFormDirty')
|| (originalData && originalData !== form.serialize())
) {
preventNav = true;
return false;
}
Expand Down
13 changes: 1 addition & 12 deletions application/asset/js/resource-form.js
@@ -1,18 +1,6 @@
(function($) {

$(document).ready( function() {
// Open sidebars on mobile
$('button.mobile-only').on('click', function(e) {
e.preventDefault();
var mobileButton = $(this);
var sidebarId = mobileButton.attr('id');
sidebarId = sidebarId.replace('-button', '');
$('#' + sidebarId).addClass('mobile');
mobileButton.parents('form').bind('DOMSubtreeModified', function() {
$('.sidebar.active.mobile').removeClass('mobile');
$(this).unbind('DOMSubtreeModified');
});
});

// Select property
$('#property-selector li.selector-child').on('click', function(e) {
Expand Down Expand Up @@ -98,6 +86,7 @@
var valueObj = $('.resource-details').data('resource-values');
var namePrefix = value.data('name-prefix');
prepareResource(value, valueObj, namePrefix);
Omeka.closeSidebar($('#select-resource .sidebar-close'));
});

$('.button.resource-select').on('click', function(e) {
Expand Down
1 change: 0 additions & 1 deletion application/asset/js/resource-selector.js
Expand Up @@ -31,7 +31,6 @@
e.preventDefault();
var context = $(this);
Omeka.closeSidebar(context);
context.parents('.mobile').removeClass('mobile');
context.trigger('o:resource-selected');
});

Expand Down
9 changes: 8 additions & 1 deletion application/asset/sass/_screen.scss
Expand Up @@ -802,6 +802,10 @@ nav.pagination + *:not(.sorting) {
content: $fa-var-gears;
}

#menu a.theme:before {
content: $fa-var-paint-brush;
}

/* @end */

/* @end */
Expand Down Expand Up @@ -2297,6 +2301,7 @@ input[type="text"].value-language,
position: fixed;
top: rhythm(3.5);
left: 100%;
visibility: hidden;
bottom: 0;
background-color: #f7f7f7;
z-index: 3;
Expand All @@ -2307,8 +2312,10 @@ input[type="text"].value-language,
width: span(4 of 16) - gutter(32);
@include transition-duration(.5s);

&.active {
&.active,
&.always-open {
left: span(12 of 16) + gutter(32);
visibility: visible;
}

.o-icon-close {
Expand Down
4 changes: 2 additions & 2 deletions application/asset/sass/_tablet.scss
Expand Up @@ -223,11 +223,11 @@ body.sidebar-open #content {
width: 100%;
}

.sidebar.active {
.sidebar.always-open {
left: 100%;
}

.sidebar.mobile.active,
.sidebar.active,
#resource-details.active #select-item,
.confirm-panel {
left: 0;
Expand Down
5 changes: 4 additions & 1 deletion application/config/module.config.php
Expand Up @@ -250,12 +250,14 @@
'itemSetSelect' => 'Omeka\View\Helper\ItemSetSelect',
'formPropertyInputs' => 'Omeka\View\Helper\PropertyInputs',
'resourceClassSelect' => 'Omeka\View\Helper\ResourceClassSelect',
'deleteConfirm' => 'Omeka\View\Helper\DeleteConfirm',
'searchFilters' => 'Omeka\View\Helper\SearchFilters',
'ckEditor' => 'Omeka\View\Helper\CkEditor',
'sitePagePagination' => 'Omeka\View\Helper\SitePagePagination',
],
'factories' => [
'assetUrl' => 'Omeka\Service\ViewHelperAssetUrlFactory',
'themeSetting' => 'Omeka\Service\ViewHelperThemeSettingFactory',
],
],
'data_types' => [
Expand All @@ -273,7 +275,8 @@
'tableOfContents' => 'Omeka\Site\BlockLayout\TableOfContents',
'fileWithText' => 'Omeka\Site\BlockLayout\FileWithText',
'file' => 'Omeka\Site\BlockLayout\File',
'lineBreak' => 'Omeka\Site\BlockLayout\LineBreak'
'lineBreak' => 'Omeka\Site\BlockLayout\LineBreak',
'itemWithMetadata' => 'Omeka\Site\BlockLayout\ItemWithMetadata',
],
],
'navigation_links' => [
Expand Down
21 changes: 14 additions & 7 deletions application/config/navigation.config.php
Expand Up @@ -2,6 +2,13 @@
return [
'navigation' => [
'admin' => [
[
'label' => 'Sites',
'class' => 'sites',
'route' => 'admin/site',
'resource' => 'Omeka\Controller\SiteAdmin\Index',
'privilege' => 'index',
],
[
'label' => 'Items',
'class' => 'items',
Expand Down Expand Up @@ -105,13 +112,6 @@
'resource' => 'Omeka\Controller\Admin\Job',
'privilege' => 'browse',
],
[
'label' => 'Sites',
'class' => 'sites',
'route' => 'admin/site',
'resource' => 'Omeka\Controller\SiteAdmin\Index',
'privilege' => 'index',
],
[
'label' => 'Settings',
'class' => 'settings',
Expand Down Expand Up @@ -189,6 +189,13 @@
'action' => 'users',
'useRouteMatch' => true
],
[
'label' => 'Theme',
'class' => 'theme',
'route' => 'admin/site/default',
'action' => 'theme',
'useRouteMatch' => true
],
[
'label' => 'Settings',
'class' => 'settings',
Expand Down

0 comments on commit 6578e5e

Please sign in to comment.