Merge remote-tracking branch 'upstream/master'
Conflicts: .gitignore
This commit is contained in:
Коммит
e57d672707
|
@ -7,5 +7,9 @@
|
|||
node_modules
|
||||
*bower_components
|
||||
*.vulcanize.html
|
||||
<<<<<<< HEAD
|
||||
*.iml
|
||||
.idea/*
|
||||
.idea/*
|
||||
=======
|
||||
*.vulcanize.js
|
||||
>>>>>>> upstream/master
|
||||
|
|
6
admin.py
6
admin.py
|
@ -326,6 +326,10 @@ class FeatureHandler(common.ContentHandler):
|
|||
if sample_links:
|
||||
sample_links = [x.strip() for x in sample_links.split(',')]
|
||||
|
||||
search_tags = self.request.get('search_tags') or []
|
||||
if search_tags:
|
||||
search_tags = [x.strip() for x in search_tags.split(',')]
|
||||
|
||||
redirect_url = self.DEFAULT_URL
|
||||
|
||||
# Update/delete existing feature.
|
||||
|
@ -362,6 +366,7 @@ class FeatureHandler(common.ContentHandler):
|
|||
feature.web_dev_views = int(self.request.get('web_dev_views'))
|
||||
feature.doc_links = doc_links
|
||||
feature.sample_links = sample_links
|
||||
feature.search_tags = search_tags
|
||||
else:
|
||||
feature = models.Feature(
|
||||
category=int(self.request.get('category')),
|
||||
|
@ -391,6 +396,7 @@ class FeatureHandler(common.ContentHandler):
|
|||
web_dev_views=int(self.request.get('web_dev_views')),
|
||||
doc_links=doc_links,
|
||||
sample_links=sample_links,
|
||||
search_tags=search_tags,
|
||||
)
|
||||
|
||||
if 'delete' in path:
|
||||
|
|
2
app.yaml
2
app.yaml
|
@ -1,5 +1,5 @@
|
|||
application: cr-status
|
||||
version: 20140622
|
||||
version: 20140721
|
||||
runtime: python27
|
||||
threadsafe: true
|
||||
api_version: 1
|
||||
|
|
|
@ -245,6 +245,7 @@ class Feature(DictModel):
|
|||
d['owner'] = ', '.join(self.owner)
|
||||
d['doc_links'] = ', '.join(self.doc_links)
|
||||
d['sample_links'] = ', '.join(self.sample_links)
|
||||
d['search_tags'] = ', '.join(self.search_tags)
|
||||
return d
|
||||
|
||||
@classmethod
|
||||
|
@ -358,6 +359,8 @@ class Feature(DictModel):
|
|||
sample_links = db.StringListProperty()
|
||||
#tests = db.StringProperty()
|
||||
|
||||
search_tags = db.StringListProperty()
|
||||
|
||||
comments = db.StringProperty(multiline=True)
|
||||
|
||||
|
||||
|
@ -498,6 +501,9 @@ class FeatureForm(forms.Form):
|
|||
ie_views_link = forms.URLField(required=False, label='',
|
||||
help_text='Citation link.')
|
||||
|
||||
search_tags = forms.CharField(label='Search tags', required=False,
|
||||
help_text='Comma separated keywords used only in search')
|
||||
|
||||
comments = forms.CharField(label='', required=False, widget=forms.Textarea(
|
||||
attrs={'cols': 50, 'placeholder': 'Additional comments, caveats, info...'}))
|
||||
|
||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -162,15 +162,7 @@
|
|||
openChanged: function() {
|
||||
this.open ? this.classList.add('open') : this.classList.remove('open');
|
||||
|
||||
if (history && history.replaceState) {
|
||||
if (this.open) {
|
||||
history.pushState({id: this.feature.id}, this.feature.name,
|
||||
'/features/' + this.feature.id + location.hash);
|
||||
} else {
|
||||
history.replaceState({id: null}, this.feature.name,
|
||||
'/features' + location.hash);
|
||||
}
|
||||
}
|
||||
this.fire('feature-toggled', {feature: this.feature, open: this.open});
|
||||
},
|
||||
toggle: function(e, details, sender) {
|
||||
// Don't toggle panel if tooltip or link is being clicked.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<link rel="import" href="../bower_components/polymer/polymer.html">
|
||||
<link rel="import" href="chromedash-feature.html">
|
||||
|
||||
<polymer-element name="chromedash-featurelist" attributes="whitelisted features" on-scroll="{{onScrollList}}" on-keyup="{{onKeyUp}}">
|
||||
<polymer-element name="chromedash-featurelist" attributes="whitelisted features" on-scroll="{{onScrollList}}" on-keyup="{{onKeyUp}}" on-feature-toggled="{{onFeatureToggled}}">
|
||||
<template>
|
||||
<link rel="stylesheet" href="../css/elements/chromedash-featurelist.css">
|
||||
<ul>
|
||||
|
@ -47,6 +47,7 @@
|
|||
Polymer('chromedash-featurelist', {
|
||||
whitelisted: false,
|
||||
metadata: null,
|
||||
search: null,
|
||||
ready: function() {
|
||||
this.features = this.features || [];
|
||||
this.filtered = this.filtered || [];
|
||||
|
@ -68,6 +69,19 @@
|
|||
var feature = this.featureInView(sender.scrollTop);
|
||||
this.metadata.selectMilestone(feature);
|
||||
},
|
||||
onFeatureToggled: function(e, detail, sender) {
|
||||
var feature = detail.feature;
|
||||
var open = detail.open;
|
||||
if (history && history.replaceState) {
|
||||
if (open) {
|
||||
history.pushState({id: feature.id}, feature.name,
|
||||
'/features/' + feature.id);
|
||||
} else {
|
||||
var hash = this.search.value ? '#' + this.search.value : '';
|
||||
history.replaceState({id: null}, feature.name, '/features' + hash);
|
||||
}
|
||||
}
|
||||
},
|
||||
metadataChanged: function(oldVal) {
|
||||
// TODO: probably need to remove the listener if metadata element changes.
|
||||
//this.metadata.removeEventListener('milestoneselect', onMetadataChanged_.bind(this));
|
||||
|
@ -151,7 +165,9 @@
|
|||
this.filtered = this.features;
|
||||
} else {
|
||||
val = val.trim();
|
||||
location.hash = val;
|
||||
if (history && history.replaceState) {
|
||||
history.replaceState({id: null}, document.title, '/features#' + val);
|
||||
}
|
||||
|
||||
// owner: user@chromium.org
|
||||
var match = val.match(/^owner:\s*(.*)/);
|
||||
|
@ -195,6 +211,7 @@
|
|||
this.filtered = this.features.filter(function(feature, idx, array) {
|
||||
return regex.test(feature.name) || regex.test(feature.category) ||
|
||||
regex.test(feature.summary) ||
|
||||
regex.test(feature.search_tags) ||
|
||||
/*regex.test(feature.shipped_milestone) ||*/
|
||||
regex.test(feature.impl_status_chrome);
|
||||
});
|
||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -93,6 +93,7 @@ document.addEventListener('polymer-ready', function(e) {
|
|||
var resp = e.target.response;
|
||||
featureList.features = (typeof resp == 'string') ? JSON.parse(resp) : resp;
|
||||
featureList.metadata = chromeMetadata; // Feature list needs access to the selected milestone.
|
||||
featureList.search = search;
|
||||
|
||||
updateCount(featureList.features.length); // Set initial # features showing.
|
||||
search.disabled = false;
|
||||
|
|
Загрузка…
Ссылка в новой задаче