mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-17 03:31:11 +00:00
Merge remote-tracking branch 'torchbox/master'
This commit is contained in:
commit
5dc45ad7dc
5 changed files with 65 additions and 24 deletions
|
|
@ -25,4 +25,9 @@ notifications:
|
|||
- wagtail-ci@torchbox.com
|
||||
on_success: change
|
||||
on_failure: always
|
||||
webhooks:
|
||||
urls:
|
||||
- https://torchbox.slack.com/services/hooks/travis?token=Qs4aYF1Y5wJZAF797PKHShBI
|
||||
on_success: change
|
||||
on_failure: always
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
Wagtail CMS
|
||||
===========
|
||||
|
||||
.. image:: http://i.imgur.com/4pbWQ35.png
|
||||
|
||||
Wagtail is a Django content management system built originally for the `Royal College of Art <http://www.rca.ac.uk/>`_ and focused on flexibility and user experience. Its features include:
|
||||
|
||||
* A fast, attractive editor interface
|
||||
|
|
|
|||
|
|
@ -7,12 +7,14 @@
|
|||
width:48%;
|
||||
float:left;
|
||||
padding:0;
|
||||
position:relative;
|
||||
|
||||
&:before,&:after{
|
||||
display:none;
|
||||
}
|
||||
}
|
||||
a{
|
||||
.box-shadow(inset 0px -2px 3px 0 rgba(0,0,0,0.1));
|
||||
.transition(border-color 0.2s ease);
|
||||
background-color:@color-grey-4;
|
||||
outline:none;
|
||||
|
|
@ -25,7 +27,6 @@
|
|||
padding:0 20px;
|
||||
color:@color-grey-2;
|
||||
border-top:0.3em solid darken(@color-grey-4,0%);
|
||||
border-bottom:1px solid transparent;
|
||||
|
||||
&:hover{
|
||||
color:inherit;
|
||||
|
|
@ -35,9 +36,28 @@
|
|||
|
||||
a.errors{
|
||||
color:@color-red !important;
|
||||
|
||||
&:after{
|
||||
.border-radius(50%);
|
||||
.box-shadow(1px 1px 2px rgba(0, 0, 0, 0.2));
|
||||
position:absolute;
|
||||
right:-0.5em;
|
||||
top:-0.5em;
|
||||
z-index:5;
|
||||
min-width:1em;
|
||||
color:white;
|
||||
background:@color-red;
|
||||
border:2px solid darken(@color-red,20%);
|
||||
content:attr(data-count);
|
||||
padding:0 0.3em;
|
||||
line-height:1.4em;
|
||||
text-align:center;
|
||||
font-size:0.8em;
|
||||
}
|
||||
}
|
||||
|
||||
li.active a{
|
||||
.box-shadow(none);
|
||||
color:@color-grey-1;
|
||||
background-color:white;
|
||||
border-top:0.3em solid @color-grey-1;
|
||||
|
|
|
|||
|
|
@ -108,27 +108,29 @@ $(function(){
|
|||
});
|
||||
|
||||
/* Header search behaviour */
|
||||
var search_current_index = 0;
|
||||
var search_next_index = 0;
|
||||
if(window.headerSearch){
|
||||
var search_current_index = 0;
|
||||
var search_next_index = 0;
|
||||
|
||||
$(window.headerSearch.termInput).on('input', function() {
|
||||
clearTimeout($.data(this, 'timer'));
|
||||
var wait = setTimeout(search, 200);
|
||||
$(this).data('timer', wait);
|
||||
});
|
||||
$(window.headerSearch.termInput).on('input', function() {
|
||||
clearTimeout($.data(this, 'timer'));
|
||||
var wait = setTimeout(search, 200);
|
||||
$(this).data('timer', wait);
|
||||
});
|
||||
|
||||
function search () {
|
||||
search_next_index++;
|
||||
var index = search_next_index;
|
||||
$.ajax({
|
||||
url: window.headerSearch.url,
|
||||
data: {q: $(window.headerSearch.termInput).val()},
|
||||
success: function(data, status) {
|
||||
if (index > search_current_index) {
|
||||
search_current_index = index;
|
||||
$(window.headerSearch.targetOutput).html(data);
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
function search () {
|
||||
search_next_index++;
|
||||
var index = search_next_index;
|
||||
$.ajax({
|
||||
url: window.headerSearch.url,
|
||||
data: {q: $(window.headerSearch.termInput).val()},
|
||||
success: function(data, status) {
|
||||
if (index > search_current_index) {
|
||||
search_current_index = index;
|
||||
$(window.headerSearch.targetOutput).html(data);
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -236,11 +236,23 @@ function initSlugCleaning(){
|
|||
}
|
||||
|
||||
function initErrorDetection(){
|
||||
var errorSections = {};
|
||||
|
||||
// first count up all the errors
|
||||
$('.error-message').each(function(){
|
||||
var parentSection = $(this).closest('section');
|
||||
|
||||
$('.tab-nav a[href=#'+ parentSection.attr('id') +']').addClass('errors');
|
||||
})
|
||||
if(!errorSections[parentSection.attr('id')]){
|
||||
errorSections[parentSection.attr('id')] = 0;
|
||||
}
|
||||
|
||||
errorSections[parentSection.attr('id')] = errorSections[parentSection.attr('id')]+1;
|
||||
});
|
||||
|
||||
// now identify them on each tab
|
||||
for(var index in errorSections) {
|
||||
$('.tab-nav a[href=#'+ index +']').addClass('errors').attr('data-count', errorSections[index]);
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue