зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1040662: Upgrade Loop's use of React to version 0.11.1. r=Standard8
--HG-- rename : browser/components/loop/content/shared/libs/react-0.10.0.js => browser/components/loop/content/shared/libs/react-0.11.1.js
This commit is contained in:
Родитель
cc40166c9e
Коммит
d5248a1cd9
|
@ -26,7 +26,7 @@
|
||||||
window.OTProperties.cssURL = window.OTProperties.assetURL + 'css/ot.css';
|
window.OTProperties.cssURL = window.OTProperties.assetURL + 'css/ot.css';
|
||||||
</script>
|
</script>
|
||||||
<script type="text/javascript" src="loop/libs/sdk.js"></script>
|
<script type="text/javascript" src="loop/libs/sdk.js"></script>
|
||||||
<script type="text/javascript" src="loop/shared/libs/react-0.10.0.js"></script>
|
<script type="text/javascript" src="loop/shared/libs/react-0.11.1.js"></script>
|
||||||
<script type="text/javascript" src="loop/shared/libs/jquery-2.1.0.js"></script>
|
<script type="text/javascript" src="loop/shared/libs/jquery-2.1.0.js"></script>
|
||||||
<script type="text/javascript" src="loop/shared/libs/lodash-2.4.1.js"></script>
|
<script type="text/javascript" src="loop/shared/libs/lodash-2.4.1.js"></script>
|
||||||
<script type="text/javascript" src="loop/shared/libs/backbone-1.1.2.js"></script>
|
<script type="text/javascript" src="loop/shared/libs/backbone-1.1.2.js"></script>
|
||||||
|
|
|
@ -86,27 +86,27 @@ loop.conversation = (function(OT, mozL10n) {
|
||||||
"visually-hidden": !this.state.showDeclineMenu
|
"visually-hidden": !this.state.showDeclineMenu
|
||||||
});
|
});
|
||||||
return (
|
return (
|
||||||
React.DOM.div( {className:conversationPanelClass},
|
React.DOM.div({className: conversationPanelClass},
|
||||||
React.DOM.h2(null, __("incoming_call")),
|
React.DOM.h2(null, __("incoming_call")),
|
||||||
React.DOM.div( {className:"button-group incoming-call-action-group"},
|
React.DOM.div({className: "button-group incoming-call-action-group"},
|
||||||
React.DOM.div( {className:"button-chevron-menu-group"},
|
React.DOM.div({className: "button-chevron-menu-group"},
|
||||||
React.DOM.div( {className:"button-group-chevron"},
|
React.DOM.div({className: "button-group-chevron"},
|
||||||
React.DOM.div( {className:"button-group"},
|
React.DOM.div({className: "button-group"},
|
||||||
React.DOM.button( {className:btnClassDecline, onClick:this._handleDecline},
|
React.DOM.button({className: btnClassDecline, onClick: this._handleDecline},
|
||||||
__("incoming_call_decline_button")
|
__("incoming_call_decline_button")
|
||||||
),
|
),
|
||||||
React.DOM.div( {className:"btn-chevron",
|
React.DOM.div({className: "btn-chevron",
|
||||||
onClick:this._toggleDeclineMenu}
|
onClick: this._toggleDeclineMenu}
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
React.DOM.ul( {className:declineDropdownMenuClasses},
|
React.DOM.ul({className: declineDropdownMenuClasses},
|
||||||
React.DOM.li( {className:"btn-block", onClick:this._handleDeclineBlock},
|
React.DOM.li({className: "btn-block", onClick: this._handleDeclineBlock},
|
||||||
__("incoming_call_decline_and_block_button")
|
__("incoming_call_decline_and_block_button")
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
React.DOM.button( {className:btnClassAccept, onClick:this._handleAccept},
|
React.DOM.button({className: btnClassAccept, onClick: this._handleAccept},
|
||||||
__("incoming_call_answer_button")
|
__("incoming_call_answer_button")
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
|
@ -77,22 +77,22 @@ loop.panel = (function(_, mozL10n) {
|
||||||
__("display_name_available_status");
|
__("display_name_available_status");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
React.DOM.div( {className:"footer component-spacer"},
|
React.DOM.div({className: "footer component-spacer"},
|
||||||
React.DOM.div( {className:"do-not-disturb"},
|
React.DOM.div({className: "do-not-disturb"},
|
||||||
React.DOM.p( {className:"dnd-status", onClick:this.showDropdownMenu},
|
React.DOM.p({className: "dnd-status", onClick: this.showDropdownMenu},
|
||||||
React.DOM.span(null, availabilityText),
|
React.DOM.span(null, availabilityText),
|
||||||
React.DOM.i( {className:availabilityStatus})
|
React.DOM.i({className: availabilityStatus})
|
||||||
),
|
),
|
||||||
React.DOM.ul( {className:availabilityDropdown,
|
React.DOM.ul({className: availabilityDropdown,
|
||||||
onMouseLeave:this.hideDropdownMenu},
|
onMouseLeave: this.hideDropdownMenu},
|
||||||
React.DOM.li( {onClick:this.changeAvailability("available"),
|
React.DOM.li({onClick: this.changeAvailability("available"),
|
||||||
className:"dnd-menu-item dnd-make-available"},
|
className: "dnd-menu-item dnd-make-available"},
|
||||||
React.DOM.i( {className:"status status-available"}),
|
React.DOM.i({className: "status status-available"}),
|
||||||
React.DOM.span(null, __("display_name_available_status"))
|
React.DOM.span(null, __("display_name_available_status"))
|
||||||
),
|
),
|
||||||
React.DOM.li( {onClick:this.changeAvailability("do-not-disturb"),
|
React.DOM.li({onClick: this.changeAvailability("do-not-disturb"),
|
||||||
className:"dnd-menu-item dnd-make-unavailable"},
|
className: "dnd-menu-item dnd-make-unavailable"},
|
||||||
React.DOM.i( {className:"status status-dnd"}),
|
React.DOM.i({className: "status status-dnd"}),
|
||||||
React.DOM.span(null, __("display_name_dnd_status"))
|
React.DOM.span(null, __("display_name_dnd_status"))
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -113,21 +113,21 @@ loop.panel = (function(_, mozL10n) {
|
||||||
var privacy_notice_url = navigator.mozLoop.getLoopCharPref('legal.privacy_url');
|
var privacy_notice_url = navigator.mozLoop.getLoopCharPref('legal.privacy_url');
|
||||||
var tosHTML = __("legal_text_and_links2", {
|
var tosHTML = __("legal_text_and_links2", {
|
||||||
"terms_of_use": React.renderComponentToStaticMarkup(
|
"terms_of_use": React.renderComponentToStaticMarkup(
|
||||||
React.DOM.a( {href:terms_of_use_url, target:"_blank"},
|
React.DOM.a({href: terms_of_use_url, target: "_blank"},
|
||||||
__("legal_text_tos")
|
__("legal_text_tos")
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
"privacy_notice": React.renderComponentToStaticMarkup(
|
"privacy_notice": React.renderComponentToStaticMarkup(
|
||||||
React.DOM.a( {href:privacy_notice_url, target:"_blank"},
|
React.DOM.a({href: privacy_notice_url, target: "_blank"},
|
||||||
__("legal_text_privacy")
|
__("legal_text_privacy")
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
});
|
});
|
||||||
navigator.mozLoop.setLoopCharPref('seenToS', 'seen');
|
navigator.mozLoop.setLoopCharPref('seenToS', 'seen');
|
||||||
return React.DOM.p( {className:"terms-service",
|
return React.DOM.p({className: "terms-service",
|
||||||
dangerouslySetInnerHTML:{__html: tosHTML}});
|
dangerouslySetInnerHTML: {__html: tosHTML}});
|
||||||
} else {
|
} else {
|
||||||
return React.DOM.div(null );
|
return React.DOM.div(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -139,11 +139,11 @@ loop.panel = (function(_, mozL10n) {
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
return (
|
return (
|
||||||
React.DOM.div( {className:"component-spacer share generate-url"},
|
React.DOM.div({className: "component-spacer share generate-url"},
|
||||||
React.DOM.div( {className:"description"},
|
React.DOM.div({className: "description"},
|
||||||
React.DOM.p( {className:"description-content"}, this.props.summary)
|
React.DOM.p({className: "description-content"}, this.props.summary)
|
||||||
),
|
),
|
||||||
React.DOM.div( {className:"action"},
|
React.DOM.div({className: "action"},
|
||||||
this.props.children
|
this.props.children
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -210,10 +210,10 @@ loop.panel = (function(_, mozL10n) {
|
||||||
// from the react lib.
|
// from the react lib.
|
||||||
var cx = React.addons.classSet;
|
var cx = React.addons.classSet;
|
||||||
return (
|
return (
|
||||||
PanelLayout( {summary:__("share_link_header_text")},
|
PanelLayout({summary: __("share_link_header_text")},
|
||||||
React.DOM.div( {className:"invite"},
|
React.DOM.div({className: "invite"},
|
||||||
React.DOM.input( {type:"url", value:this.state.callUrl, readOnly:"true",
|
React.DOM.input({type: "url", value: this.state.callUrl, readOnly: "true",
|
||||||
className:cx({'pending': this.state.pending})} )
|
className: cx({'pending': this.state.pending})})
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -232,10 +232,10 @@ loop.panel = (function(_, mozL10n) {
|
||||||
render: function() {
|
render: function() {
|
||||||
return (
|
return (
|
||||||
React.DOM.div(null,
|
React.DOM.div(null,
|
||||||
CallUrlResult( {client:this.props.client,
|
CallUrlResult({client: this.props.client,
|
||||||
notifier:this.props.notifier} ),
|
notifier: this.props.notifier}),
|
||||||
ToSView(null ),
|
ToSView(null),
|
||||||
AvailabilityDropdown(null )
|
AvailabilityDropdown(null)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -302,8 +302,8 @@ loop.panel = (function(_, mozL10n) {
|
||||||
var client = new loop.Client({
|
var client = new loop.Client({
|
||||||
baseServerUrl: navigator.mozLoop.serverUrl
|
baseServerUrl: navigator.mozLoop.serverUrl
|
||||||
});
|
});
|
||||||
this.loadReactComponent(PanelView( {client:client,
|
this.loadReactComponent(PanelView({client: client,
|
||||||
notifier:this._notifier} ));
|
notifier: this._notifier}));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
<div id="main"></div>
|
<div id="main"></div>
|
||||||
|
|
||||||
<script type="text/javascript" src="loop/shared/libs/react-0.10.0.js"></script>
|
<script type="text/javascript" src="loop/shared/libs/react-0.11.1.js"></script>
|
||||||
<script type="text/javascript" src="loop/libs/l10n.js"></script>
|
<script type="text/javascript" src="loop/libs/l10n.js"></script>
|
||||||
<script type="text/javascript" src="loop/shared/libs/jquery-2.1.0.js"></script>
|
<script type="text/javascript" src="loop/shared/libs/jquery-2.1.0.js"></script>
|
||||||
<script type="text/javascript" src="loop/shared/libs/lodash-2.4.1.js"></script>
|
<script type="text/javascript" src="loop/shared/libs/lodash-2.4.1.js"></script>
|
||||||
|
|
|
@ -140,9 +140,9 @@ loop.shared.views = (function(_, OT, l10n) {
|
||||||
render: function() {
|
render: function() {
|
||||||
return (
|
return (
|
||||||
/* jshint ignore:start */
|
/* jshint ignore:start */
|
||||||
React.DOM.button( {className:this._getClasses(),
|
React.DOM.button({className: this._getClasses(),
|
||||||
title:this._getTitle(),
|
title: this._getTitle(),
|
||||||
onClick:this.handleClick})
|
onClick: this.handleClick})
|
||||||
/* jshint ignore:end */
|
/* jshint ignore:end */
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -181,16 +181,16 @@ loop.shared.views = (function(_, OT, l10n) {
|
||||||
render: function() {
|
render: function() {
|
||||||
/* jshint ignore:start */
|
/* jshint ignore:start */
|
||||||
return (
|
return (
|
||||||
React.DOM.ul( {className:"conversation-toolbar"},
|
React.DOM.ul({className: "conversation-toolbar"},
|
||||||
React.DOM.li(null, React.DOM.button( {className:"btn btn-hangup",
|
React.DOM.li(null, React.DOM.button({className: "btn btn-hangup",
|
||||||
onClick:this.handleClickHangup,
|
onClick: this.handleClickHangup,
|
||||||
title:__("hangup_button_title")})),
|
title: __("hangup_button_title")})),
|
||||||
React.DOM.li(null, MediaControlButton( {action:this.handleToggleVideo,
|
React.DOM.li(null, MediaControlButton({action: this.handleToggleVideo,
|
||||||
enabled:this.props.video.enabled,
|
enabled: this.props.video.enabled,
|
||||||
scope:"local", type:"video"} )),
|
scope: "local", type: "video"})),
|
||||||
React.DOM.li(null, MediaControlButton( {action:this.handleToggleAudio,
|
React.DOM.li(null, MediaControlButton({action: this.handleToggleAudio,
|
||||||
enabled:this.props.audio.enabled,
|
enabled: this.props.audio.enabled,
|
||||||
scope:"local", type:"audio"} ))
|
scope: "local", type: "audio"}))
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
/* jshint ignore:end */
|
/* jshint ignore:end */
|
||||||
|
@ -336,16 +336,16 @@ loop.shared.views = (function(_, OT, l10n) {
|
||||||
render: function() {
|
render: function() {
|
||||||
/* jshint ignore:start */
|
/* jshint ignore:start */
|
||||||
return (
|
return (
|
||||||
React.DOM.div( {className:"conversation"},
|
React.DOM.div({className: "conversation"},
|
||||||
ConversationToolbar( {video:this.state.video,
|
ConversationToolbar({video: this.state.video,
|
||||||
audio:this.state.audio,
|
audio: this.state.audio,
|
||||||
publishStream:this.publishStream,
|
publishStream: this.publishStream,
|
||||||
hangup:this.hangup} ),
|
hangup: this.hangup}),
|
||||||
React.DOM.div( {className:"media nested"},
|
React.DOM.div({className: "media nested"},
|
||||||
React.DOM.div( {className:"video_wrapper remote_wrapper"},
|
React.DOM.div({className: "video_wrapper remote_wrapper"},
|
||||||
React.DOM.div( {className:"video_inner remote"})
|
React.DOM.div({className: "video_inner remote"})
|
||||||
),
|
),
|
||||||
React.DOM.div( {className:"local"})
|
React.DOM.div({className: "local"})
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -367,18 +367,18 @@ loop.shared.views = (function(_, OT, l10n) {
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
var backButton = React.DOM.div(null );
|
var backButton = React.DOM.div(null);
|
||||||
if (this.props.reset) {
|
if (this.props.reset) {
|
||||||
backButton = (
|
backButton = (
|
||||||
React.DOM.button( {className:"back", type:"button", onClick:this.props.reset},
|
React.DOM.button({className: "back", type: "button", onClick: this.props.reset},
|
||||||
"« ",__("feedback_back_button")
|
"« ", __("feedback_back_button")
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
React.DOM.div( {className:"feedback"},
|
React.DOM.div({className: "feedback"},
|
||||||
backButton,
|
backButton,
|
||||||
React.DOM.h3(null, this.props.title),
|
React.DOM.h3(null, this.props.title),
|
||||||
this.props.children
|
this.props.children
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -417,10 +417,10 @@ loop.shared.views = (function(_, OT, l10n) {
|
||||||
var categories = this._getCategories();
|
var categories = this._getCategories();
|
||||||
return Object.keys(categories).map(function(category, key) {
|
return Object.keys(categories).map(function(category, key) {
|
||||||
return (
|
return (
|
||||||
React.DOM.label( {key:key},
|
React.DOM.label({key: key},
|
||||||
React.DOM.input( {type:"radio", ref:"category", name:"category",
|
React.DOM.input({type: "radio", ref: "category", name: "category",
|
||||||
value:category,
|
value: category,
|
||||||
onChange:this.handleCategoryChange} ),
|
onChange: this.handleCategoryChange}),
|
||||||
categories[category]
|
categories[category]
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -462,16 +462,16 @@ loop.shared.views = (function(_, OT, l10n) {
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
return (
|
return (
|
||||||
FeedbackLayout( {title:__("feedback_what_makes_you_sad"),
|
FeedbackLayout({title: __("feedback_what_makes_you_sad"),
|
||||||
reset:this.props.reset},
|
reset: this.props.reset},
|
||||||
React.DOM.form( {onSubmit:this.handleFormSubmit},
|
React.DOM.form({onSubmit: this.handleFormSubmit},
|
||||||
this._getCategoryFields(),
|
this._getCategoryFields(),
|
||||||
React.DOM.p(null, React.DOM.input( {type:"text", ref:"description", name:"description",
|
React.DOM.p(null, React.DOM.input({type: "text", ref: "description", name: "description",
|
||||||
disabled:this.state.category !== "other",
|
disabled: this.state.category !== "other",
|
||||||
onChange:this.handleCustomTextChange,
|
onChange: this.handleCustomTextChange,
|
||||||
value:this.state.description} )),
|
value: this.state.description})),
|
||||||
React.DOM.button( {type:"submit", className:"btn btn-success",
|
React.DOM.button({type: "submit", className: "btn btn-success",
|
||||||
disabled:!this._isFormReady()},
|
disabled: !this._isFormReady()},
|
||||||
__("feedback_submit_button")
|
__("feedback_submit_button")
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -506,8 +506,8 @@ loop.shared.views = (function(_, OT, l10n) {
|
||||||
window.close();
|
window.close();
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
FeedbackLayout( {title:__("feedback_thank_you_heading")},
|
FeedbackLayout({title: __("feedback_thank_you_heading")},
|
||||||
React.DOM.p( {className:"info thank-you"}, __("feedback_window_will_close_in", {
|
React.DOM.p({className: "info thank-you"}, __("feedback_window_will_close_in", {
|
||||||
countdown: this.state.countdown
|
countdown: this.state.countdown
|
||||||
}))
|
}))
|
||||||
)
|
)
|
||||||
|
@ -565,20 +565,20 @@ loop.shared.views = (function(_, OT, l10n) {
|
||||||
render: function() {
|
render: function() {
|
||||||
switch(this.state.step) {
|
switch(this.state.step) {
|
||||||
case "finished":
|
case "finished":
|
||||||
return FeedbackReceived(null );
|
return FeedbackReceived(null);
|
||||||
case "form":
|
case "form":
|
||||||
return FeedbackForm( {feedbackApiClient:this.props.feedbackApiClient,
|
return FeedbackForm({feedbackApiClient: this.props.feedbackApiClient,
|
||||||
sendFeedback:this.sendFeedback,
|
sendFeedback: this.sendFeedback,
|
||||||
reset:this.reset,
|
reset: this.reset,
|
||||||
pending:this.state.pending} );
|
pending: this.state.pending});
|
||||||
default:
|
default:
|
||||||
return (
|
return (
|
||||||
FeedbackLayout( {title:__("feedback_call_experience_heading")},
|
FeedbackLayout({title: __("feedback_call_experience_heading")},
|
||||||
React.DOM.div( {className:"faces"},
|
React.DOM.div({className: "faces"},
|
||||||
React.DOM.button( {className:"face face-happy",
|
React.DOM.button({className: "face face-happy",
|
||||||
onClick:this.handleHappyClick}),
|
onClick: this.handleHappyClick}),
|
||||||
React.DOM.button( {className:"face face-sad",
|
React.DOM.button({className: "face face-sad",
|
||||||
onClick:this.handleSadClick})
|
onClick: this.handleSadClick})
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -48,7 +48,7 @@ browser.jar:
|
||||||
content/browser/loop/shared/js/utils.js (content/shared/js/utils.js)
|
content/browser/loop/shared/js/utils.js (content/shared/js/utils.js)
|
||||||
|
|
||||||
# Shared libs
|
# Shared libs
|
||||||
content/browser/loop/shared/libs/react-0.10.0.js (content/shared/libs/react-0.10.0.js)
|
content/browser/loop/shared/libs/react-0.11.1.js (content/shared/libs/react-0.11.1.js)
|
||||||
content/browser/loop/shared/libs/lodash-2.4.1.js (content/shared/libs/lodash-2.4.1.js)
|
content/browser/loop/shared/libs/lodash-2.4.1.js (content/shared/libs/lodash-2.4.1.js)
|
||||||
content/browser/loop/shared/libs/jquery-2.1.0.js (content/shared/libs/jquery-2.1.0.js)
|
content/browser/loop/shared/libs/jquery-2.1.0.js (content/shared/libs/jquery-2.1.0.js)
|
||||||
content/browser/loop/shared/libs/backbone-1.1.2.js (content/shared/libs/backbone-1.1.2.js)
|
content/browser/loop/shared/libs/backbone-1.1.2.js (content/shared/libs/backbone-1.1.2.js)
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
</script>
|
</script>
|
||||||
<script type="text/javascript" src="shared/libs/sdk.js"></script>
|
<script type="text/javascript" src="shared/libs/sdk.js"></script>
|
||||||
<script type="text/javascript" src="libs/webl10n-20130617.js"></script>
|
<script type="text/javascript" src="libs/webl10n-20130617.js"></script>
|
||||||
<script type="text/javascript" src="shared/libs/react-0.10.0.js"></script>
|
<script type="text/javascript" src="shared/libs/react-0.11.1.js"></script>
|
||||||
<script type="text/javascript" src="shared/libs/jquery-2.1.0.js"></script>
|
<script type="text/javascript" src="shared/libs/jquery-2.1.0.js"></script>
|
||||||
<script type="text/javascript" src="shared/libs/lodash-2.4.1.js"></script>
|
<script type="text/javascript" src="shared/libs/lodash-2.4.1.js"></script>
|
||||||
<script type="text/javascript" src="shared/libs/backbone-1.1.2.js"></script>
|
<script type="text/javascript" src="shared/libs/backbone-1.1.2.js"></script>
|
||||||
|
|
|
@ -42,14 +42,14 @@ loop.webapp = (function($, _, OT, webL10n) {
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
if (this.props.helper.isFirefox(navigator.userAgent)) {
|
if (this.props.helper.isFirefox(navigator.userAgent)) {
|
||||||
return React.DOM.div(null );
|
return React.DOM.div(null);
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
React.DOM.div( {className:"promote-firefox"},
|
React.DOM.div({className: "promote-firefox"},
|
||||||
React.DOM.h3(null, __("promote_firefox_hello_heading")),
|
React.DOM.h3(null, __("promote_firefox_hello_heading")),
|
||||||
React.DOM.p(null,
|
React.DOM.p(null,
|
||||||
React.DOM.a( {className:"btn btn-large btn-success",
|
React.DOM.a({className: "btn btn-large btn-success",
|
||||||
href:"https://www.mozilla.org/firefox/"},
|
href: "https://www.mozilla.org/firefox/"},
|
||||||
__("get_firefox_button")
|
__("get_firefox_button")
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -69,13 +69,13 @@ loop.webapp = (function($, _, OT, webL10n) {
|
||||||
render: function() {
|
render: function() {
|
||||||
/* jshint ignore:start */
|
/* jshint ignore:start */
|
||||||
return (
|
return (
|
||||||
React.DOM.div( {className:"expired-url-info"},
|
React.DOM.div({className: "expired-url-info"},
|
||||||
React.DOM.div( {className:"info-panel"},
|
React.DOM.div({className: "info-panel"},
|
||||||
React.DOM.div( {className:"firefox-logo"} ),
|
React.DOM.div({className: "firefox-logo"}),
|
||||||
React.DOM.h1(null, __("call_url_unavailable_notification_heading")),
|
React.DOM.h1(null, __("call_url_unavailable_notification_heading")),
|
||||||
React.DOM.h4(null, __("call_url_unavailable_notification_message"))
|
React.DOM.h4(null, __("call_url_unavailable_notification_message"))
|
||||||
),
|
),
|
||||||
PromoteFirefoxView( {helper:this.props.helper} )
|
PromoteFirefoxView({helper: this.props.helper})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
/* jshint ignore:end */
|
/* jshint ignore:end */
|
||||||
|
@ -100,15 +100,15 @@ loop.webapp = (function($, _, OT, webL10n) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
/* jshint ignore:start */
|
/* jshint ignore:start */
|
||||||
React.DOM.header( {className:"container-box"},
|
React.DOM.header({className: "container-box"},
|
||||||
React.DOM.h1( {className:"light-weight-font"},
|
React.DOM.h1({className: "light-weight-font"},
|
||||||
React.DOM.strong(null, __("brandShortname")), " ", __("clientShortname")
|
React.DOM.strong(null, __("brandShortname")), " ", __("clientShortname")
|
||||||
),
|
),
|
||||||
React.DOM.div( {className:"loop-logo", title:"Firefox WebRTC! logo"}),
|
React.DOM.div({className: "loop-logo", title: "Firefox WebRTC! logo"}),
|
||||||
React.DOM.h3( {className:"call-url"},
|
React.DOM.h3({className: "call-url"},
|
||||||
conversationUrl
|
conversationUrl
|
||||||
),
|
),
|
||||||
React.DOM.h4( {className:urlCreationDateClasses} ,
|
React.DOM.h4({className: urlCreationDateClasses},
|
||||||
callUrlCreationDateString
|
callUrlCreationDateString
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -120,8 +120,8 @@ loop.webapp = (function($, _, OT, webL10n) {
|
||||||
var ConversationFooter = React.createClass({displayName: 'ConversationFooter',
|
var ConversationFooter = React.createClass({displayName: 'ConversationFooter',
|
||||||
render: function() {
|
render: function() {
|
||||||
return (
|
return (
|
||||||
React.DOM.div( {className:"footer container-box"},
|
React.DOM.div({className: "footer container-box"},
|
||||||
React.DOM.div( {title:"Mozilla Logo", className:"footer-logo"})
|
React.DOM.div({title: "Mozilla Logo", className: "footer-logo"})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -217,34 +217,34 @@ loop.webapp = (function($, _, OT, webL10n) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
/* jshint ignore:start */
|
/* jshint ignore:start */
|
||||||
React.DOM.div( {className:"container"},
|
React.DOM.div({className: "container"},
|
||||||
React.DOM.div( {className:"container-box"},
|
React.DOM.div({className: "container-box"},
|
||||||
|
|
||||||
ConversationHeader(
|
ConversationHeader({
|
||||||
{urlCreationDateString:this.state.urlCreationDateString} ),
|
urlCreationDateString: this.state.urlCreationDateString}),
|
||||||
|
|
||||||
React.DOM.p( {className:"large-font light-weight-font"},
|
React.DOM.p({className: "large-font light-weight-font"},
|
||||||
__("initiate_call_button_label")
|
__("initiate_call_button_label")
|
||||||
),
|
),
|
||||||
|
|
||||||
React.DOM.div( {id:"messages"}),
|
React.DOM.div({id: "messages"}),
|
||||||
|
|
||||||
React.DOM.div( {className:"button-group"},
|
React.DOM.div({className: "button-group"},
|
||||||
React.DOM.div( {className:"flex-padding-1"}),
|
React.DOM.div({className: "flex-padding-1"}),
|
||||||
React.DOM.button( {ref:"submitButton", onClick:this._initiate,
|
React.DOM.button({ref: "submitButton", onClick: this._initiate,
|
||||||
className:callButtonClasses,
|
className: callButtonClasses,
|
||||||
disabled:this.state.disableCallButton},
|
disabled: this.state.disableCallButton},
|
||||||
__("initiate_call_button"),
|
__("initiate_call_button"),
|
||||||
React.DOM.i( {className:"icon icon-video"})
|
React.DOM.i({className: "icon icon-video"})
|
||||||
),
|
),
|
||||||
React.DOM.div( {className:"flex-padding-1"})
|
React.DOM.div({className: "flex-padding-1"})
|
||||||
),
|
),
|
||||||
|
|
||||||
React.DOM.p( {className:"terms-service",
|
React.DOM.p({className: "terms-service",
|
||||||
dangerouslySetInnerHTML:{__html: tosHTML}})
|
dangerouslySetInnerHTML: {__html: tosHTML}})
|
||||||
),
|
),
|
||||||
|
|
||||||
ConversationFooter(null )
|
ConversationFooter(null)
|
||||||
)
|
)
|
||||||
/* jshint ignore:end */
|
/* jshint ignore:end */
|
||||||
);
|
);
|
||||||
|
|
|
@ -159,7 +159,7 @@ describe("loop.conversation", function() {
|
||||||
sinon.assert.calledOnce(router.loadReactComponent);
|
sinon.assert.calledOnce(router.loadReactComponent);
|
||||||
sinon.assert.calledWith(router.loadReactComponent,
|
sinon.assert.calledWith(router.loadReactComponent,
|
||||||
sinon.match(function(value) {
|
sinon.match(function(value) {
|
||||||
return TestUtils.isComponentOfType(value,
|
return TestUtils.isDescriptorOfType(value,
|
||||||
loop.conversation.IncomingCallView);
|
loop.conversation.IncomingCallView);
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
@ -207,7 +207,7 @@ describe("loop.conversation", function() {
|
||||||
sinon.assert.calledOnce(router.loadReactComponent);
|
sinon.assert.calledOnce(router.loadReactComponent);
|
||||||
sinon.assert.calledWith(router.loadReactComponent,
|
sinon.assert.calledWith(router.loadReactComponent,
|
||||||
sinon.match(function(value) {
|
sinon.match(function(value) {
|
||||||
return TestUtils.isComponentOfType(value,
|
return TestUtils.isDescriptorOfType(value,
|
||||||
loop.shared.views.ConversationView);
|
loop.shared.views.ConversationView);
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
@ -273,7 +273,7 @@ describe("loop.conversation", function() {
|
||||||
sinon.assert.calledOnce(router.loadReactComponent);
|
sinon.assert.calledOnce(router.loadReactComponent);
|
||||||
sinon.assert.calledWith(router.loadReactComponent,
|
sinon.assert.calledWith(router.loadReactComponent,
|
||||||
sinon.match(function(value) {
|
sinon.match(function(value) {
|
||||||
return TestUtils.isComponentOfType(value,
|
return TestUtils.isDescriptorOfType(value,
|
||||||
loop.shared.views.FeedbackView);
|
loop.shared.views.FeedbackView);
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<div id="fixtures"></div>
|
<div id="fixtures"></div>
|
||||||
<!-- libs -->
|
<!-- libs -->
|
||||||
<script src="../../content/libs/l10n.js"></script>
|
<script src="../../content/libs/l10n.js"></script>
|
||||||
<script src="../../content/shared/libs/react-0.10.0.js"></script>
|
<script src="../../content/shared/libs/react-0.11.1.js"></script>
|
||||||
<script src="../../content/shared/libs/jquery-2.1.0.js"></script>
|
<script src="../../content/shared/libs/jquery-2.1.0.js"></script>
|
||||||
<script src="../../content/shared/libs/lodash-2.4.1.js"></script>
|
<script src="../../content/shared/libs/lodash-2.4.1.js"></script>
|
||||||
<script src="../../content/shared/libs/backbone-1.1.2.js"></script>
|
<script src="../../content/shared/libs/backbone-1.1.2.js"></script>
|
||||||
|
|
|
@ -110,7 +110,7 @@ describe("loop.panel", function() {
|
||||||
sinon.assert.calledOnce(router.loadReactComponent);
|
sinon.assert.calledOnce(router.loadReactComponent);
|
||||||
sinon.assert.calledWithExactly(router.loadReactComponent,
|
sinon.assert.calledWithExactly(router.loadReactComponent,
|
||||||
sinon.match(function(value) {
|
sinon.match(function(value) {
|
||||||
return React.addons.TestUtils.isComponentOfType(
|
return React.addons.TestUtils.isDescriptorOfType(
|
||||||
value, loop.panel.PanelView);
|
value, loop.panel.PanelView);
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<div id="fixtures"></div>
|
<div id="fixtures"></div>
|
||||||
|
|
||||||
<!-- libs -->
|
<!-- libs -->
|
||||||
<script src="../../content/shared/libs/react-0.10.0.js"></script>
|
<script src="../../content/shared/libs/react-0.11.1.js"></script>
|
||||||
<script src="../../content/shared/libs/jquery-2.1.0.js"></script>
|
<script src="../../content/shared/libs/jquery-2.1.0.js"></script>
|
||||||
<script src="../../content/shared/libs/lodash-2.4.1.js"></script>
|
<script src="../../content/shared/libs/lodash-2.4.1.js"></script>
|
||||||
<script src="../../content/shared/libs/backbone-1.1.2.js"></script>
|
<script src="../../content/shared/libs/backbone-1.1.2.js"></script>
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<div id="messages"></div>
|
<div id="messages"></div>
|
||||||
<div id="fixtures"></div>
|
<div id="fixtures"></div>
|
||||||
<!-- libs -->
|
<!-- libs -->
|
||||||
<script src="../../content/shared/libs/react-0.10.0.js"></script>
|
<script src="../../content/shared/libs/react-0.11.1.js"></script>
|
||||||
<script src="../../content/shared/libs/jquery-2.1.0.js"></script>
|
<script src="../../content/shared/libs/jquery-2.1.0.js"></script>
|
||||||
<script src="../../content/shared/libs/lodash-2.4.1.js"></script>
|
<script src="../../content/shared/libs/lodash-2.4.1.js"></script>
|
||||||
<script src="../../content/shared/libs/backbone-1.1.2.js"></script>
|
<script src="../../content/shared/libs/backbone-1.1.2.js"></script>
|
||||||
|
|
|
@ -149,7 +149,7 @@ describe("loop.webapp", function() {
|
||||||
sinon.assert.calledOnce(router.loadReactComponent);
|
sinon.assert.calledOnce(router.loadReactComponent);
|
||||||
sinon.assert.calledWith(router.loadReactComponent,
|
sinon.assert.calledWith(router.loadReactComponent,
|
||||||
sinon.match(function(value) {
|
sinon.match(function(value) {
|
||||||
return React.addons.TestUtils.isComponentOfType(
|
return React.addons.TestUtils.isDescriptorOfType(
|
||||||
value, loop.webapp.CallUrlExpiredView);
|
value, loop.webapp.CallUrlExpiredView);
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
@ -168,7 +168,7 @@ describe("loop.webapp", function() {
|
||||||
sinon.assert.calledOnce(router.loadReactComponent);
|
sinon.assert.calledOnce(router.loadReactComponent);
|
||||||
sinon.assert.calledWithExactly(router.loadReactComponent,
|
sinon.assert.calledWithExactly(router.loadReactComponent,
|
||||||
sinon.match(function(value) {
|
sinon.match(function(value) {
|
||||||
return React.addons.TestUtils.isComponentOfType(
|
return React.addons.TestUtils.isDescriptorOfType(
|
||||||
value, loop.webapp.ConversationFormView);
|
value, loop.webapp.ConversationFormView);
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
@ -193,7 +193,7 @@ describe("loop.webapp", function() {
|
||||||
sinon.assert.calledOnce(router.loadReactComponent);
|
sinon.assert.calledOnce(router.loadReactComponent);
|
||||||
sinon.assert.calledWith(router.loadReactComponent,
|
sinon.assert.calledWith(router.loadReactComponent,
|
||||||
sinon.match(function(value) {
|
sinon.match(function(value) {
|
||||||
return React.addons.TestUtils.isComponentOfType(
|
return React.addons.TestUtils.isDescriptorOfType(
|
||||||
value, loop.shared.views.ConversationView);
|
value, loop.shared.views.ConversationView);
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
|
|
@ -44,10 +44,10 @@
|
||||||
render: function() {
|
render: function() {
|
||||||
var cx = React.addons.classSet;
|
var cx = React.addons.classSet;
|
||||||
return (
|
return (
|
||||||
React.DOM.div( {className:"example"},
|
React.DOM.div({className: "example"},
|
||||||
React.DOM.h3(null, this.props.summary),
|
React.DOM.h3(null, this.props.summary),
|
||||||
React.DOM.div( {className:cx({comp: true, dashed: this.props.dashed}),
|
React.DOM.div({className: cx({comp: true, dashed: this.props.dashed}),
|
||||||
style:this.props.style || {}},
|
style: this.props.style || {}},
|
||||||
this.props.children
|
this.props.children
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -58,8 +58,8 @@
|
||||||
var Section = React.createClass({displayName: 'Section',
|
var Section = React.createClass({displayName: 'Section',
|
||||||
render: function() {
|
render: function() {
|
||||||
return (
|
return (
|
||||||
React.DOM.section( {id:this.props.name},
|
React.DOM.section({id: this.props.name},
|
||||||
React.DOM.h1(null, this.props.name),
|
React.DOM.h1(null, this.props.name),
|
||||||
this.props.children
|
this.props.children
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -69,19 +69,19 @@
|
||||||
var ShowCase = React.createClass({displayName: 'ShowCase',
|
var ShowCase = React.createClass({displayName: 'ShowCase',
|
||||||
render: function() {
|
render: function() {
|
||||||
return (
|
return (
|
||||||
React.DOM.div( {className:"showcase"},
|
React.DOM.div({className: "showcase"},
|
||||||
React.DOM.header(null,
|
React.DOM.header(null,
|
||||||
React.DOM.h1(null, "Loop UI Components Showcase"),
|
React.DOM.h1(null, "Loop UI Components Showcase"),
|
||||||
React.DOM.nav( {className:"menu"},
|
React.DOM.nav({className: "menu"},
|
||||||
React.Children.map(this.props.children, function(section) {
|
React.Children.map(this.props.children, function(section) {
|
||||||
return (
|
return (
|
||||||
React.DOM.a( {className:"btn btn-info", href:"#" + section.props.name},
|
React.DOM.a({className: "btn btn-info", href: "#" + section.props.name},
|
||||||
section.props.name
|
section.props.name
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
this.props.children
|
this.props.children
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -92,58 +92,58 @@
|
||||||
render: function() {
|
render: function() {
|
||||||
return (
|
return (
|
||||||
ShowCase(null,
|
ShowCase(null,
|
||||||
Section( {name:"PanelView"},
|
Section({name: "PanelView"},
|
||||||
Example( {summary:"332px wide", dashed:"true", style:{width: "332px"}},
|
Example({summary: "332px wide", dashed: "true", style: {width: "332px"}},
|
||||||
PanelView(null )
|
PanelView(null)
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
|
||||||
Section( {name:"IncomingCallView"},
|
Section({name: "IncomingCallView"},
|
||||||
Example( {summary:"Default", dashed:"true", style:{width: "280px"}},
|
Example({summary: "Default", dashed: "true", style: {width: "280px"}},
|
||||||
IncomingCallView(null )
|
IncomingCallView(null)
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
|
||||||
Section( {name:"ConversationToolbar"},
|
Section({name: "ConversationToolbar"},
|
||||||
Example( {summary:"Default"},
|
Example({summary: "Default"},
|
||||||
ConversationToolbar( {video:{enabled: true}, audio:{enabled: true}} )
|
ConversationToolbar({video: {enabled: true}, audio: {enabled: true}})
|
||||||
),
|
),
|
||||||
Example( {summary:"Video muted"},
|
Example({summary: "Video muted"},
|
||||||
ConversationToolbar( {video:{enabled: false}, audio:{enabled: true}} )
|
ConversationToolbar({video: {enabled: false}, audio: {enabled: true}})
|
||||||
),
|
),
|
||||||
Example( {summary:"Audio muted"},
|
Example({summary: "Audio muted"},
|
||||||
ConversationToolbar( {video:{enabled: true}, audio:{enabled: false}} )
|
ConversationToolbar({video: {enabled: true}, audio: {enabled: false}})
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
|
||||||
Section( {name:"ConversationView"},
|
Section({name: "ConversationView"},
|
||||||
Example( {summary:"Default"},
|
Example({summary: "Default"},
|
||||||
ConversationView( {video:{enabled: true}, audio:{enabled: true}} )
|
ConversationView({video: {enabled: true}, audio: {enabled: true}})
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
|
||||||
Section( {name:"FeedbackView"},
|
Section({name: "FeedbackView"},
|
||||||
React.DOM.p( {className:"note"},
|
React.DOM.p({className: "note"},
|
||||||
React.DOM.strong(null, "Note:"), " For the useable demo, you can access submitted data at ",
|
React.DOM.strong(null, "Note:"), " For the useable demo, you can access submitted data at ",
|
||||||
React.DOM.a( {href:"https://input.allizom.org/"}, "input.allizom.org"),"."
|
React.DOM.a({href: "https://input.allizom.org/"}, "input.allizom.org"), "."
|
||||||
),
|
),
|
||||||
Example( {summary:"Default (useable demo)", dashed:"true", style:{width: "280px"}},
|
Example({summary: "Default (useable demo)", dashed: "true", style: {width: "280px"}},
|
||||||
FeedbackView( {feedbackApiClient:stageFeedbackApiClient} )
|
FeedbackView({feedbackApiClient: stageFeedbackApiClient})
|
||||||
),
|
),
|
||||||
Example( {summary:"Detailed form", dashed:"true", style:{width: "280px"}},
|
Example({summary: "Detailed form", dashed: "true", style: {width: "280px"}},
|
||||||
FeedbackView( {step:"form"} )
|
FeedbackView({step: "form"})
|
||||||
),
|
),
|
||||||
Example( {summary:"Thank you!", dashed:"true", style:{width: "280px"}},
|
Example({summary: "Thank you!", dashed: "true", style: {width: "280px"}},
|
||||||
FeedbackView( {step:"finished"} )
|
FeedbackView({step: "finished"})
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
|
||||||
Section( {name:"CallUrlExpiredView"},
|
Section({name: "CallUrlExpiredView"},
|
||||||
Example( {summary:"Firefox User"},
|
Example({summary: "Firefox User"},
|
||||||
CallUrlExpiredView( {helper:{isFirefox: returnTrue}} )
|
CallUrlExpiredView({helper: {isFirefox: returnTrue}})
|
||||||
),
|
),
|
||||||
Example( {summary:"Non-Firefox User"},
|
Example({summary: "Non-Firefox User"},
|
||||||
CallUrlExpiredView( {helper:{isFirefox: returnFalse}} )
|
CallUrlExpiredView({helper: {isFirefox: returnFalse}})
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -152,6 +152,6 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
window.addEventListener("DOMContentLoaded", function() {
|
window.addEventListener("DOMContentLoaded", function() {
|
||||||
React.renderComponent(App(null ), document.body);
|
React.renderComponent(App(null), document.body);
|
||||||
});
|
});
|
||||||
})();
|
})();
|
||||||
|
|
Загрузка…
Ссылка в новой задаче