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

HTML5 fixes #3485

Merged
merged 23 commits into from
May 4, 2015
Merged
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
3 changes: 2 additions & 1 deletion app/src/js/modules/editcontent.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,10 @@
$('.alert').alert(); // Dismiss alert messages
if (confirmed === true) {
var pathBolt = bolt.conf('paths.bolt'),
form = $('#id').closest('form'),
ctype = $('#contenttype').val(),
id = $('#id').val(),
token = $('#bolt_csrf_token').val(),
token = form.find('input[name="bolt_csrf_token"]').val(),
url = pathBolt + 'content/deletecontent/' + ctype + '/' + id + '?bolt_csrf_token=' + token;

// Fire delete request.
Expand Down
2 changes: 1 addition & 1 deletion app/theme_defaults/_sub_searchbox.twig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

</div>
<!--
<script type="text/javascript">
<script>

$('#searchbar :input[name="submit"]').bind('click', function () {
var link = "/search/" + encodeURI($('input[name="searchterms"]').val());
Expand Down
2 changes: 1 addition & 1 deletion app/view/js/bolt.min.js

Large diffs are not rendered by default.

14 changes: 11 additions & 3 deletions app/view/twig/_base/_listing.twig
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@
</tr>
{% endif %}

<tr {% if content.status!='published' %}class="dim"{% endif %} id="item_{{ content.id }}">
<tr {% if content.status!='published' %}class="dim"{% endif %}{% if not compact and editable %} id="item_{{ content.id }}"{% endif %}>
{% block listing_id %}

{% if not compact and editable and isallowed('delete', contenttype) %}
<td class="check hidden-xs"><input type="checkbox" name="checkRow" /></td>
<td class="check hidden-xs"><input type="checkbox" name="checkRow"></td>
{% else %}
<td style="margin: 0; padding: 0;"></td>
{% endif %}
Expand All @@ -82,7 +82,15 @@
</span></td>
<td class="listthumb">
{% if content.getImage is not empty %}
{{ content.getImage|popup(thumbsize, thumbsize * 0.75, 'c') }}
{# Hack to add alt attribute #}
{#{ content.getImage|popup(thumbsize, thumbsize * 0.75, 'c') }#}
{% set thumb_height = (thumbsize * 0.75)|round %}
{% set thumb_small = content.getImage|thumbnail(thumbsize, thumb_height, 'c') %}
{% set thumb_large = content.getImage|thumbnail(1000, 800, 'r') %}
{% set thumb_title = __('Image') ~ ': ' ~ content.getImage %}
<a href="{{ thumb_large }}" class="magnific" title="{{ thumb_title }}">
<img src="{{ thumb_small }}" width="{{ thumbsize }}" height="{{ thumb_height }}" alt="{{ __('Thumbnail') }}">
</a>
{% endif %}
</td>
{% endblock %}
Expand Down
2 changes: 1 addition & 1 deletion app/view/twig/_sub/_csrf_token.twig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<input type="hidden" name="bolt_csrf_token" id="bolt_csrf_token" value="{{ token() }}" />
<input type="hidden" name="bolt_csrf_token" value="{{ token() }}">
18 changes: 10 additions & 8 deletions app/view/twig/activity/changelog.twig
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,16 @@

<table class="table table-striped dashboardlisting">
<thead>
<th></th>
<th>Type</th>
<th>Contenttype</th>
<th>Title</th>
<th>Fields</th>
<th>Comment</th>
<th>User</th>
<th>Date</th>
<tr>
<th></th>
<th>Type</th>
<th>Contenttype</th>
<th>Title</th>
<th>Fields</th>
<th>Comment</th>
<th>User</th>
<th>Date</th>
</tr>
</thead>
<tbody>
{% for entry in entries %}
Expand Down
20 changes: 11 additions & 9 deletions app/view/twig/activity/systemlog.twig
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,17 @@

<table class="table table-striped dashboardlisting">
<thead>
<th>№</th>
<th>Type</th>
<th>Context</th>
<th>Route</th>
<th>URI</th>
<th>Details</th>
<th>User</th>
<th>IP</th>
<th>Date</th>
<tr>
<th>№</th>
<th>Type</th>
<th>Context</th>
<th>Route</th>
<th>URI</th>
<th>Details</th>
<th>User</th>
<th>IP</th>
<th>Date</th>
</tr>
</thead>
<tbody>
{% for entry in entries %}
Expand Down
6 changes: 3 additions & 3 deletions app/view/twig/components/panel-stack.twig
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<div class="stackitem item-{{ loop.index }} {{ item.type }} info-pop"
data-placement="bottom" data-html="true" data-title="{{ item.basename }}" data-content="{{ item.info }}">
{% if item.type == 'image' %}
<img src="{{ item.filepath|thumbnail(100,100) }}" width="100" height="100">
<img src="{{ item.filepath|thumbnail(100,100) }}" width="100" height="100" alt="{{ __('Thumbnail') }}">
{% else %}
<strong>{{ item.extension|upper }}</strong>
<small>{{ item.basename }}</small>
Expand Down Expand Up @@ -52,7 +52,7 @@

<div id="protostack">
<div class="stackitem image info-pop item-1" data-placement="bottom" data-html="true" data-title="" data-content="">
<img src="" width="100" height="100">
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" width="100" height="100" alt="{{ __('Thumbnail') }}">
</div>

<div class="stackitem other info-pop item-1" data-placement="bottom" data-html="true" data-title="" data-content="">
Expand All @@ -62,7 +62,7 @@
</div>

{# Modal "select from server" #}
<div class="modal fade" id="selectModal-stack" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal fade" id="selectModal-stack" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content"></div>
</div>
Expand Down
3 changes: 1 addition & 2 deletions app/view/twig/dashboard/_aside.twig
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
<b><i class="fa fa-fw fa-bullhorn"></i> Warning: Development version </b>
</div>
<div class="panel-body">
<p>This is a development version of Bolt, so it might contain bugs and unfinished features. Use at your own risk! For 'production' websites, we advise you to stick with the official stable releases. </p>
</p>
<p>This is a development version of Bolt, so it might contain bugs and unfinished features. Use at your own risk! For 'production' websites, we advise you to stick with the official stable releases.</p>
</div>
</div>
{% endif %}
Expand Down
4 changes: 2 additions & 2 deletions app/view/twig/editcontent/_includes-data.twig
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
<script src="{{ paths.app }}view/js/uikit/marked.js"></script>
<script src="{{ paths.app }}view/js/uikit/codemirror-compressed.js"></script>
<script src="{{ paths.app }}view/js/uikit/htmleditor.js"></script>
<link rel="stylesheet" href="{{ paths.app }}view/js/ckeditor/plugins/codemirror/css/codemirror.min.css">
<link rel="stylesheet" href="{{ paths.app }}view/js/uikit/htmleditor.min.css">
<link rel="stylesheet" property="stylesheet" href="{{ paths.app }}view/js/ckeditor/plugins/codemirror/css/codemirror.min.css">
<link rel="stylesheet" property="stylesheet" href="{{ paths.app }}view/js/uikit/htmleditor.min.css">
{% endif %}

{% if 'geolocation' in used_fieldtypes %}
Expand Down
4 changes: 2 additions & 2 deletions app/view/twig/editfile/editfile.twig
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
{{ files_path(context.pathsegments, context.namespace, {'path': '', 'namespace': context.namespace}) }}


<form action="" method="post" class="form-inline" autocomplete="off">
<form method="post" class="form-inline" autocomplete="off">
{{ form_widget(context.form._token) }}

<div>
Expand Down Expand Up @@ -79,7 +79,7 @@
{% endif %}

{# use the files includes in ckeditor/codemirror plugin, instead of duplicating files. #}
<link rel="stylesheet" href="{{ paths.app }}view/js/ckeditor/plugins/codemirror/css/codemirror.min.css">
<link rel="stylesheet" property="stylesheet" href="{{ paths.app }}view/js/ckeditor/plugins/codemirror/css/codemirror.min.css">
<script src="{{ paths.app }}view/js/ckeditor/ckeditor.js"></script>
<script src="{{ paths.app }}view/js/ckeditor/plugins/codemirror/js/codemirror.min.js"></script>
{% for file in codemirror %}
Expand Down
4 changes: 2 additions & 2 deletions app/view/twig/editlocale/editlocale.twig
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<div class="row">
<div class="col-xs-12">
<form action="" method="post" class="form-inline" autocomplete="off">
<form method="post" class="form-inline" autocomplete="off">
<div>
<textarea{{ macro.attr(attr_text) }}>{{ context.form.vars.value.contents }}</textarea>
</div>
Expand All @@ -38,7 +38,7 @@

{% if not ismobileclient() %}
{# use the files includes in ckeditor/codemirror plugin, instead of duplicating files. #}
<link rel="stylesheet" href="{{ paths.app }}view/js/ckeditor/plugins/codemirror/css/codemirror.min.css">
<link rel="stylesheet" property="stylesheet" href="{{ paths.app }}view/js/ckeditor/plugins/codemirror/css/codemirror.min.css">
<script src="{{ paths.app }}view/js/ckeditor/ckeditor.js"></script>
<script src="{{ paths.app }}view/js/ckeditor/plugins/codemirror/js/codemirror.min.js"></script>
<script src="{{ paths.app }}view/js/ckeditor/plugins/codemirror/plugins/yaml.min.js"></script>
Expand Down
4 changes: 2 additions & 2 deletions app/view/twig/edituser/edituser.twig
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@
{% if context.kind != 'profile' %}
<p style="max-width: 500px;">
{% if context.kind == 'edit' %}
{{ __('page.edit-users.user-edit') }}</i>
{{ __('page.edit-users.user-edit') }}
{% elseif context.kind == 'create' %}
{{ __('page.edit-users.user-create') }}
{% endif %}
</p>
{% endif %}

<form action="#" method="post" class="form-horizontal" role="form" autocomplete="off">
<form method="post" class="form-horizontal" role="form" autocomplete="off">
{{ form_widget(context.form) }}
<input type="submit" value="{{ __('page.edit-users.button.save') }}" name="submit" class="btn btn-primary">
</form>
Expand Down
4 changes: 2 additions & 2 deletions app/view/twig/extend/install-package.twig
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</tr>
</thead>
<tbody class="installed-version-item">
<tr><td colspan="3"><strong>{{ __('No Stable Versions Available') }}</strong></td></tr>
<tr><td colspan="4"><strong>{{ __('No Stable Versions Available') }}</strong></td></tr>
</tbody>
</table>
</div>
Expand All @@ -49,7 +49,7 @@
</tr>
</thead>
<tbody class="installed-version-item">
<tr><td colspan="3"><strong>{{ __('No Test Versions Available') }}</strong></td></tr>
<tr><td colspan="4"><strong>{{ __('No Test Versions Available') }}</strong></td></tr>
</tbody>
</table>
</div>
Expand Down
19 changes: 12 additions & 7 deletions app/view/twig/files/_files.twig
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@
<thead>
<tr>
<th>{{ __('page.ckeditor-browse-server.files') }}</th>
<th colspan="2" class="hidden-xs hidden-sm">{{ __('page.ckeditor-browse-server.size') }}</th>
<th colspan="3"><span class="hidden-xs hidden-sm">{{ __('page.ckeditor-browse-server.modified') }}</span></th>
<th class="hidden-xs hidden-sm">{{ __('page.ckeditor-browse-server.size') }}</th>
<th class="hidden-xs hidden-sm">{{ __('page.ckeditor-browse-server.modified') }}</th>
<th colspan="2"></th>
</tr>
</thead>

<tbody>
{% for file in context.files %}
<tr>
{# Column: Filename #}
<td>
{% if file.type in ['jpeg', 'jpg', 'png', 'gif'] %}

Expand Down Expand Up @@ -56,24 +58,27 @@
{% endif %}
{% endif %}
</td>
<td style="min-width: 120px;"class="hidden-xs hidden-sm">
{# Column: Filesize #}
<td style="min-width: 120px;" class="hidden-xs hidden-sm">
{{ file.filesize }}.
{% if file.imagesize is defined %}
<br> {{ file.imagesize }} px.
{% endif %}
</td>
{# Column: Modified #}
<td style="min-width: 140px;" class="hidden-xs hidden-sm">
<time class="moment"
datetime="{{ file.modified|date("c") }}"
title="{{ file.modified }}">
<time class="moment" datetime="{{ file.modified|date("c") }}" title="{{ file.modified }}">
{{ file.modified }}
</time>
</td>
{# Column: Thumbnail #}
<td class="listthumb">
{% if file.imagesize is defined %}
{{ file.newpath|showimage(54, 40, 'c') }}
{% set thumb = file.newpath|showimage(54, 40, 'c') %}{# Hack to add alt attribute #}
<img {{ thumb|slice(5, thumb|length - 6)|raw }} alt="{{ __('Thumbnail')|e('html_attr') }}">
{% endif %}
</td>
{# Column: Actions #}
<td class="actions" style="min-width: 16px;">

<div class="btn-group">
Expand Down
4 changes: 2 additions & 2 deletions app/view/twig/files/_upload.twig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<form action="" method="post" id="filescreenuploader" {{ form_enctype(context.form) }}>
<form method="post" id="filescreenuploader" {{ form_enctype(context.form) }}>
<fieldset>
{{ form_widget(context.form) }}
<div>
Expand All @@ -11,7 +11,7 @@
</fieldset>
</form>

<script type="text/javascript">
<script>
$(function() {
$('input[type=file]').addClass('btn-secondary').bootstrapFileInput();

Expand Down
2 changes: 1 addition & 1 deletion app/view/twig/firstuser/firstuser.twig
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
{{ __('There are no users present in the system. Please create the first user, which will be granted root privileges.') }}
</p>

<form action="#" method="post" class="form-horizontal" role="form" autocomplete="off">
<form method="post" class="form-horizontal" role="form" autocomplete="off">
{{ form_widget(context.form) }}
<input type="submit" value="{{ __('Create the first user') }}" name="submit" class="btn btn-primary">
</form>
Expand Down
2 changes: 1 addition & 1 deletion app/view/twig/login/login.twig
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<label for="username" class="control-label">{{ __('page.login.label.username') }}</label>
<div class="input-group">
<label for="username" class="input-group-addon"><i class="fa fa-fw fa-user"></i></label>
<input id="username" class="form-control" type="text" autofocus="true" name="username" placeholder="{{ __('page.login.placeholder.password') }} …" {% if username is defined %}value="{{ username }}"{% endif %} required>
<input id="username" class="form-control" type="text" autofocus name="username" placeholder="{{ __('page.login.placeholder.password') }} …" {% if username is defined %}value="{{ username }}"{% endif %} required>
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion app/view/twig/omnisearch/omnisearch.twig
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<div class="row">
<div class="col-md-8">
<form action="" method="get">
<form method="get">
<div class="form-group">
<div class="input-group">
<input class="form-control" name="q" type="text" value="{{ context.query }}">
Expand Down
8 changes: 4 additions & 4 deletions app/view/twig/roles/roles.twig
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
{% for permissionName, roles in context.global_permissions %}
<dl style="display: inline-block; vertical-align: top; margin-right: 2em; width: 9em;">
<dt>{{ permissionName }}:</dt>
<dt style="font-weight: normal">
<dd style="font-weight: normal">
<ul style="padding-left: 1.3em;">
{% for role in roles %}
<li>{{ role }}</li>
{% endfor %}
</ul>
</dt>
</dd>
</dl>
{% endfor %}
</div>
Expand All @@ -37,13 +37,13 @@
{% for permissionName, roles in permissions %}
<dl style="display: inline-block; vertical-align: top; margin-right: 2em; width: 9em;">
<dt>{{ permissionName }}:</dt>
<dt style="font-weight: normal">
<dd style="font-weight: normal">
<ul style="padding-left: 1.3em;">
{% for role in roles %}
<li>{{ role }}</li>
{% endfor %}
</ul>
</dt>
</dd>
</dl>
{% endfor %}
</div>
Expand Down