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

Classification #2

Open
wants to merge 46 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
f1216cf
modified centerTour.js and tour.js to support changes to tour in Hud
rkenyon1969 Sep 7, 2016
e69f885
fix: new code to redirect at end of center tour
rkenyon1969 Sep 7, 2016
e7e7da7
fix: centerTour.js
rkenyon1969 Sep 7, 2016
7f3d4f8
Fix: reset global_ran when restarting tour
rkenyon1969 Sep 7, 2016
a512cf2
Update centerTour.js
Sep 8, 2016
6aa82a9
Update centerTour.js
Sep 8, 2016
a4b6768
Merge pull request #712 from aml-development/705_tour
rkenyon1969 Sep 9, 2016
d84edc0
release-1.1.43
mannyrivera2010 Sep 9, 2016
e14c4e5
fix(index):added a check to see if we should display webtop
akonsowski Sep 15, 2016
5c3c738
Merge pull request #717 from aml-development/hide_webtop
akonsowski Sep 19, 2016
fb529cd
release-1.1.44
mannyrivera2010 Sep 21, 2016
88e0dc9
fix(reviews): Changed variable name and text to reflect that reviews …
lsemesky Sep 28, 2016
d6b6f93
Merge pull request #718 from aml-development/686_fixReviewWarningMessage
lsemesky Sep 28, 2016
b14319c
enhance(tags): Increase tag length to 30 #719
lsemesky Sep 30, 2016
cedc791
fix(Carousel): Fixed arrows disappearing when tabbing into carousel #524
lsemesky Oct 3, 2016
ebe0b22
Merge pull request #721 from aml-development/524_CarouselFix
lsemesky Oct 3, 2016
18f92d2
Merge pull request #720 from aml-development/719_IncreaseTagLength
lsemesky Oct 3, 2016
3da9782
release-1.1.45
mannyrivera2010 Oct 5, 2016
f5b5683
Fix(SecurityBanner): Check if current user is a secondPartyUser and s…
lsemesky Oct 7, 2016
598d03f
Fix(SecurityBanner): Removing console.log #709
lsemesky Oct 7, 2016
c641ae0
Fix(Carousel): Moved carousel buttons below carousel div to correct c…
lsemesky Oct 11, 2016
201b1c4
Merge pull request #724 from aml-development/709_SecurityBanner
lsemesky Oct 11, 2016
33cf0ca
Merge pull request #725 from aml-development/723_CarouselScrollFix
lsemesky Oct 11, 2016
9d16657
fix(notificationSettings) Fix notification overflow
lsemesky Oct 17, 2016
558651b
Merge pull request #728 from aml-development/691_LongNotifications
lsemesky Oct 19, 2016
146219a
release-1.1.46
mannyrivera2010 Oct 20, 2016
edab827
fix(Carousel): Fixed styling for new listings so they don't appear ou…
lsemesky Oct 21, 2016
9c54020
fix(Carousel): Forgot new style sheet #726
lsemesky Oct 21, 2016
17fff23
fix(Carousel): Added newline because github was complaining #726
lsemesky Oct 21, 2016
de43aca
fix(carousel): correcting previous style change which prevented carou…
lsemesky Oct 25, 2016
7537ce7
Merge pull request #729 from aml-development/726_CarouselScrollFix
lsemesky Oct 25, 2016
fd34823
release-1.1.47
mannyrivera2010 Oct 26, 2016
31da828
Dropped Piwik support. Forbidden API calls cause redirection to CAS l…
rhutzel Nov 1, 2016
2372bba
Added .git extension to ozp-react-commons repo in package.json
Nov 2, 2016
dd6671f
ozp-analytics will check for the existence of the window._paq array b…
Nov 7, 2016
c017f4e
OZP-41: x-csrftoken header will be added to all POST requests
Nov 8, 2016
f783657
OZP-41: fixed arguments in jQuery.each handler
Nov 8, 2016
c10e9f4
OZP-41: Added x-csrftoken header to DELETE requests
Nov 8, 2016
fc06144
OZP-36: Replaced source as Github for ozp-react-commons dependency
Nov 14, 2016
f28cec8
Changed ozone-development to aml-development for ozp-react-commons de…
Nov 14, 2016
4fecb93
OZP-69: Replaced aml-development/ozp-classification dependency with G…
Dec 1, 2016
9506fe0
OZP-70: Changed ozp-react-commons dependency and made system classifi…
Dec 2, 2016
e3695c4
OZP-70: Made classification banners colored by classification
Dec 2, 2016
02a0380
Added .git extension to ozp-classification dependency
Dec 2, 2016
1e58420
Fixed references to github URLs in package.json
Dec 19, 2016
652123f
Removed 'ozp' from git URLs
Dec 19, 2016
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
36 changes: 36 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,39 @@
### 1.1.47 (2016-10-26)


#### Bug Fixes

* **Carousel:**
* Added newline because github was complaining #726 ([17fff233](https://github.com/ozone-development/ozp-center.git/commit/17fff2335a8c1aae010ac81bbe503d04420a7dba))
* Forgot new style sheet #726 ([9c54020d](https://github.com/ozone-development/ozp-center.git/commit/9c54020d312834bdb6a0f61232f3431e1ea9803b))
* Fixed styling for new listings so they don't appear out of the list #726 ([edab8279](https://github.com/ozone-development/ozp-center.git/commit/edab8279ccf7bf3e84774090edbcf1f285225f06))
* **carousel:** correcting previous style change which prevented carousel animation ([de43acaf](https://github.com/ozone-development/ozp-center.git/commit/de43acafa01e7f76200e37758934a6d9c14d6f47))


### 1.1.46 (2016-10-20)


### 1.1.45 (2016-10-05)


#### Bug Fixes

* **Carousel:** Fixed arrows disappearing when tabbing into carousel #524 ([cedc7910](https://github.com/ozone-development/ozp-center.git/commit/cedc79100c1941c77d81e063c6197c59540a029b))
* **reviews:** Changed variable name and text to reflect that reviews are not to be above FOUO ([88e0dc90](https://github.com/ozone-development/ozp-center.git/commit/88e0dc90918dc7c3207451056c595a519b349175))


### 1.1.44 (2016-09-21)


### 1.1.43 (2016-09-09)


#### Bug Fixes

* centerTour.js ([e7e7da77](https://github.com/ozone-development/ozp-center.git/commit/e7e7da77f91936050eeb5080f5e5a136d0062a5d))
* new code to redirect at end of center tour ([e69f8853](https://github.com/ozone-development/ozp-center.git/commit/e69f88539aa2cd6d12d83fdc6d5d33a0965642c6))


### 1.1.42 (2016-09-01)


Expand Down
22 changes: 14 additions & 8 deletions app/js/analytics/ozp-analytics.js
Original file line number Diff line number Diff line change
@@ -1,35 +1,41 @@
'use strict';

var pushEvent = function(event) {
if (window._paq) {
window._paq.push(event);
}
};

module.exports = {
trackEvent: function (label, data, agency) {
window._paq.push(['trackEvent', label, data, agency]);
pushEvent(['trackEvent', label, data, agency]);
},

trackCategorization: function (label, category, total) {
window._paq.push(['trackEvent', label, category, total]);
pushEvent(['trackEvent', label, category, total]);
},

trackSiteSearch: function (label, query, total) {
query = query.toLowerCase();
window._paq.push(['trackSiteSearch', query, label, total]);
pushEvent(['trackSiteSearch', query, label, total]);
},

trackListingCreation: function(listingName, agency){
window._paq.push(['trackEvent', 'Listing Creation', listingName, agency]);
pushEvent(['trackEvent', 'Listing Creation', listingName, agency]);
},

trackListingOrgApproval: function(listingName, agency){
window._paq.push(['trackEvent', 'Listing Org Approval', listingName, agency]);
pushEvent(['trackEvent', 'Listing Org Approval', listingName, agency]);
},
trackListingApproval: function(listingName, agency){
window._paq.push(['trackEvent', 'Listing Approval', listingName, agency]);
pushEvent(['trackEvent', 'Listing Approval', listingName, agency]);
},

trackListingReview: function(listingName, agency){
window._paq.push(['trackEvent', 'Listing Review', listingName, agency]);
pushEvent(['trackEvent', 'Listing Review', listingName, agency]);
},

trackListingReviewView: function(listingName, agency){
window._paq.push(['trackEvent', 'Listing Review View', listingName, agency]);
pushEvent(['trackEvent', 'Listing Review View', listingName, agency]);
}
};
4 changes: 3 additions & 1 deletion app/js/components/NavBar/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ var NavBar = React.createClass({
<ul className="nav navbar-nav">
<li id="tourstop-hud" className="tooltiped" data-toggle="tooltip" data-placement="bottom" title="HUD"><a className="lrg" href={HUD_URL}><i className="icon-home-grayLightest"></i><span className="hidden-span">HUD</span></a></li>
<li id="tourstop-center" className="active tooltiped" data-toggle="tooltip" data-placement="bottom" title="Center"><a className="lrg" href='#/home' ><i className="icon-shopping-grayLightest activeIcon"></i><span className="hidden-span">Center</span></a></li>
<li id="tourstop-webtop" className="tooltiped" data-toggle="tooltip" data-placement="bottom" title="Webtop"><a className="lrg" href={WEBTOP_URL}><i className="icon-layout-grayLightest"></i><span className="hidden-span">Webtop</span></a></li>
{ !secondParty &&
<li id="tourstop-webtop" className="tooltiped" data-toggle="tooltip" data-placement="bottom" title="Webtop"><a className="lrg" href={WEBTOP_URL}><i className="icon-layout-grayLightest"></i><span className="hidden-span">Webtop</span></a></li>
}
</ul>
</div>

Expand Down
4 changes: 2 additions & 2 deletions app/js/components/carousel/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ var Carousel = React.createClass({
{ this.props.children }
</ul>
<div className="clearfix"></div>
<button className="prev btn hidden" href="#" ref="prev" aria-label="previous carousel button"><i className="icon-caret-left-white" alt=""></i></button>
<button className="next btn hidden" href="#" ref="next" aria-label="next carousel button"><i className="icon-caret-right-white" alt=""></i></button>
</div>
<button className="prev btn hidden" href="#" ref="prev" aria-label="previous carousel button"><i className="icon-caret-left-white" alt=""></i></button>
<button className="next btn hidden" href="#" ref="next" aria-label="next carousel button"><i className="icon-caret-right-white" alt=""></i></button>
</div>
);
},
Expand Down
2 changes: 1 addition & 1 deletion app/js/components/createEdit/validation/listing.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ var securityMarking = NonBlankString(200),
type = NonBlankString(50),
whatIsNew = maybe(StringMax(255)),
categories = list(NonBlankString(50)),
tags = list(StringMax(16)),
tags = list(StringMax(30)),
intents = list(NonBlankString(127)),
screenshots = list(Screenshot),
contacts = list(Contact),
Expand Down
2 changes: 1 addition & 1 deletion app/js/components/quickview/DetailsTab.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ var DetailsTab = React.createClass({
<p className="forceWrap"><label>URL:</label><span> <a className="forceWrap" href={URL}>{ URL }</a></span></p>

<p><label>Categories:</label><span> { categories ? categories : <EmptyFieldValue inline /> }</span></p>
<p><label>Tags:</label><span> {this.renderTags(this) }</span></p>
<p className="forceWrap"><label>Tags:</label><span> {this.renderTags(this) }</span></p>
<p><label>Last Updated:</label><span> { updatedDate }</span></p>
<p><label>Version Number:</label><span> { versionNumber } </span></p>
</p>
Expand Down
4 changes: 2 additions & 2 deletions app/js/components/quickview/reviews/EditReview.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
var React = require('react');
var { classSet } = React.addons;
var Reflux = require('reflux');
var SystemHighMessage = require('../../shared/SystemHighMessage.jsx');
var ReviewWarningMessage = require('../../shared/ReviewWarningMessage.jsx');
var _ = require('../../../utils/_');
var IconRating = require('../../shared/IconRating.jsx');
var PopoverConfirmationButton = require('./../../shared/PopoverConfirmationButton.jsx');
Expand Down Expand Up @@ -122,7 +122,7 @@ var EditReview = React.createClass({
</div>
<div className={hasError}>
<h6>Description</h6>
<SystemHighMessage />
<ReviewWarningMessage />
{isEditingRateAllowed &&
<textarea ref="text" value={ text } onChange={ this.onTextChange }></textarea>
}
Expand Down
4 changes: 2 additions & 2 deletions app/js/components/quickview/reviews/SubmitReview.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

var React = require('react');
var { classSet } = React.addons;
var SystemHighMessage = require('../../shared/SystemHighMessage.jsx');
var ReviewWarningMessage = require('../../shared/ReviewWarningMessage.jsx');
var _ = require('../../../utils/_');
var IconRating = require('../../shared/IconRating.jsx');
var ListingActions = require('../../../actions/ListingActions');
Expand Down Expand Up @@ -71,7 +71,7 @@ var ReviewListing = React.createClass({
</div>
<div className={hasError}>
<h6>Description</h6>
<SystemHighMessage />
<ReviewWarningMessage />
<textarea ref="text" value={ text } onChange={ this.onTextChange }></textarea>
<p className="help-block small">Must have more than {limit} characters</p>
</div>
Expand Down
16 changes: 16 additions & 0 deletions app/js/components/shared/ReviewWarningMessage.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
'use strict';

var React = require('react');
var { reviewWarningMessage } = require('ozp-react-commons/constants/messages');

var ReviewWarningMessage = React.createClass({

render: function () {
return (
<p className="alert alert-warning">{reviewWarningMessage}</p>
);
}

});

module.exports = ReviewWarningMessage;
16 changes: 0 additions & 16 deletions app/js/components/shared/SystemHighMessage.jsx

This file was deleted.

81 changes: 46 additions & 35 deletions app/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ var SelfStore = require('ozp-react-commons/stores/SelfStore');
var ProfileActions = require('ozp-react-commons/actions/ProfileActions');
var LoadError = require('ozp-react-commons/components/LoadError.jsx');
var {
METRICS_URL,
API_URL,
APP_TITLE,
IE_REDIRECT_URL
IE_REDIRECT_URL,
SYSTEM_HIGH_CLASSIFICATION
} = require('ozp-react-commons/OzoneConfig');


Expand All @@ -35,11 +36,44 @@ require('script!bootstrap-classify');
window.moment = require('moment');
window.Tether = require('tether');

var getCookie = function(cookieName) {
var cookieValue = null;

if (document.cookie && document.cookie !== '') {
var cookies = document.cookie.split(';');

$.each(cookies, function(index, cookie) {
var cookie = $.trim(cookie);

// Does this cookie string begin with the cookieName we want?
if (cookie.substring(0, cookieName.length + 1) === (cookieName + '=')) {
cookieValue = decodeURIComponent(cookie.substring(cookieName.length + 1));

// Returning false breaks out of $.each
return false;
}
});
}

return cookieValue;
};

// Enable withCredentials for all requests
$.ajaxPrefilter(function (options) {
$.ajaxPrefilter(function (options, originalOptions, jqXHR) {
options.xhrFields = {
withCredentials: true
};

var requestType = options['type'].toLowerCase();
if (requestType === 'post' || requestType === 'delete') {
jqXHR.setRequestHeader('X-CSRFToken', getCookie('csrftoken'));
}
});

$(document).ajaxError(function (event, jqxhr, settings, thrownError ) {
if (settings.url.indexOf('/api/') >= 0 && thrownError === 'FORBIDDEN') {
window.location = API_URL + '/accounts/login/';
}
});

var Routes = require('./components/Routes.jsx'),
Expand All @@ -50,6 +84,15 @@ var Routes = require('./components/Routes.jsx'),
* Render everything when we get our profile
*/
SelfStore.listen(_.once(function(profileData) {

// Classification needs to run after the profileData is loaded
$(function() {
$(document).classification({
level: SYSTEM_HIGH_CLASSIFICATION,
colorBanners: true
});
});

Router.run(routes, function (Handler) {
var main = document.getElementById('main'),
component;
Expand All @@ -67,38 +110,6 @@ SelfStore.listen(_.once(function(profileData) {

ProfileActions.fetchSelf();

(function initPiwik() {
var _paq = window._paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);

(function() {
var d = document,
g = d.createElement('script'),
s = d.getElementsByTagName('script')[0],
u = METRICS_URL;

_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', 1]);

g.type='text/javascript';
g.async=true;
g.defer=true;
g.src=u+'piwik.js';
s.parentNode.insertBefore(g,s);
})();

window._paq = _paq;
})();

// Classification
$(function() {
$(document).classification({
level: 'U'
});
});


require('tour');
require('./tour/tour.js');

Expand Down
Loading