Skip to content
Snippets Groups Projects
Commit 169c89d8 authored by Allen Gilliland's avatar Allen Gilliland
Browse files

Merge branch 'master' into pin-icon

parents 15638f51 712a64ad
No related branches found
No related tags found
No related merge requests found
Showing
with 7 additions and 227 deletions
......@@ -18,6 +18,7 @@
(catch-api-exceptions 0)
(check 1)
(checkp 1)
(cond-let 0)
(conda 0)
(context 2)
(create-database-definition 1)
......
.transition-color {
transition: color .3s linear;
}
/*global google*/
window.google = window.google || {};
google.maps = google.maps || {};
(function() {
function getScript(src) {
document.write('<' + 'script src="' + src + '" type="text/javascript"></script>'); // jshint ignore:line
}
var modules = google.maps.modules = {};
google.maps.__gjsload__ = function(name, text) {
modules[name] = text;
};
google.maps.Load = function(apiLoad) {
delete google.maps.Load;
apiLoad([0.009999999776482582, [
[
["https://mts0.googleapis.com/vt?lyrs=m@267000000\u0026src=api\u0026hl=en-US\u0026", "https://mts1.googleapis.com/vt?lyrs=m@267000000\u0026src=api\u0026hl=en-US\u0026"], null, null, null, null, "m@267000000", ["https://mts0.google.com/vt?lyrs=m@267000000\u0026src=api\u0026hl=en-US\u0026", "https://mts1.google.com/vt?lyrs=m@267000000\u0026src=api\u0026hl=en-US\u0026"]
],
[
["https://khms0.googleapis.com/kh?v=152\u0026hl=en-US\u0026", "https://khms1.googleapis.com/kh?v=152\u0026hl=en-US\u0026"], null, null, null, 1, "152", ["https://khms0.google.com/kh?v=152\u0026hl=en-US\u0026", "https://khms1.google.com/kh?v=152\u0026hl=en-US\u0026"]
],
[
["https://mts0.googleapis.com/vt?lyrs=h@267000000\u0026src=api\u0026hl=en-US\u0026", "https://mts1.googleapis.com/vt?lyrs=h@267000000\u0026src=api\u0026hl=en-US\u0026"], null, null, null, null, "h@267000000", ["https://mts0.google.com/vt?lyrs=h@267000000\u0026src=api\u0026hl=en-US\u0026", "https://mts1.google.com/vt?lyrs=h@267000000\u0026src=api\u0026hl=en-US\u0026"]
],
[
["https://mts0.googleapis.com/vt?lyrs=t@132,r@267000000\u0026src=api\u0026hl=en-US\u0026", "https://mts1.googleapis.com/vt?lyrs=t@132,r@267000000\u0026src=api\u0026hl=en-US\u0026"], null, null, null, null, "t@132,r@267000000", ["https://mts0.google.com/vt?lyrs=t@132,r@267000000\u0026src=api\u0026hl=en-US\u0026", "https://mts1.google.com/vt?lyrs=t@132,r@267000000\u0026src=api\u0026hl=en-US\u0026"]
], null, null, [
["https://cbks0.googleapis.com/cbk?", "https://cbks1.googleapis.com/cbk?"]
],
[
["https://khms0.googleapis.com/kh?v=84\u0026hl=en-US\u0026", "https://khms1.googleapis.com/kh?v=84\u0026hl=en-US\u0026"], null, null, null, null, "84", ["https://khms0.google.com/kh?v=84\u0026hl=en-US\u0026", "https://khms1.google.com/kh?v=84\u0026hl=en-US\u0026"]
],
[
["https://mts0.googleapis.com/mapslt?hl=en-US\u0026", "https://mts1.googleapis.com/mapslt?hl=en-US\u0026"]
],
[
["https://mts0.googleapis.com/mapslt/ft?hl=en-US\u0026", "https://mts1.googleapis.com/mapslt/ft?hl=en-US\u0026"]
],
[
["https://mts0.googleapis.com/vt?hl=en-US\u0026", "https://mts1.googleapis.com/vt?hl=en-US\u0026"]
],
[
["https://mts0.googleapis.com/mapslt/loom?hl=en-US\u0026", "https://mts1.googleapis.com/mapslt/loom?hl=en-US\u0026"]
],
[
["https://mts0.googleapis.com/mapslt?hl=en-US\u0026", "https://mts1.googleapis.com/mapslt?hl=en-US\u0026"]
],
[
["https://mts0.googleapis.com/mapslt/ft?hl=en-US\u0026", "https://mts1.googleapis.com/mapslt/ft?hl=en-US\u0026"]
],
[
["https://mts0.googleapis.com/mapslt/loom?hl=en-US\u0026", "https://mts1.googleapis.com/mapslt/loom?hl=en-US\u0026"]
]
],
["en-US", "US", null, 0, null, null, "https://maps.gstatic.com/mapfiles/", "https://csi.gstatic.com", "https://maps.googleapis.com", "https://maps.googleapis.com"],
["https://maps.gstatic.com/intl/en_us/mapfiles/api-3/17/7", "3.17.7"],
[487737768], 1, null, null, null, null, null, "", ["visualization"], null, 1, "https://khms.googleapis.com/mz?v=152\u0026", null, "https://earthbuilder.googleapis.com", "https://earthbuilder.googleapis.com", null, "https://mts.googleapis.com/vt/icon", [
["https://mts0.googleapis.com/vt", "https://mts1.googleapis.com/vt"],
["https://mts0.googleapis.com/vt", "https://mts1.googleapis.com/vt"],
[null, [
[0, "m", 267000000]
],
[null, "en-US", "US", null, 18, null, null, null, null, null, null, [
[47],
[37, [
["smartmaps"]
]]
]], 0
],
[null, [
[0, "m", 267000000]
],
[null, "en-US", "US", null, 18, null, null, null, null, null, null, [
[47],
[37, [
["smartmaps"]
]]
]], 3
],
[null, [
[0, "m", 267000000]
],
[null, "en-US", "US", null, 18, null, null, null, null, null, null, [
[50],
[37, [
["smartmaps"]
]]
]], 0
],
[null, [
[0, "m", 267000000]
],
[null, "en-US", "US", null, 18, null, null, null, null, null, null, [
[50],
[37, [
["smartmaps"]
]]
]], 3
],
[null, [
[4, "t", 132],
[0, "r", 132000000]
],
[null, "en-US", "US", null, 18, null, null, null, null, null, null, [
[5],
[37, [
["smartmaps"]
]]
]], 0
],
[null, [
[4, "t", 132],
[0, "r", 132000000]
],
[null, "en-US", "US", null, 18, null, null, null, null, null, null, [
[5],
[37, [
["smartmaps"]
]]
]], 3
],
[null, null, [null, "en-US", "US", null, 18], 0],
[null, null, [null, "en-US", "US", null, 18], 3],
[null, null, [null, "en-US", "US", null, 18], 6],
[null, null, [null, "en-US", "US", null, 18], 0],
["https://mts0.google.com/vt", "https://mts1.google.com/vt"], "/maps/vt"
], 2, 500, ["https://geo0.ggpht.com/cbk?cb_client=maps_sv.uv_api_demo", "https://www.gstatic.com/landmark/tour", "https://www.gstatic.com/landmark/config", "/maps/preview/reveal?authuser=0", "/maps/preview/log204", "/gen204?tbm=map", "https://static.panoramio.com.storage.googleapis.com/photos/"],
["https://www.google.com/maps/api/js/widget", "https://www.google.com/maps/api/js/slave_widget"]
], loadScriptTime);
};
var loadScriptTime = (new Date()).getTime();
getScript("https://maps.gstatic.com/cat_js/intl/en_us/mapfiles/api-3/17/7/%7Bmain,visualization%7D.js");
})();
import AddToDashboardPopover from './AddToDashboardPopover.react';
import Icon from "metabase/components/Icon.react";
import Popover from "metabase/components/Popover.react";
export default React.createClass({
displayName: 'AddToDashboard',
propTypes: {
card: React.PropTypes.object.isRequired,
dashboardApi: React.PropTypes.func.isRequired
},
getInitialState: function () {
return {
isOpen: false
};
},
toggle: function () {
var isOpen = !this.state.isOpen;
this.setState({
isOpen: isOpen
});
},
addToDash: function () {
if(this.state.isOpen) {
var tetherOptions = {
attachment: 'top right',
targetAttachment: 'bottom right',
targetOffset: '14px 0'
};
return (
<Popover
tetherOptions={tetherOptions}
className="PopoverBody PopoverBody--withArrow AddToDashboard"
>
<AddToDashboardPopover
card={this.props.card}
dashboardApi={this.props.dashboardApi}
broadcastEventFn={this.props.broadcastEventFn}
closePopoverFn={this.toggle}
/>
</Popover>
);
}
},
render: function () {
// TODO: if our card is dirty should we disable this button?
// ex: someone modifies a query but hasn't run/save the change?
return (
<span>
<a className="mx1 text-grey-4 text-brand-hover" href="#" title="Add this to a dashboard" onClick={this.toggle}>
<Icon name='addtodash' width="16px" height="16px"/>
</a>
{this.addToDash()}
</span>
);
}
});
......@@ -118,6 +118,7 @@ export default React.createClass({
value={_.find(MetabaseCore.field_special_types, (type) => type.id === this.props.field.special_type)}
options={MetabaseCore.field_special_types}
onChange={this.onSpecialTypeChange}
showScrollbars={true}
/>
{targetSelect}
</div>
......
......@@ -39,11 +39,6 @@ export default React.createClass({
this.refs.databasePopover.toggle();
}
}];
var tetherOptions = {
attachment: 'top center',
targetAttachment: 'bottom center',
targetOffset: '10px 0'
};
var triggerElement = (
<span className="text-bold cursor-pointer text-default">
{database.name}
......@@ -53,8 +48,6 @@ export default React.createClass({
return (
<PopoverWithTrigger
ref="databasePopover"
className="PopoverBody PopoverBody--withArrow"
tetherOptions={tetherOptions}
triggerElement={triggerElement}
>
<ColumnarSelector columns={columns}/>
......
......@@ -77,21 +77,18 @@ export default class EditUserForm extends Component {
<form onSubmit={this.formSubmitted.bind(this)} noValidate>
<div className="px4 pb2">
<FormField fieldName="first_name" formError={formError}>
<FormLabel title="First name" fieldName="first_name" formError={formError}></FormLabel>
<FormLabel title="First name" fieldName="first_name" formError={formError} offset={false}></FormLabel>
<input ref="firstName" className="Form-input full" name="name" defaultValue={(user) ? user.first_name : null} placeholder="Johnny" onChange={this.onChange.bind(this)} />
</FormField>
<FormField fieldName="last_name" formError={formError}>
<FormLabel title="Last name" fieldName="last_name" formError={formError}></FormLabel>
<FormLabel title="Last name" fieldName="last_name" formError={formError} offset={false}></FormLabel>
<input ref="lastName" className="Form-input full" name="name" defaultValue={(user) ? user.last_name : null} placeholder="Appleseed" required onChange={this.onChange.bind(this)} />
</FormField>
<FormField fieldName="email" formError={formError}>
<FormLabel title="Email address" fieldName="email" formError={formError}></FormLabel>
<FormLabel title="Email address" fieldName="email" formError={formError} offset={false}></FormLabel>
<input ref="email" className="Form-input full" name="email" defaultValue={(user) ? user.email : null} placeholder="youlooknicetoday@email.com" required onChange={this.onChange.bind(this)} />
</FormField>
</div>
......
......@@ -37,17 +37,9 @@ export default class UserActionsSelect extends Component {
render() {
let { user } = this.props;
const tetherOptions = {
attachment: 'top right',
targetAttachment: 'bottom right',
targetOffset: '5px 0',
constraints: [{ to: 'window', attachment: 'together', pin: ['top', 'bottom']}]
};
return (
<PopoverWithTrigger ref="popover"
className={"PopoverBody PopoverBody--withArrow block"}
tetherOptions={tetherOptions}
className="block"
triggerElement={<span className="text-grey-1"><Icon name={'ellipsis'}></Icon></span>}>
<ul className="UserActionsSelect">
<li className="py1 px2 bg-brand-hover text-white-hover cursor-pointer" onClick={this.onEditDetails.bind(this)}>Edit Details</li>
......
......@@ -45,17 +45,9 @@ export default class UserRoleSelect extends Component {
}
];
const tetherOptions = {
attachment: 'top center',
targetAttachment: 'bottom center',
targetOffset: '5px 0',
constraints: [{ to: 'window', attachment: 'together', pin: ['top', 'bottom']}]
};
return (
<PopoverWithTrigger ref="popover"
className={"PopoverBody PopoverBody--withArrow UserRolePopover block"}
tetherOptions={tetherOptions}
className="UserRolePopover block"
triggerElement={triggerElement}
triggerClasses={cx("AdminSelectBorderless", "py1", {"text-purple": user.is_superuser, "text-brand": !user.is_superuser})}>
<ColumnarSelector columns={columns}/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment