Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for optional file include titles #70

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion arlima.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Plugin URI: https://github.com/victorjonsson/Arlima
Description: Manage the order of posts on your front page, or any page you want. This is a plugin suitable for online newspapers that's in need of a fully customizable front page.
Author: VK (<a href="http://twitter.com/chredd">@chredd</a>, <a href="http://twitter.com/znoid">@znoid</a>, <a href="http://twitter.com/victor_jonsson">@victor_jonsson</a>, <a href="http://twitter.com/lefalque">@lefalque</a>)
Version: 3.0.beta.59
Version: 3.0.beta.60
License: GPL2
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/
Expand Down
2 changes: 1 addition & 1 deletion constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
or define('ARLIMA_COMPILE_LESS_IN_BROWSER', ARLIMA_DEV_MODE);

// Plugin version (only edit this via grunt!)
define('ARLIMA_FILE_VERSION', '3.0.beta.59' .(ARLIMA_DEV_MODE ? '__'.time():''));
define('ARLIMA_FILE_VERSION', '3.0.beta.60' .(ARLIMA_DEV_MODE ? '__'.time():''));

// Which type of tag to use for images in Arlima RSS feeds
defined('ARLIMA_RSS_IMG_TAG')
Expand Down
4 changes: 2 additions & 2 deletions js/arlima/arlima.js

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions js/arlima/dev/ArlimaFileIncludes.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@ var ArlimaFileIncludes= (function($, window, ArlimaUtils, ArlimaFormBuilder) {
this.$elem.find('.file-include').each(function(i, fileElement) {

var $file = $(fileElement),
fileArgs = $.parseJSON($file.attr('data-args'));
fileArgs = $.parseJSON($file.attr('data-args')),
title = typeof($file.data('args').title !== 'undefined') ? $file.data('args').title : $file.data('label');

// Create arlima article object, monkey pathc
// Create arlima article object, monkey patch
fileElement.arlimaArticle = new ArlimaArticle({
title : $file.data('label'),
title : title,
options : {
fileInclude : $(fileElement).data('file')
}
Expand Down
1 change: 1 addition & 0 deletions pages/count-down.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php
$args = arlima_file_args(array(
'title' => __('Count Down Timer'),
array(
'type' => 'date',
'property' => 'count_down_to',
Expand Down
6 changes: 3 additions & 3 deletions pages/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -385,14 +385,14 @@
</tr>
</thead>
<tbody>
<?php foreach( $file_includes as $label => $file ): if( is_numeric($label) ) $label = basename($file); ?>
<?php foreach( $file_includes as $label => $file ): if( is_numeric($label) ) $label = basename($file); $file_args = $arlima_file_include->getFileArgs($file); ?>
<tr>
<td colspan="2">
<div class="file-include"
data-args='<?php echo json_encode($arlima_file_include->getFileArgs($file)) ?>'
data-args='<?php echo json_encode($file_args) ?>'
data-file="<?php echo $file; ?>"
data-label="<?php echo $label ?>">
<?php echo $label; ?>
<?php echo isset($file_args['title']) ? $file_args['title'] : $label; ?>
</div>
</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Contributors: @chredd, @znoid, @victor_jonsson, @lefalque, @aaslun
Tags: CMS, e-paper, e-magazine, magazine, newspaper, front page, wysiwyg
Requires at least: 3.8
Tested up to: 3.9.1
Stable tag: 3.0.beta.59
Stable tag: 3.0.beta.60
License: GPL2
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down