text
stringlengths 7
3.69M
|
|---|
import Amplify, { API, graphqlOperation } from "@aws-amplify/api";
import awsconfig from "./aws-exports";
import { createOrder } from "./graphql/mutations";
import { listProducts } from "./graphql/queries";
Amplify.configure(awsconfig);
async function createNewOrder() {
const order = {
userId: "value1",
order: {
products: {
productId: "df123",
quantity: 30
}
}
};
return await API.graphql(graphqlOperation(createOrder, { input: order }));
}
async function listAllProducts() {
return await API.graphql(graphqlOperation(listProducts));
}
// const MutationButton = document.getElementById("MutationEventButton");
// const MutationResult = document.getElementById("MutationResult");
// MutationButton.addEventListener("click", (evt) => {
// createNewOrder().then((evt) => {
// MutationResult.innerHTML += `<p>${evt.data.createTodo.name} - ${evt.data.createTodo.description}</p>`;
// });
// });
const xprods = listAllProducts()
loadproducts();
// Load products.
function loadproducts() {
const response = JSON.parse(xprods);
const data = response["data"][""]
for (i = 0; i < data.length; i++) {
product_result = data[i]
if (product_result["QtyinStock"] > 0) {
num = product_result["QtyinStock"];
} else {
num = null;
}
productjson = {
"name": product_result["Productname"],
"longname": product_result["Productname"],
"price": product_result["Price"],
"image": "images/"+product_result["productid"]+".png",
"id": product_result["productid"],
"inventory": num
}
InsertProducts(productjson)
}
request.send();
};
function InsertProducts(postdata) {
// Template for products
const template = Handlebars.compile(document.querySelector('#load_products').innerHTML);
title = postdata["name"];
description = postdata["longname"];
price = postdata["price"];
id = postdata["id"];
image = postdata["image"];
inventory = postdata["inventory"];
// Insert products
// Add post result to DOM.
// const product = template({'title': title, "description": description, 'price': price, 'id': id, 'image': image, 'inventory': inventory});
document.querySelector('#QueryResult').innerHTML += title;
};
|
import React from 'react';
export default function LazyComponent(){
return (
<div>I am a lazy component brother</div>
)
}
|
// Ontology Broker
// ## ontology_broker/queueMapper.js
// Maps a Message of a certain type to the queue mapped.
const queueMapper = {
'percp_scope_1.concepts': 'concept',
'percp_scope_1.course': 'course',
'percp_scope_1.media_content': 'content',
'percp_scope_1.user': 'user',
'percp_scope_1.learner_state': 'learner_state',
'percp_scope_1.learning_resources': 'learning_resource',
'percp_scope_1.questions': 'questions',
node_factory: 'node_factory',
relation_factory: 'relation_factory'
};
// Exports the queueMapper Object.
module.exports = queueMapper;
|
//singleDirectoryView
var bpapp = bpapp || {};
bpapp.singleDirectoryView = Backbone.View.extend({
tagName: "article",
className: "dir",
events: {
"click": "toggle",
"focusin": "showStatus"
},
template: _.template( $("#directoryElement").html() ),
initialize: function(options) {
this.filter = options.filter;
this.listenTo(this.filter, 'change', this.render);
},
render: function() {
console.log(this.model.id, this.filter);
if (this.$el.html() == '') {
var directoryTemplate = this.template(this.model.toJSON());
this.$el.html(directoryTemplate);
this.$el.css("margin-left", this.model.get("level") * 10);
}
var dirName = this.model.get('name');
// orphaned clip dirs .. also frame dirs
if((dirName.charAt(dirName.length-4)=='.' || dirName.substr(-5)=='.mpeg') && !this.model.get('fid')) {
this.$el.css('color', 'blue');
}
this.$el.show();
if(!this.filter.get('showFrames') && (dirName == 'thumbs' || dirName == 'frames')) {
this.$el.hide();
}
if(!this.filter.get('showOldSubs') && (dirName == 'star' || dirName == 'img' || dirName == 'dry' ||
dirName == 'les' || dirName == 'quiet' || dirName == 'misc' || dirName == 'clad' ||
dirName == 'toon' || dirName == 'dup' || dirName == 'part' || dirName == 'play' || dirName == 'err')) {
this.$el.hide();
}
var found = this.filter.get('found');
var id = Number(this.model.id);
if(found && !found.dirs.includes(id) && !found.parents.includes(id)) {
console.log(id, found, found.dirs.includes(id), found.parents.includes(id));
this.$el.hide();
}
return this;
},
toggle: function(e) {
//console.log("dir toggle");
e.stopPropagation();
var view = this;
if(!this.model.get("subdirs")){
this.model.fetch({ success: function(model, res){
var subdirColl = new bpapp.DirectoriesCollection(res.subdirs, { level: model.get("level") + 1 });
model.set("subdirs", subdirColl);
var directoriesView = new bpapp.allDirectoriesView({ collection: subdirColl, filter: this.filter });
var filesColl = new bpapp.FilesCollection(res.files, { level: model.get("level") + 1 });
model.set("files", filesColl);
var filesView = new bpapp.allFilesView({ collection: filesColl, filter: this.filter });
view.$el.append(directoriesView.render().$el);
view.$el.append(filesView.render().$el);
}});
}
else {
this.$el.children(".dirs").toggle();
this.$el.children(".files").toggle();
}
return false; //??? prevents navigation on click?
},
showStatus: function(e) {
$("#status").html("id: "+this.model.id + " name: " + this.model.get('name'));
e.stopPropagation();
}
});
|
module.exports = {
root: true,
env: {
node: true,
browser: true,
jest: true,
},
extends: [
'react-app',
'plugin:jsx-a11y/recommended',
'plugin:prettier/recommended',
],
plugins: ['jsx-a11y', 'prettier'],
}
|
export const SET_IMG_DATA = 'SET_IMG_DATA';
export const SET_VIDEO_STREAM = 'SET_VIDEO_STREAM';
export const SET_CAN_PLAY = 'SET_CAN_PLAY';
export const SET_IS_STREAMING = 'SET_IS_STREAMING';
export const SET_FRAME_DATA = 'SET_FRAME_DATA';
|
/* global describe it beforeEach */
const chai = require('chai');
const chaiHttp = require('chai-http');
const should = chai.should();
const app = require('../app');
const {
Result,
} = require('../models');
chai.use(chaiHttp);
describe('Result API', () => {
beforeEach((done) => {
Result.destroy({
where: {},
truncate: true,
});
done();
});
describe('GET /', () => {
it('Getting all results', (done) => {
chai.request(app).get('/').end((err, res) => {
res.should.have.status(200);
res.body.should.be.a('array');
done();
});
});
});
describe('POST /', () => {
it('Submit a new scan', (done) => {
const req = {
repositoryName: 'https://github.com/nodejs/node',
};
chai.request(app).post('/').send(req).end((err, res) => {
res.should.have.status(200);
res.body.should.be.a('object');
res.body.repositoryName.should.equal(req.repositoryName);
res.body.findings.should.have.any.keys('findings');
done();
});
});
});
describe('GET /:id', () => {
it('Get result by id', (done) => {
Result.create({
repositoryName: 'https://github.com/nodejs/node',
}).then((result) => {
chai.request(app).get(`/${result.id}`).end((err, res) => {
res.should.have.status(200);
res.body.should.be.a('object');
done();
});
});
});
it('Get result by not existed id', (done) => {
chai.request(app).get('/111').end((err, res) => {
res.should.have.status(404);
res.body.should.equal('Not found');
done();
});
});
});
describe('PUT /:id results', () => {
it('Update result by id', (done) => {
Result.create({
repositoryName: 'https://github.com/nodejs/node',
}).then((result) => {
const resultEdit = {
repositoryName: 'git@github.com:nodejs/node',
};
chai.request(app).put(`/${result.id}`).send(resultEdit).end((err, res) => {
res.should.have.status(200);
res.body.should.be.a('array');
done();
});
});
});
});
describe('DELETE /:id results', () => {
it('Delete result by id', (done) => {
Result.create({
repositoryName: 'https://github.com/nodejs/node',
}).then((result) => {
chai.request(app).delete(`/${result.id}`).end((err, res) => {
res.should.have.status(200);
res.body.should.equal(1);
done();
});
});
});
});
});
|
// import React, {Component} from 'react';
// import {connect} from 'react-redux';
// import {bindActionCreators} from 'redux';
// import {details} from '../actions/details_actions'
// import { store } from '..';
// import '../index.css';
//
// class RemoveMusic extends Component {
//
// onDeleteClick = (e) => {
// const id = e.currentTarget.dataset.myId
// const arr =
// this.setState({ users: })
// }
//
// let user = this.props.users.map(function(user){
// return <li key={user.id}><User number={user.id} id={user.id} text={user.id} onDeleteClick={this.onDeleteClick}/></li>
// })
// render() {
// <div>
// <button onClick={this.props.onDeleteClick} data-my-index={this.props.user.id}> Удалить</button>
// </div>
// }
// }
//
//
//
// function mapStateToProps(state) {
// return {
// music: state.music,
// truck: state.details
// };
// }
//
// function mapDispatchToProps (dispatch) {
// return bindActionCreators({details: details},dispatch);
// }
//
// export default connect (mapStateToProps, mapDispatchToProps)(RemoveMusic);
|
/**
* Created by plter on 2016/11/22.
*/
angular.module("register").component("register", {
templateUrl: "register/register.template.htm",
controller: function ($scope, $http, $location) {
$scope.login = "";
$scope.pass = "";
$scope.passConfirm = "";
$scope.loading = false;
$scope.formSubmitHandler = function () {
if ($scope.pass != $scope.passConfirm) {
ucai.showAlert("密码确认不一致");
return;
}
ucai.hideAlert();
$scope.loading = true;
$http.post(ucai.ServerApis.register, {
login: $scope.login,
pass: md5($scope.pass)
}).then(function (result) {
$scope.loading = false;
console.log(result);
switch (result.data.code) {
case 1:
ucai.currentUser = result.data.result;
$location.path("/profile");
break;
case 1062:
ucai.showAlert("该用户名已被占用");
break;
default:
ucai.showAlert("未知错误");
break;
}
})
}
}
});
|
import React, {Component} from 'react';
import {Input} from '../../components/Input'
import {Button} from '../../components/Button'
import {
Platform,
StyleSheet,
View,
TextInput,
Text,
} from 'react-native';
export default class ViewInApp extends Component {
constructor(props) {
super(props);
this.state = {
miktarArac: this.props.navigation.getParam("miktarUser"),
results: this.props.navigation.getParam("results"),
kalanAraclar: this.props.navigation.getParam("kalanAraclar"),
}
}
static navigationOptions = {
title: 'Sonuç',
headerLeft: null
}
toHome() {
this.props.navigation.navigate('Miktar');
}
render() {
var sonucRecord = []
for(let i = 0; i < this.state.kalanAraclar.length; i++) {
sonucRecord.push(
<View style={{flexDirection: "row", paddingHorizontal: 4, marginVertical: 2}}>
<View style={{flexDirection: "column", flex:1}}>
<View style={{flexDirection: "row"}}>
<Text style={{fontSize: 17, color: "#3dd3fc", fontWeight: "bold"}}>{this.state.kalanAraclar[i].isim}</Text>
</View>
</View>
<View style={{flexDirection: "column", flex:1}}>
<View style={{flexDirection: "row"}}>
<Text style={{fontSize: 16}}>₺{(this.state.results[i]*this.state.miktarArac).toFixed(2) }</Text>
</View>
</View>
<View style={{flexDirection: "column", flex:1}}>
<View style={{flexDirection: "row"}}>
<Text style={{fontSize: 16}}>({(this.state.results[i]*100).toFixed(2)}%)</Text>
</View>
</View>
</View>
)
}
return (
<View style={styles.container}>
<Text style={styles.infoText}><Text style={{color: "#3dd3fc"}}>RumpeIn</Text>, seçimlerinizin filtresinde, önümüzdeki 30 gün için şu tercihlerin faydalı olacağını düşünüyor!</Text>
<View style={{paddingHorizontal: 4, borderColor: "#444", borderWidth: 1, paddingVertical: 24, flex:3}}>
<View style={{flexDirection: "row", paddingHorizontal: 4, marginBottom: 8}}>
<View style={{flexDirection: "column", paddingHorizontal: 6, flex: 1}}>
<View style={{flexDirection: "row"}}>
<Text style={{fontSize: 17, fontWeight: "bold"}}>Araç</Text>
</View>
</View>
<View style={{flexDirection: "column", paddingHorizontal: 6, flex: 1}}>
<View style={{flexDirection: "row"}}>
<Text style={{fontSize: 17, fontWeight: "bold"}}>Miktar</Text>
</View>
</View>
<View style={{flexDirection: "column", paddingHorizontal: 6, flex: 1}}>
<View style={{flexDirection: "row"}}>
<Text style={{fontSize: 17, fontWeight: "bold"}}>Oran</Text>
</View>
</View>
</View>
{sonucRecord}
</View>
<View style={{flex: 4}}>
<Button
textColor='white'
backgroundColor='#00aeef'
marginTop={40}
onPress={this.toHome.bind(this)}>Bitti
</Button>
</View>
</View>
);
}
}
const styles = StyleSheet.create({
container:{
marginTop: Platform.OS == 'ios' ? 21:0,
flex: 1,
paddingLeft: 20,
paddingRight: 20,
},
infoText: {
flex: 3,
marginTop: 20,
color: "#777",
fontSize: 17,
},
});
|
import { InitialState } from './state';
import { actionTypes } from './actionTypes';
export const reducer = (state = InitialState, action) => {
switch (action.type) {
case actionTypes.TICK:
return {
...state,
lastUpdate: action.ts,
light: !!action.light
}
case actionTypes.INCREMENT:
return {
...state,
count: state.count + 1
}
case actionTypes.DECREMENT:
return {
...state,
count: state.count - 1
}
case actionTypes.RESET:
return {
...state,
count: InitialState.count
}
case actionTypes.LOAD_EXAMPLE_DATA:
return {
...state,
exampleData: action.data
}
case actionTypes.LOADING_DATA_FAILURE:
return {
...state,
error: true
}
default:
return state
}
}
|
import Bag from '../classes/Bag';
export default () => {
const elementBag = document.querySelector('.js-bag');
window.bag = new Bag(elementBag);
bag.updateLength('orders');
};
|
class Tree {
constructor() {}
addValue(value) {
if (!this.number && value) {
this.number = value
this.nodeIndex = 0
} else if (this.number && value) {
if (this.valueIndex) this.valueIndex += 1
else this.valueIndex = 1
// right, higher
if (value > this.number) {
if (this.right) this.right.addValue(value, this.valueIndex)
if (!this.right) this.right = new Branch(value, this.valueIndex)
}
// left, lower
if (value < this.number) {
if (this.left) this.left.addValue(value, this.valueIndex)
if (!this.left) this.left = new Branch(value, this.valueIndex)
}
}
}
}
class Branch {
constructor(value, index) {
this.number = value
this.nodeIndex = index
}
addValue(value, index) {
// right, higher
if (value > this.number) {
if (!this.right) this.right = new Branch(value, index)
if (this.right) this.right.addValue(value, index)
}
// left, lower
if (value < this.number) {
if (!this.left) this.left = new Branch(value, index)
if (this.left) this.left.addValue(value, index)
}
}
}
module.exports = Tree
|
import React, {Component} from 'react';
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
import {fetchQuestions} from '../actions/index';
import Question from './question';
import Results from './results';
class QuestionList extends Component {
constructor(props) {
super(props);
this.state = {
score: 0,
page: 1
};
this.displayQuestion = this.displayQuestion.bind(this);
this.upScore = this.upScore.bind(this);
this.upPage = this.upPage.bind(this);
}
componentWillMount() {
this.props.fetchQuestions();
}
upScore(score) {
this.setState({score});
}
upPage(page) {
this.setState({page});
}
displayQuestion() {
if(!this.props.questions) {
return <div>Loading...</div>;
}
return this.props.questions.map(question => {
if(this.state.page == question.numeroPregunta) {
return(
<Question
key={question.numeroPregunta}
question={question}
upScore = {this.upScore}
upPage = {this.upPage}
{...this.state}
/>
);
}
})
}
render() {
if(!this.props.questions) {
return <div>Loading...</div>;
}
if(this.state.page > this.props.questions.length) {
var results = <Results {...this.state} {...this.props}/>;
var progress = '';
} else {
var results = '';
var progress = <p>Page: {this.state.page} - Score: {this.state.score}</p>;
}
return(
<div>
{this.displayQuestion()}
{progress}
{results}
</div>
);
}
}
function mapStateToProps(state) {
return {
questions: state.questions
};
}
function mapDispatchToProps(dispatch) {
return bindActionCreators({ fetchQuestions: fetchQuestions }, dispatch)
}
export default connect(mapStateToProps, mapDispatchToProps)(QuestionList);
|
import React, { Component } from "react";
import "./App.css";
// import connect to the store
import { connect } from "react-redux"
// import actions
import { getSmurfData, removeSmurf } from "../actions"
// import components
import AddSmurf from "./AddSmurf"
import Smurfs from "./Smurfs"
class App extends Component {
componentDidMount() {
this.props.getSmurfData()
}
render() {
console.log(this.props.smurfs)
return (
<div className="App">
<h1>SMURFS! 2.0 W/ Redux</h1>
<AddSmurf />
<Smurfs smurfs={this.props.smurfs} remove={this.props.removeSmurf} />
</div>
);
}
}
const mapStateToProps = state => {
return {
smurfs: state.smurfs
}
}
export default connect(
mapStateToProps,
{ getSmurfData, removeSmurf }
)(App);
|
import { useState } from 'react';
export default function useForm(fields) {
const [state, setState] = useState(_generateInitialState(fields));
function updateField(key, value) {
state[key] = value;
setState({ ...state });
}
return [state, updateField];
}
function _generateInitialState(fields) {
const state = {};
fields.forEach(field => {
state[field.id] = field.value || _getInitialValue(field);
});
return state;
}
function _getInitialValue(field) {
switch (field.type) {
case 'image':
return [];
case 'prov':
case 'mun':
return undefined;
case 'text':
case 'textarea':
case 'phone':
case 'number':
case 'select':
default:
return '';
}
}
|
/* eslint-disable no-console, no-undef, no-unused-vars */
import {HTTPS as https} from 'express-sslify'
import Express, {Router} from 'express'
import cookieParser from 'cookie-parser'
import bodyParser from 'body-parser'
import auth from './auth'
import routes from './routes'
export function start() {
const app = new Express()
if (process.env.NODE_ENV === 'production') {
app.use(https({trustProtoHeader: true}))
}
app.use(cookieParser())
app.use(bodyParser.urlencoded({ extended: false }))
app.use(bodyParser.json())
app.use(auth)
app.use(routes)
return app.listen(process.env.PORT, err => {
if (err) {
console.error(err)
} else {
console.info(`🌍 Listening on port ${process.env.PORT}`)
}
})
}
|
$(document).ready(function () {
var id = window.location.hash;
id = id.substring(1);
// alert(id);
var posts = $("#posts");
window.addEventListener('hashchange', hashchange);
function hashchange(){
var id = location.hash;
id = id.substring(1);
window.location.reload();
}
$.ajax({
url: "db/articles.json"
}).done(function(data) {
console.log("Looking by articles with \"" + id + "\" id.");
var found = 0;
for (var i = 0; i < data.articles.length; i++) {
if (data.articles[i].id == id) {
var source = '<div class="block post"><img src="{{img-link}}" alt="" class="img-responsive"><h1>{{title}}</h1><p>{{full}}</p><p class="tags">Теги: {{#each tags}} {{tag-name}} {{/each}} .</p></div>';
var template = Handlebars.compile(source);
var html = template(data.articles[i]);
posts.append(html);
found++;
}
}
if (found == 0) {
window.location = "index.html";
}
})
});
|
// Let's just learn a little bit more about strings.
//Just like arrays we would be able to find out the the index of any character present inside string.
const Airplane = "Nepal Airlines";
const Plane = "A435";
console.log(Airplane[3]);
console.log(Airplane[0]);
console.log(Airplane[1]);
console.log(Airplane.indexOf("A"));
//To find out the last index of any letter.
console.log(Airline.lastIndexOf("l"));
//OR we can also specify the index of any string inside the print statement directly.
console.log(Airline.indexOf("Airlines"));
//To find out the length of the string.
console.log(Plane.length);
console.log(Airplane.length);
//OR we can directly specify the length of the string inside console.log statement.
console.log("Pankaj".length);
//What slice method is that it basically extracts the part of the string based on beginning and end value.
console.log(Airplane.slice(4));
//Here it basically prints the part of the string starting from index 5 and ending in index 11 i.e before 12.
console.log(Airplane.slice(5, 12));
//Here it basically start printing the string from last side starting with index 2. That is what -2 means.
console.log(Airplane.slice(-2));
console.log(Airplane.slice(1, -1));
//We can also be able to write a function based on the strings.
//Here we write a function to check a middle seat based on some conditions.
const checkMiddleseat = function (seats) {
//Here we check the string from last character. Here the string is those arguments specified by seat arguments.
const s = seats.slice(-1);
if (s === "B" || s === "E") {
console.log("You got a middle set");
} else {
console.log("Better luck for next time");
}
};
//Now just call the function.
checkMiddleseat("23C");
checkMiddleseat("32E");
checkMiddleseat("19B");
checkMiddleseat("29E");
|
import {useRoutes} from 'hookrouter';
import React from 'react';
import ReactDOM from 'react-dom';
import './css/materialIcons.css';
import './css/component.css'
import './css/bootstrap.min.css';
import Home from './home/Home';
import Blog from './blog/blog'
import Article from './article/Article'
import Archive from './archive/Archive'
import Presentation from './presentation/Presentation'
import Contact from './contact/Contact'
import Download from './download'
import Fallback from './Fallback'
let routes = {
'/': () => <Home />,
'/blog': () => <Blog />,
'/blog/:id': ({id}) => <Article content={id} />,
'/archives': () => <Archive/>,
'/archives/:id': ({id}) => <Archive content={id}/>,
'/aboutus': () => <Presentation />,
'/contact': () => <Contact />,
'/file/:id': ({id}) => <Download path={id} />
}
const Root = ()=>{
const result = useRoutes(routes)
return result || <Fallback />
}
ReactDOM.render(
<Root />,
document.getElementById('root')
);
|
import React from 'react'
import Layout from "../components/layout";
import Title from '../components/Globals/Title';
import BackgroundSection from "../components/Globals/BackgroundSection";
export default function Contact() {
return (
<Layout>
<div class="container">
<Title title="Contact Us" />
<div className="row">
<div className="col-md-4">
<div className="card">
<div className="card-body text-center">
<h4 className="text-center" >Hours</h4>
<table className="table text-center">
<thead class="thead-light">
<tr>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">Sunday</th>
<td>Closed</td>
</tr>
<tr>
<th scope="row">Monday</th>
<td>Closed</td>
</tr>
<tr>
<th scope="row">Tuesday</th>
<td>10AM–8PM</td>
</tr>
<tr>
<th scope="row">Wednesday</th>
<td>10AM–8PM</td>
</tr>
<tr>
<th scope="row">Thursday</th>
<td>10AM–8PM</td>
</tr>
<tr>
<th scope="row">Friday</th>
<td>10AM–10PM</td>
</tr>
<tr>
<th scope="row">Saturday</th>
<td>10AM–10PM</td>
</tr>
</tbody>
</table>
<h4 className="text-center">Address</h4>
<p className="text-center">2501 C, Jordan Ln NW, Huntsville, AL 35816</p>
<span></span>
<h4 className="text-center" >Phone</h4>
<a href="tel:+1-256-384-7956">+1 (256) 384-7956</a>
</div>
</div>
</div>
<div class="col-md-8 pb-5">
<div class="card p-4">
<div class="card-body">
<h3 class="text-center">Please fill out this form to contact us</h3>
<hr/>
<div class="row">
<div class="col-md-6">
<div class="form-group pb-5">
<input type="text" class="form-control" placeholder="First Name"/>
</div>
</div>
<div class="col-md-6">
<div class="form-group pb-5">
<input type="text" class="form-control" placeholder="Last Name"/>
</div>
</div>
<div class="col-md-6">
<div class="form-group pb-5">
<input type="text" class="form-control" placeholder="Email"/>
</div>
</div>
<div class="col-md-6">
<div class="form-group pb-5">
<input type="text" class="form-control" placeholder="Phone Number"/>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="form-group pb-5">
<textarea class="form-control" placeholder="Message"></textarea>
</div>
</div>
<div class="col-md-12">
<div class="form-group pb-5">
<input type="submit" value="Submit" class="btn btn-outline-danger btn-block"/>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{/* This is the mk sign above footer */}
<section id="about-section">
<div className="p-4 primary-overlay">
<div className="container">
<div className="row text-center">
</div>
</div>
</div>
</section>
</Layout>
)
}
|
import React from "react";
import axios from "axios";
import Table from '@material-ui/core/Table';
import TableBody from '@material-ui/core/TableBody';
import TableCell from '@material-ui/core/TableCell';
import TableContainer from '@material-ui/core/TableContainer';
import TableHead from '@material-ui/core/TableHead';
import Paper from '@material-ui/core/Paper';
import TotalCases from "./TotalCases";
import ArrowUpwardIcon from '@material-ui/icons/ArrowUpward';
import ArrowDownwardIcon from '@material-ui/icons/ArrowDownward';
import Notification from "./Notification";
import RowData from "./RowData";
import Typography from '@material-ui/core/Typography';
import { entries, getLastObject, keys } from "./helperFunctions";
import TableRow from '@material-ui/core/TableRow';
export default function TableData(props) {
const { logStatus } = props;
const [stateLatestData, setStateLatestData] = React.useState({});
const [districtWiseLatestData, setDistrictWiseLatestData] = React.useState({});
const [arrowStatus, setArrowStatus] = React.useState({
column: "state",
direction: "up",
})
const handleRowSort = (column) => {
if (arrowStatus.column === column) {
const temp = entries(stateLatestData).map(element => {
return {
state: element[0],
stateData: element[1]
}
});
const sortOrderChangeData = temp.sort((a, b) => {
if (getLastObject(a.stateData).total[column] < getLastObject(b.stateData).total[column]) {
return arrowStatus.direction === 'up' ? 1 : -1;
}
else if (getLastObject(a.stateData).total[column] > getLastObject(b.stateData).total[column]) {
return arrowStatus.direction === 'up' ? -1 : 1;
} else {
return 0;
}
});
const tempLatestData = {};
sortOrderChangeData.forEach(ele => {
tempLatestData[ele.state] = ele.stateData
});
setStateLatestData(tempLatestData);
setArrowStatus({ ...arrowStatus, direction: arrowStatus.direction === "down" ? "up" : "down" })
}
else {
const temp = entries(stateLatestData).map(element => {
return {
state: element[0],
stateData: element[1]
}
});
const sortOrderChangeData = temp.sort((a, b) => {
if (getLastObject(a.stateData).total[column] < getLastObject(b.stateData).total[column]) {
return 1;
}
else if (getLastObject(a.stateData).total[column] > getLastObject(b.stateData).total[column]) {
return -1;
} else {
return 0;
}
});
const tempLatestData = {};
sortOrderChangeData.forEach(ele => {
tempLatestData[ele.state] = ele.stateData
});
setStateLatestData(tempLatestData);
setArrowStatus({
column: column,
direction: "down"
});
}
}
React.useEffect(() => {
axios.get("https://api.covid19india.org/v3/min/timeseries.min.json")
.then((response) => {
entries(response.data).forEach(ele => {
const temp = getLastObject(ele[1])
temp.total.deceased = temp.total.deceased ? temp.total.deceased : 0;
temp.total.active = temp.total.confirmed - temp.total.recovered;
});
setStateLatestData(response.data);
})
.catch((error) => {
});
axios.get("https://api.covid19india.org/v3/min/data.min.json")
.then((response) => {
// entries(response.data).forEach(ele => {
// entries(ele[1].districts).forEach(ele1 => {
// ele1[1].total.deceased = ele1[1].total.deceased ? ele1[1].total.deceased : 0;
// ele1[1].total.active = ele1[1].total.confirmed - ele1[1].total.recovered;
// })
// });
setDistrictWiseLatestData(response.data);
})
.catch((error) => {
});
}, []);
const handleStateSort = () => {
if(arrowStatus.column !== 'state') {
const tempKeys = keys(stateLatestData).sort((a,b) => {
if( a < b ) {
return 1;
} else if( a > b ) {
return -1;
} else {
return 0;
}
});
const tempLatestData = {};
tempKeys.forEach(ele => {
tempLatestData[ele] = stateLatestData[ele];
});
setStateLatestData(tempLatestData);
setArrowStatus({column: "state", direction: "down" })
}
else {
const tempKeys = keys(stateLatestData).sort((a,b) => {
if( a < b ) {
return arrowStatus.direction === 'down' ? -1 : 1;
} else if( a > b ) {
return arrowStatus.direction === 'down' ? 1 : -1;
} else {
return 0;
}
});
const tempLatestData = {};
tempKeys.forEach(ele => {
tempLatestData[ele] = stateLatestData[ele];
});
setStateLatestData(tempLatestData);
setArrowStatus({column: "state", direction: arrowStatus.direction === "down" ? "up" : "down" })
}
}
return (
<React.Fragment>
<TotalCases stateLatestData={getLastObject(stateLatestData["TT"])} />
<br />
<Notification logStatus={logStatus} />
<br />
<TableContainer component={Paper}>
<Table aria-label="collapsible table">
<TableHead>
<TableRow>
<TableCell />
<TableCell style={{ cursor: "pointer" }} onClick={() => handleStateSort()}>
<Typography variant="h5" noWrap>
State
{
arrowStatus.column === "state" && (arrowStatus.direction === "down" ? <ArrowDownwardIcon style={{ fontSize: 25 }} /> : <ArrowUpwardIcon style={{ fontSize: 25 }} />)
}
</Typography>
</TableCell>
<TableCell style={{ cursor: "pointer" }} onClick={() => handleRowSort("confirmed")}>
<Typography variant="h5" noWrap>
Total Cases
{
arrowStatus.column === "confirmed" && (arrowStatus.direction === "down" ? <ArrowDownwardIcon style={{ fontSize: 25 }} /> : <ArrowUpwardIcon style={{ fontSize: 25 }} />)
}
</Typography>
</TableCell>
<TableCell style={{ cursor: "pointer" }} onClick={() => handleRowSort("active")}>
<Typography variant="h5" noWrap>
Active
{
arrowStatus.column === "active" && (arrowStatus.direction === "down" ? <ArrowDownwardIcon style={{ fontSize: 25 }} /> : <ArrowUpwardIcon style={{ fontSize: 25 }} />)
}
</Typography>
</TableCell>
<TableCell style={{ cursor: "pointer" }} onClick={() => handleRowSort("recovered")}>
<Typography variant="h5" noWrap>
Recovered
{
arrowStatus.column === "recovered" && (arrowStatus.direction === "down" ? <ArrowDownwardIcon style={{ fontSize: 25 }} /> : <ArrowUpwardIcon style={{ fontSize: 25 }} />)
}
</Typography>
</TableCell>
<TableCell style={{ cursor: "pointer" }} onClick={() => handleRowSort("deceased")}>
<Typography variant="h5" noWrap>
Deceased
{
arrowStatus.column === "deceased" && (arrowStatus.direction === "down" ? <ArrowDownwardIcon style={{ fontSize: 25 }} /> : <ArrowUpwardIcon style={{ fontSize: 25 }} />)
}
</Typography>
</TableCell>
</TableRow>
</TableHead>
<TableBody>
{
entries(stateLatestData).map((item, index) => {
return (
<RowData key={index} item={getLastObject(item[1])} state={item[0]} districtWiseData={districtWiseLatestData[item[0]]} />
)
})
}
</TableBody>
</Table>
</TableContainer>
</React.Fragment>
)
}
|
import React, {Component} from 'react'
import Highcharts from 'highcharts'
import {connect} from 'react-redux'
function percentage(previousCount, currentCount) {
if (previousCount === 0 || currentCount === 0)
return 0
var increaseCount = previousCount - currentCount;
var percentage = (increaseCount / previousCount) * 100;
return percentage;
}
class PercentageTrendChart extends Component {
componentWillReceiveProps(nextProps) {
const dashboardData = nextProps.dashboardData;
if (dashboardData) {
const vulnerabilityTrend = dashboardData.vulnerabilityTrend;
var vulnerabilityTrendResult = vulnerabilityTrend.vulnerabilityTrendResult;
var criticalCount = [];
var highCount = [];
var mediumCount = [];
var lowCount = [];
var infoCount = [];
var monthList = [
"JANUARY",
"FEBRUARY",
"MARCH",
"APRIL",
"MAY",
"JUNE",
"JULY",
"AUGUST",
"SEPTEMBER",
"OCTOBER",
"NOVEMBER",
"DECEMBER",
];
var date = new Date();
var lastSixMonths = []
for (var i = 6; i >= 0; i--) {
var month = date.getMonth() - i;
if (month < 0) {
month = 12 + month;
}
lastSixMonths.push(monthList[month]);
}
lastSixMonths
.map(function(eachMonth, index) {
if (index > 0) {
var previousCriticalCount = vulnerabilityTrendResult[lastSixMonths[index - 1]]['Critical'];
var previousHighCount = vulnerabilityTrendResult[lastSixMonths[index - 1]]['High'];
var previousMediumCount = vulnerabilityTrendResult[lastSixMonths[index - 1]]['Medium'];
var previousLowCount = vulnerabilityTrendResult[lastSixMonths[index - 1]]['Low'];
var previousInfoCount = vulnerabilityTrendResult[lastSixMonths[index - 1]]['Info'];
criticalCount.push(percentage(previousCriticalCount, vulnerabilityTrendResult[eachMonth]['Critical']));
highCount.push(percentage(previousHighCount, vulnerabilityTrendResult[eachMonth]['High']));
mediumCount.push(percentage(previousMediumCount, vulnerabilityTrendResult[eachMonth]['Medium']));
lowCount.push(percentage(previousLowCount, vulnerabilityTrendResult[eachMonth]['Low']));
infoCount.push(percentage(previousInfoCount, vulnerabilityTrendResult[eachMonth]['Info']));
}
});
Highcharts.chart('percentageTrendChart', {
chart: {
type: 'area'
},
colors: [
'rgb(255, 77, 77)',
'rgb(255, 112, 77)',
'rgb(247, 163, 92)',
'rgb(124, 181, 236)',
'rgb(144, 237, 125)',
],
title: {
text: 'Vulnerabilities Percentage By Month Wise'
},
xAxis: {
title: {
text: 'Month'
},
categories: lastSixMonths,
tickmarkPlacement: 'on',
title: {
enabled: false
}
},
yAxis: {
title: {
text: 'Vulnerability'
}
},
tooltip: {
pointFormat: '<span style="color:{series.color}">{series.name}</span>: <b>{point.percentage:.1f}%</b> ({point.y:,.0f})<br/>',
split: true
},
plotOptions: {
area: {
stacking: 'percent',
lineColor: '#ffffff',
lineWidth: 1,
marker: {
lineWidth: 1,
lineColor: '#ffffff'
}
}
},
credits: {
enabled: false
},
series: [
{
name: 'Critical',
data: criticalCount,
}, {
name: 'High',
data: highCount
}, {
name: 'Medium',
data: mediumCount
}, {
name: 'Low',
data: lowCount
}, {
name: 'Info',
data: infoCount
},
]
});
}
}
render() {
return (
<div id="percentageTrendChart"></div>
);
}
}
const mapStateToProps = (state) => ({dashboardData: state.dashboard.dashboardData});
export default connect(mapStateToProps)(PercentageTrendChart);
|
import React, { Component } from 'react'
import { connect } from 'react-redux'
import { getShops } from '../../actions/shops/getShops'
import ShopsPage from './ShopsPage';
class ShopsContainer extends Component {
componentDidUpdate() {
this.props.user &&
!this.props.shop &&
this.props.getShopProducts(this.props.user.shopId)
}
render() {
const storePage =
this.props.shops &&
<ShopsPage shops={this.props.shops} />
return (
<div className='store'>
{storePage}
</div>
)
}
}
const mapStateToProps = (state) => ({
shops: state.shops
})
export default connect(mapStateToProps, { getShops })(ShopsContainer)
|
import React, { useState } from 'react';
import { Snackbar } from '@material-ui/core';
import MyCalendar from '../Components/Calendar';
import Backdrop from '../Components/Backdrop';
function Cameras() {
const [snackBarOpen, setSnackBarOpen] = useState(false);
const [backdropOpen, setBackdropOpen] = useState(false);
const [snackMessage, setSnackMessage] = useState('');
const handleSnackbarClose = (event, reason) => {
if (reason === 'clickaway') {
return;
}
setSnackBarOpen(false);
};
return (
<main>
<Snackbar
anchorOrigin={{
vertical: 'bottom',
horizontal: 'center',
}}
open={snackBarOpen}
autoHideDuration={2000}
message={snackMessage}
onClose={handleSnackbarClose}
/>
<MyCalendar
setSnackBarOpen={setSnackBarOpen}
setSnackMessage={setSnackMessage}
setBackdropOpen={setBackdropOpen}
/>
<Backdrop
open={backdropOpen}
/>
</main>
)
}
export default Cameras;
|
export const USERS_PAGE = '/users';
export const PRODUCTS_PAGE = '/products';
export const SERVICES_PAGE = '/services';
|
var cats = [{
'name': 'Sadie',
'age': 9,
'color': 'black and peanut butter',
'favorite activity': 'eating',
'favorite toy': 'Mr. Mouse',
'sound': 'mew',
'face': 'perfect',
'fuzziness level': 'off the charts'
}, {
'name': 'Layla',
'age': 9,
'color': 'grey and white and black',
'favorite activity': 'alone time',
'favorite toy': 'the scratchy post',
'sound': 'reowr',
'face': 'perfect',
'fuzziness level': 'extreme'
}, {
'name': 'Mr. Binns',
'age': 4,
'color': 'white and black',
'favorite activity': 'furmination time',
'favorite toy': 'the jingly feather stick',
'sound': 'maaaoww maaow MAAOOW',
'face': 'perfect',
'fuzziness level': 'unsafe'
}];
cats.forEach(logsARandomFact);
/*
Sadie's sound is mew
Layla's age is 9
Mr. Binns's color is white and black
*/
function logsARandomFact(cats) {
let name = cats.name;
let keys = Object.keys(cats);
let ranNum = random(1, keys.length -1);
let ranKeys = keys[ranNum]
console.log(cats.ranKeys)
}
function random(min, max) {
return Math.floor(Math.random() * (max - min + 1) + min)
}
|
//Variables
//Declarar
let nombre;
//Inicializar
nombre = "Julio";
let elementos = ["Celular", "Computadora"];
typeof elementos;
//Variable tipo objeto
let persona = {
nombre: "Diego",
edad: 20
}
console.log(persona);
|
import { LightningElement, track, api } from "lwc";
import { ShowToastEvent } from "lightning/platformShowToastEvent";
import createContact from "@salesforce/apex/VendorOnBoardingController.createContact";
export default class Vrf_vendor_capability extends LightningElement {
// this code is written by jatinder kumar 08-01-2020
@api currentRecordId = "";
@api objectApiName = "";
@track showLoadingSpinner;
@track NameofOwnersOrDirector = "";
@track firstName = "";
@track lastname = "";
@track title = "";
@track phone = "";
@track email = "";
@track salesDepartmentEmail = "";
@track salesDepartmentPhone = "";
@track dispatchHelpDeskEmail = "";
@track dispatchHelpDeskPhone = "";
@track contactList = [];
// handleing record edit form submit
handleSubmit(event) {
const allValid = [
...this.template.querySelectorAll("lightning-input")
].reduce((validSoFar, inputCmp) => {
inputCmp.reportValidity();
return validSoFar && inputCmp.checkValidity();
}, true);
if (allValid) {
this.showLoadingSpinner = true;
// prevending default type sumbit of record edit form
event.preventDefault();
// querying the record edit form and submiting fields to form
this.template
.querySelector("lightning-record-edit-form")
.submit(event.detail.fields);
this.showLoadingSpinner = false;
}
}
// refreshing the datatable after record edit form success
handleSuccess() {
/* this.showLoadingSpinner = true;
this.getContactData(); */
this.dispatchEvent(
new ShowToastEvent({
title: "Success!!",
message: " Updated Successfully!!.",
variant: "success"
})
);
this.dispatchEvent(new CustomEvent("savevendor"));
}
getContactData() {
var inputContact = this.template.querySelectorAll("lightning-input");
inputContact.forEach(function (element) {
if (element.name == "Name of Owners/Director of the Company") {
this.NameofOwnersOrDirector = element.value;
} else if (element.name == "First Name") {
this.firstName = element.value;
} else if (element.name == "Last Name") {
this.lastname = element.value;
} else if (element.name == "Title") {
this.title = element.value;
} else if (element.name == "Email") {
this.email = element.value;
} else if (element.name == "Phone") {
this.phone = element.value;
} else if (element.name == "Sales Department Email") {
this.salesDepartmentEmail = element.value;
} else if (element.name == "Sales Department Phone") {
this.salesDepartmentPhone = element.value;
} else if (element.name == "Dispatch Help Desk Email") {
this.dispatchHelpDeskEmail = element.value;
} else if (element.name == "Dispatch Help Desk Phone") {
this.dispatchHelpDeskPhone = element.value;
}
}, this);
let Con = {
AccountId: this.currentRecordId,
Name_of_OwnersDirector_of_the_Company__c: this.NameofOwnersOrDirector,
FirstName: this.firstName,
LastName: this.lastname,
MobilePhone: this.phone,
Email: this.email,
Title: this.title ? this.title : "",
Sales_Department_Email__c: this.salesDepartmentEmail,
Sales_Department_Phone_No__c: this.salesDepartmentPhone,
Dispatch_Help_Desk_Department_Email__c: this.dispatchHelpDeskEmail,
Dispatch_Help_Desk_Department_Phone_No__c: this.dispatchHelpDeskPhone
};
this.contactList.push(JSON.parse(JSON.stringify(Con)));
createContact({ ConList: this.contactList })
.then((result) => {
let reusltdata = result;
if (reusltdata) {
// showing success message
this.dispatchEvent(
new ShowToastEvent({
title: "Success!!",
message: " Updated Successfully!!.",
variant: "success"
})
);
this.dispatchEvent(new CustomEvent("savevendor"));
}
})
.catch((error) => {
let errorMessage = "Unknown error";
if (Array.isArray(error.body)) {
errorMessage = error.body.map((e) => e.message).join(", ");
} else if (typeof error.body.message === "string") {
errorMessage = error.body.message;
}
console.log("errorMessage---" + errorMessage);
this.dispatchEvent(
new ShowToastEvent({
title: "Error",
message: errorMessage,
variant: "error",
mode: "dismissable"
})
);
})
.finally(() => {
// hide spinner
this.showLoadingSpinner = false;
});
}
}
|
function Board(settings) {
this.w = settings.w;
this.h = settings.h;
this.size = this.w * this.h;
this.tiles = new Array(this.size);
}
Board.prototype.set = function(settings) {
this.constructor(settings);
};
Board.prototype._out = function() {
return [
this.w,
this.h,
this.size,
this.tiles
];
};
Board.prototype._in = function(data) {
return {
w: data[0],
h: data[1],
size: data[2],
tiles: data[3]
};
};
// Check whether tile exists on board
Board.prototype.exists = function(position){
return !!this.tile(position.x, position.y);
};
// Look up tile for {x,y} coords
Board.prototype.tile = function(position) {
if (position.x >= 0 && position.x < this.w &&
position.y >= 0 && position.y < this.h){
var tileId = this.tiles[this.w * position.x + position.y];
return tileId;
} else {
return undefined;
}
};
// Look up {x,y} coords for tile index
Board.prototype.coords = function(index) {
var x = Math.floor(index / this.w);
var y = index - (x * this.h);
return {x: x, y: y};
};
if (typeof module !== 'undefined') module.exports = Board;
|
const args = process.argv.slice(2)
const depth = ['colors', 'shades', 'variants', 'swatches'].includes(args[0])
? args[0]
: 'swatches'
const depthMap = {
colors: 1,
shades: 2,
variants: 3,
swatches: 4,
}
const level = depthMap[depth]
const colors = [
'primary',
'secondary',
'tertiary',
'light',
'neutral',
'dark',
'success',
'info',
'warning',
'danger',
]
const shades = level > 1 ? ['base', 'darker', 'dark', 'light', 'lighter'] : []
const variants = level > 2 ? ['base', 'hover', 'active'] : []
const swatches =
level > 3 ? ['base', 'readable', 'border', 'alpha', 'negative'] : []
let msg = ''
colors.forEach(c => {
msg += `'${c}',\n`
shades.forEach(s => {
msg += `'${c}.${s}',\n`
variants.forEach(v => {
msg += `'${c}.${s}.${v}',\n`
swatches.forEach(w => {
msg += `'${c}.${s}.${v}.${w}',\n`
})
})
})
})
console.log(msg)
|
const { request, response } = require("express");
const personaTabla=require('../models/persona');
exports.iniciarSesion=(request, response)=>{
const error = response.locals.mensajes;
//console.log(error);
response.render('iniciarSesion',{
nombrePagina:'Sinfit | Ingreso ',
error
});
}
exports.formularioRegistro=(request, response)=>{
//const administradorId=response.locals.usuarios.administradorId;
response.render('registroUsuario',{
nombrePagina:'Sinfit | Registro'
});
}
exports.registrarUsuario=async(request, response)=>{
console.log(request.body);
const { txtNombreRegistro }= request.body;
const { txtApellidoRegistro }= request.body;
const { cmbTipoDocumento }= request.body;
const { txtNumeroDocumentoRegistro }= request.body;
const { cmbGeneroRegistro }= request.body;
const { txtDireccionRegistro }= request.body;
const { txtCorreoRegistro }= request.body;
const { txtContrasenaRegistro }= request.body;
const { dateFechaNacimientoRegistro }= request.body;
const { txtNumeroTelefonoRegistro }= request.body;
const { chkTerminos }= request.body;
const administradorId=response.locals.user.administradorId;
try{
const personaInsercion = await personaTabla.create(
{
personaDocumento:txtNumeroDocumentoRegistro,
personaTipoDocumento:cmbTipoDocumento,
personaNombre:txtNombreRegistro,
personaApellido:txtApellidoRegistro,
personaGenero:cmbGeneroRegistro,
personaFechaNacimiento:dateFechaNacimientoRegistro,
personaTelefono:txtNumeroTelefonoRegistro,
personaDireccion:txtDireccionRegistro,
personaEmail:txtCorreoRegistro,
personaContrasena:txtContrasenaRegistro,
personaCondicion: chkTerminos,
personaEstado:'A',
administradorAdministradorId:administradorId
}
);
response.redirect('/administrador')
}catch(error){
request.flash('error', error.errors.map(error => error.message));
response.render('registroUsuario',{
mensajes: request.flash(),
nombrePagina:'Sinfit | registro',
txtNumeroDocumentoRegistro,
txtNombreRegistro,
txtApellidoRegistro,
dateFechaNacimientoRegistro,
txtNumeroTelefonoRegistro,
txtDireccionRegistro,
txtCorreoRegistro
});
}
}
exports.cuentaUsuario=async(request, response)=>{
const usuarios= await personaTabla.findAll();
response.render('cuentaUsuario',{
nombrePagina:'Sinfit | Mi perfil',
usuarios
});
}
exports.formRestablecerPassword = (request,response)=>{
response.render('recuperarContraseña',{
nombrePagina:'Restablecer contraseña'
});
}
|
const express = require('express');
const bodyParser = require('body-parser');
const pino = require('express-pino-logger')();
var http = require('http');
var twilio = require('twilio');
const app = express();
app.use(bodyParser.urlencoded({ extended: false }));
app.use(pino);
app.get('/api/greeting', (req, res) => {
const name = req.query.name || 'World';
res.setHeader('Content-Type', 'application/json');
res.send(JSON.stringify({ greeting: `Hello ${name}!` }));
});
app.listen(3001, () =>
console.log('Express server is running on localhost:3001')
);
//Function to post sms
app.post('/sms', function(req, res) {
var twilio = require('twilio');
var twiml = new twilio.twiml.MessagingResponse();
twiml.message('The Robots are coming! Head for the hills!');
res.writeHead(200, {'Content-Type': 'text/xml'});
res.end(twiml.toString());
});
// http.createServer(app).listen(1337, function () {
// console.log("Express server listening on port 1337");
// });
|
const gulp = require('gulp');
const gulpTheo = require('gulp-theo');
const theo = require('theo');
const deepMap = require('../formats/deepMap.scss');
const map = require('../formats/map.scss');
const metaJs = require('../formats/meta.js');
const commonJs = require('../formats/common.js');
// Custom formats
theo.registerFormat('deep-map.scss', deepMap);
theo.registerFormat('map.scss', map);
theo.registerFormat('meta.js', metaJs);
theo.registerFormat('common.js', commonJs);
theo.registerTransform('docs', ['color/hex']);
theo.registerTransform('web', ['color/hex']);
// Format sources
const deepMapSources = [{ src: 'tokens/color.yml', prefix: 'color' }];
const scssMapSources = [
{ src: 'tokens/border-radius.yml' },
{ src: 'tokens/border-width.yml' },
{ src: 'tokens/box-shadow.yml' },
{ src: 'tokens/media-query.yml' },
{ src: 'tokens/motion-duration.yml' },
{ src: 'tokens/motion-ease.yml' },
{ src: 'tokens/font-family.yml' },
{ src: 'tokens/font-size.yml' },
{ src: 'tokens/font-weight.yml' },
{ src: 'tokens/line-height.yml' },
{ src: 'tokens/sizing.yml' },
{ src: 'tokens/spacing.yml' },
{ src: 'tokens/z-index.yml' },
];
const indexFormats = ['common.js', 'custom-properties.css', 'meta.js'];
gulp.task('deep-map', done => {
deepMapSources.map(({ src, ...options }) => {
gulp
.src(src)
.pipe(
gulpTheo({
transform: { type: 'web', includeMeta: true },
format: { type: 'deep-map.scss', options },
}),
)
.on('error', err => {
throw new Error(err);
})
.pipe(gulp.dest('dist'));
});
done();
});
gulp.task('map', done => {
scssMapSources.map(({ src }) => {
gulp
.src(src)
.pipe(
gulpTheo({
transform: { type: 'web' },
format: { type: 'map.scss' },
}),
)
.on('error', err => {
throw new Error(err);
})
.pipe(gulp.dest('dist'));
});
done();
});
gulp.task('index', done => {
indexFormats.map(type => {
gulp
.src('tokens/index.yml')
.pipe(
gulpTheo({
transform: { type: 'web' },
format: { type },
}),
)
.pipe(gulp.dest('dist'));
});
done();
});
gulp.task('docs', () =>
gulp
.src('tokens/index.yml')
.pipe(
gulpTheo({
transform: { type: 'docs' },
format: {
type: 'html',
options: { transformPropName: a => a },
},
}),
)
.pipe(gulp.dest('docs')),
);
exports.default = gulp.series('deep-map', 'map', 'index', 'docs');
|
import React from 'react'
const DeleteButton = (props) => {
return (
<div onClick={() => props.deleteTodo({ id: props.id })}>
<i className="fa fa-times fa-lg"></i>
</div>
)
}
export default DeleteButton
|
import asset from "plugins/assets/asset";
export default function ItemBanner (
{
urlImage,
children,
style,
linkLine,
}
){
return (
<>
<div className="itemBanner" style={style}>
<img className={"imgBanner"} src={urlImage ? urlImage : asset("/images/slide-banner.png")} />
{
linkLine ? <img src={linkLine} className="lineBanner"></img> : <></>
}
{children}
</div>
<style jsx>{`
.itemBanner {
min-height: 100vh;
}
.lineBanner{
bottom: 0;
position: absolute;
display:block;
width : 100%;
}
@media screen and (max-width: 1025px) and (min-width: 769px){
.itemBanner {
min-height: 50vh;
}
}
@media screen and (max-width: 769px) and (min-width: 600px){
.itemBanner {
min-height: 20vh;
}
}
`}</style>
</>
)
}
|
import { Row, Col } from 'antd';
import pointBox from '../../images/point-box.png'
import pic2 from '../../images/pic2.jpg'
export default function SurveyView(props) {
const {survey} = props;
return(
<>
<Col lg={6} md={8} xs={24}>
{/* 대표 이미지 */}
<div style={{position:'relative', width: '290px', height: '200px',overflow: 'hidden'}}>
<img src={pic2} style={{position:'absolute',zIndex:'1',borderRadius:'10px 10px 0px 0px', width:'100%', height:'100%',objectFit:'cover'}}/>
<img src={pointBox} style={{position:'absolute',zIndex:'2', width:'71px', height:'auto',objectFit:'contain',marginTop:'10px',marginLeft:'12px'}}/>
<span style={{position:'absolute',zIndex:'3',fontSize:'18px', fontWeight:'700', color:'#418AFF', width:'71px', height:'42px',marginTop:'16px',marginLeft:'12px',textAlign:'center'}}>{survey.point}p</span>
</div>
{/* 대표 이미지 */}
{/* 텍스트 박스 */}
<div style={{width: '290px', height: '100px',backgroundColor: '#EFEFEF',borderRadius:'0px 0px 10px 10px'}}>
<div style={{marginLeft:'12px', marginRight:'12px'}}>
<div style={{width: '290px', textOverflow: 'ellipsis',fontWeight:'700', fontSize:'18px', textAlign:'left'}}>{survey.name}</div>
<div style={{fontWeight:'400', fontSize:'16px', textAlign:'left', marginTop:'20px'}}>{survey.startDate} - {survey.endDate}</div>
</div>
<div style={{fontWeight:'400', fontSize:'14px', textAlign:'right',marginRight:'8px', marginBottom:'8px'}}>{survey.point}min</div>
</div>
{/* 텍스트 박스 */}
<div style={{width: '290px',color:'#898989',fontWeight:'400', fontSize:'14px', textAlign:'right'}}>{survey.writerId}님 제공</div>
</Col>
</>
);
}
|
//Function to return true if passed int is even
function isEven(int) {
return int % 2 === 0;
}
//Function to return the factorial of a number
function factorial(int) {
var ans = 1;
while (int !== 0) {
ans *= int;
int--;
}
return ans;
}
//Function to turn a string with hyphens to underscores
function kebabToSnake(string) {
// var ans = "";
// for (var i = 0; i < string.length; i++) {
// if (string[i] !== "-") {
// ans += string[i];
// } else {
// ans += "_";
// }
// }
// return ans;
return string.replace(/-/g, "_");
}
|
import React from 'react';
import OptionallyDisplayed from './OptionallyDisplayed';
import { shallow } from 'enzyme';
test('It renders its children when display is set to true', () => {
const component = shallow(
<OptionallyDisplayed display={true}>
<p>I'm a computer!</p>
</OptionallyDisplayed>
);
expect(component.find('p').length).toBe(1);
});
test('It doesnt render its children when display is set to false', () => {
const component = shallow(
<OptionallyDisplayed display={false}>
<p>I'm a computer!</p>
</OptionallyDisplayed>
);
expect(component.find('p').length).toBe(0);
});
|
'use strict';
const EventEmitter = require('events');
const _ = require('lodash');
const Async = require('async');
const Batchelor = require('batchelor');
const Boom = require('@hapi/boom');
const Google = require('googleapis').google;
const GoogleCal = Google.calendar('v3');
const OAuth2 = Google.auth.OAuth2;
class GoogleCalConnector extends EventEmitter {
/**
* @constructor
*
* @param {Object} config - Configuration object
* @param {String} config.clientId
* @param {String} config.clientSecret
*/
constructor(config) {
super();
if (!config || !config.clientId || !config.clientSecret) {
throw new Error('Invalid configuration. Please refer to the documentation to get the required fields.');
}
this.clientId = config.clientId;
this.clientSecret = config.clientSecret;
this.name = 'GoogleCal';
}
/* EVENTS */
/**
*
* @param {Object} auth - Authentication object
* @param {String} auth.access_token - Access token
* @param {String} auth.refresh_token - Refresh token
*
* @param {Object} params
* @param {Number} params.maxResults - Maximum amount of events in response, max = 100
* @param {String} params.pageToken - Token used to retrieve a certain page in the list
* @param {String} params.calendarId - ID of the specified calendar
* @param {String} params.timeMin - Start time of the events in response
* @param {String} params.orderBy - The order of the events in the response
* @param {Boolean} params.singleEvents - Only give single events or not
*
* @param {Object} options
* @param {Boolean} options.raw - If true the response will not be transformed to the unified object
*
* @param {function (err, results)} callback
*
* @returns {EventListResource | Object[]} Returns a unified event list resource when options.raw is false or the raw response of the API when truthy
*/
listEvents(auth, params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
options = options || {};
const paramsArray = [];
const googleCalParams = {
auth,
...params
};
if (params.maxResults || params.maxResults === 0) {
googleCalParams.maxResults = params.maxResults > 100 ? 100 : params.maxResults; // TODO: Waarom 100?
} else {
googleCalParams.maxResults = 100;
}
return this._prepareApiCall(googleCalParams, (params, oldAccessToken)=>{
GoogleCal.events.list(params, (err, listResponse)=>{
if(err) return callback(null, err);
if (!listResponse.data.items || listResponse.data.items === 0) {
return callback(null, []);
}
const listEvents = listResponse.data.items.map(d => this._transformEvent(d))
const eventList = {
events: listEvents,
next_page_token: listResponse.data.nextPageToken
}
return callback(null, options.raw ? listResponse.data.items : eventList);
});
});
}
/**
*
* @param {Object} auth - Authentication object
* @param {String} auth.access_token - Access token
* @param {String} auth.refresh_token - Refresh token
*
* @param {Object} params
* @param {String} params.eventId - ID of the specified event
* @param {String} params.calendarId - ID of the specified calendar
*
* @param {Object} options
* @param {Boolean} options.raw - If true the response will not be transformed to the unified object
*
* @param {function (err, results)} callback
*
* @returns {EventResource | Object} Returns a unified event resource when options.raw is false or the raw response of the API when truthy
*/
getEvent(auth, params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
options = options || {};
const paramsArray = [];
const googleCalParams = {
auth,
...params
};
return this._prepareApiCall(googleCalParams, (params, oldAccessToken)=>{
GoogleCal.events.get(params, (err, res)=>{
if(err) return callback(null, err);
if (!res.data) {
return callback(null, null);
}
return callback(null, options.rax ? res.data : this._transformEvent(res.data));
});
});
}
/**
* Gets first available event
*
* @param {Object} auth - Authentication object
* @param {String} auth.access_token - Access token
* @param {String} auth.refresh_token - Refresh token
*
* @param {Object} params
* @param {String} params.calendarId - ID of the specified calendar
*
* @param {Object} options
* @param {Boolean} options.raw - If true the response will not be transformed to the unified object
*
* @param {function (err, results)} callback
*
* @returns {EventResource | Object} Returns a unified event resource when options.raw is false or the raw response of the API when truthy
*/
getNextEvent(auth, params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
options = options || {};
const paramsArray = [];
const googleCalParams = {
auth,
...params
};
return this._prepareApiCall(googleCalParams, (params, oldAccessToken)=>{
GoogleCal.events.get(params, (err, res)=>{
if(err) return callback(null, err);
if (!res.data) {
return callback(null, null);
}
return callback(null, options.raw ? res.data : this._transformEvent(res.data));
});
});
}
/**
* Watch a calendar to get updates about events changes
*
* @param {Object} auth - Authentication object
* @param {String} auth.access_token - Access token
* @param {String} auth.refresh_token - Refresh token
*
* @param {Object} params
* @param {String} params.calendarId - ID of the specified calendar
*
* @param {Object} options
* @param {Boolean} options.raw - If true the response will not be transformed to the unified object
* @param {String} options.id - A UUID or similar unique string that identifies this channel.
* @param {String} options.address - The address where notifications are delivered for this channel.
* @param {String} options.token - An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
*
* @param {function (err, results)} callback
*
* @returns {EventResource | Object} Returns a unified event resource when options.raw is false or the raw response of the API when truthy
*/
watchEvents(auth, params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
options = options || {};
const paramsArray = [];
const googleCalParams = {
auth,
...params,
requestBody: {
id: options.id,
token: options.token,
type: "web_hook",
address: options.address
}
};
return this._prepareApiCall(googleCalParams, (params, oldAccessToken)=>{
GoogleCal.events.watch(params, (err, res)=>{
if(err) return callback(null, err);
/**
* TODO: process data
*
* {
"kind": "api#channel",
"id": "01234567-89ab-cdef-0123456789ab"", // ID you specified for this channel.
"resourceId": "o3hgv1538sdjfh", // ID of the watched resource.
"resourceUri": "https://www.googleapis.com/calendar/v3/calendars/my_calendar@gmail.com/events", // Version-specific ID of the watched resource.
"token": "target=myApp-myCalendarChannelDest", // Present only if one was provided.
"expiration": 1426325213000, // Actual expiration time as Unix timestamp (in ms), if applicable.
}
*
*/
return callback(null, res.data);
});
});
}
/**
* Stop watching a calendar
*
* @param {Object} auth - Authentication object
* @param {String} auth.access_token - Access token
* @param {String} auth.refresh_token - Refresh token
*
* @param {Object} params
* @param {String} params.id - ID of the specified calendar
* @param {String} params.resourceId - ID of the watched resource
*
* @param {Object} options
* @param {Boolean} options.raw - If true the response will not be transformed to the unified object
*
* @param {function (err, results)} callback
*
* @returns {EventResource | Object} Returns a unified event resource when options.raw is false or the raw response of the API when truthy
*/
stopWatch(auth, params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
options = options || {};
const paramsArray = [];
const googleCalParams = {
auth,
requestBody: {
id: params.id,
resourceId: params.resourceId
}
};
return this._prepareApiCall(googleCalParams, (params, oldAccessToken)=>{
GoogleCal.channels.stop(params, (err, res)=>{
if(err) return callback(null, err);
return callback(null, res);
});
});
}
/* CALENDARS */
/**
*
* @param {Object} auth - Authentication object
* @param {String} auth.access_token - Access token
* @param {String} auth.refresh_token - Refresh token
*
* @param {Object} params
* @param {Number} params.maxResults - Maximum amount of events in response, max = 100
* @param {String} params.pageToken - Token used to retrieve a certain page in the list
*
* @param {Object} options
* @param {Boolean} options.raw - If true the response will not be transformed to the unified object
*
* @param {function (err, results)} callback
*
* @returns {CalendarListResource | Object} Returns a unified calendar list resource when options.raw is false or the raw response of the API when truthy
*/
listCalendars(auth, params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
options = options || {};
const paramsArray = [];
const googleCalParams = {
auth,
...params
};
if (params.maxResults || params.maxResults === 0) {
googleCalParams.maxResults = params.maxResults > 100 ? 100 : params.maxResults; // TODO: Waarom 100?
} else {
googleCalParams.maxResults = 100;
}
return this._prepareApiCall(googleCalParams, (params, oldAccessToken)=>{
GoogleCal.calendarList.list(params, (err, listResponse)=>{
if(err) return callback(null, err);
if (!listResponse.data || listResponse.data.items === 0) {
return callback(null, []);
}
const listCalendar = {
calendars: listResponse.data.items.map(d => this._transformCalendar(d)),
next_sync_token: listResponse.data.nextSyncToken,
next_page_token: listCalendar.data.nextPageToken
}
return callback(null, options.raw ? listResponse.data.items : listCalendar);
});
});
}
/**
*
* @param {Object} auth - Authentication object
* @param {String} auth.access_token - Access token
* @param {String} auth.refresh_token - Refresh token
*
* @param {Object} params
* @param {String} params.calendarId - ID of the specified calendar
*
* @param {Object} options
* @param {Boolean} options.raw - If true the response will not be transformed to the unified object
*
* @param {function (err, results)} callback
*
* @returns {CalendarResource | Object} Returns a unified calendar resource when options.raw is false or the raw response of the API when truthy
*/
getCalendar(auth, params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
options = options || {};
const paramsArray = [];
const googleCalParams = {
auth,
...params
};
return this._prepareApiCall(googleCalParams, (params, oldAccessToken)=>{
GoogleCal.calendars.get(params, (err, res)=>{
if(err) return callback(null, err);
return callback(null, options.raw ? res.data : this._transformCalendar(res.data));
});
});
}
refreshAuthCredentials(auth, callback) {
if (auth.access_token && (!auth.expiration_date || new Date(auth.expiration_date) > new Date())) {
return callback(null, auth);
}
const oauth2Client = new OAuth2(this.clientId, this.clientSecret);
oauth2Client.setCredentials({
refresh_token: auth.refresh_token
});
return oauth2Client.refreshAccessToken((err, token) => { // TODO: deprecated
if (err) {
return callback(null, err);
}
this.emit('newAccessToken', token);
return callback(null, token);
});
}
/**
*
* @param {Object} auth - Authentication object
* @param {String} auth.access_token - Access token
* @param {String} auth.refresh_token - Refresh token
*
* @param {function (err, results)} callback
*
*/
_prepareApiCall(params, callback) {
if (!(params.auth instanceof OAuth2)) {
const oauth2Client = new OAuth2(
this.clientId,
this.clientSecret
);
oauth2Client.setCredentials({
access_token: params.auth.access_token,
refresh_token: params.auth.refresh_token
});
params.auth = oauth2Client;
}
const oldAccessToken = params.auth.credentials.access_token;
callback(params, oldAccessToken);
if (params.auth.credentials.access_token !== oldAccessToken) {
this.emit('newAccessToken', { ...params.auth.credentials });
}
}
/**
* Transforms a raw Google Calendar API event response to a unified event resource
*
* @param {Object} data - Event in the format returned by the Google Calendar API
*
* @returns {EventResource} - Unified event resource
*/
_transformEvent(data){
const event = {
tag: data.etag,
id: data.id,
status: data.status,
htmlLink: data.htmlLink,
created: data.created,
updated: data.updated,
summary: data.summary,
location: data.location,
creator : {
email: data.creator.email,
self: data.creator.self
},
organizer: {
email: data.organizer.email,
self: data.organizer.self
},
start: {
dateTime: data.start.dateTime,
timeZone: data.start.timeZone
},
end: {
dateTime: data.end.dateTime,
timeZone: data.end.timeZone
},
iCalUID: data.iCalUID
}
return event
}
/**
* Transforms a raw Google Calendar API calendar response to a unified calendar resource
*
* @param {Object} data - Calendar in the format returned by the Google Calendar API
*
* @returns {CalendarResource} - Unified calendar resource
*/
_transformCalendar(data){
const calendar = {
tag: data.etag,
id: data.id,
summary: data.summary,
description: data.description ? data.description : '',
timeZone: data.timeZone,
colorId: data.colorId
}
return calendar
}
}
module.exports = GoogleCalConnector;
|
import React, { useState } from 'react';
import styled from 'styled-components';
import Modal from 'react-responsive-modal';
const PageHolder = styled.div`
width: 82%;
height: 100%;
overflow-y: scroll;
padding: 3%;
display: flex;
flex-direction: column;
align-items: center;
font-size: 1.6rem;
position: relative;
`;
const Title = styled.div`
font-size: 3rem;
font-weight: 300;
text-align: center;
margin-bottom: 1rem;
`;
const Btn = styled.button`
align-self: center;
position: relative;
text-transform: uppercase;
letter-spacing: 0.025em;
font-size: 1.3rem;
border-radius: 0.5rem;
line-height: 1.5;
border: 1px solid transparent;
padding: 1rem 2.5rem;
box-shadow: 0 0.5rem 1.5rem rgba($color: #000000, $alpha: 0.15);
margin: 1rem 0 0 0;
cursor: pointer;
transition: all 0.3s ease-in-out;
color: #ffffff;
background-color: #1b82c7;
transition: all 0.3s ease-in-out;
&:active {
transform: translate(0, 2px);
outline: none;
box-shadow: 0 0.3rem 1rem rgba($color: #000000, $alpha: 0.15);
background-color: rgb(21, 96, 146);
}
`;
const AddBtn = styled.div`
width: 6rem;
height: 6rem;
border-radius: 50%;
background-color: #172c4f;
position: absolute;
bottom: 10rem;
right: 7rem;
`;
const DrugRequest = () => {
const [description, setDescription] = useState('');
const [showModal, setShowModal] = useState(false);
const __handleChange = (e) => {
setDescription(e.target.value);
};
const __handleSubmit = (e) => {
e.preventDefault();
console.log(description);
};
return (
<PageHolder>
<AddBtn
onClick={() => {
setShowModal(true);
}}
/>
<Modal
open={showModal}
onClose={() => {
setShowModal(false);
}}
center
>
<div style={{ width: '70rem' }}>
<form
style={{
width: '90%',
display: 'flex',
alignItems: 'center',
flexDirection: 'column',
margin: '1rem auto',
}}
onSubmit={__handleSubmit}
>
<label className="form-input">
<textarea
onChange={__handleChange}
value={description}
className="form-input__field"
style={{ height: '30rem', padding: '2rem' }}
></textarea>
</label>
<Btn disabled={description.length < 1} type="submit">
Make Drug Request
</Btn>
</form>
</div>
</Modal>
<Title>Drug request page</Title>
<span style={{ marginBottom: '1rem' }}>Request history</span>
<table className="table" style={{ fontSize: '1.4rem' }}>
<thead
className="thead"
style={{
backgroundColor: '#DDECF7',
color: 'rgba(0, 0, 0, 0.35)',
marginTop: '1rem',
}}
>
<tr>
<th scope="col"></th>
<th scope="col">Patient name</th>
<th scope="col">Date</th>
<th scope="col">Status</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">1</th>
<td>akinjiola babaniyi</td>
<td>23/04/2020</td>
<td>pending</td>
</tr>
<tr>
<th scope="row">2</th>
<td>samuel jhonson</td>
<td>23/04/2020</td>
<td>cancelled</td>
</tr>
<tr>
<th scope="row">3</th>
<td>ajala joseph</td>
<td>23/04/2020</td>
<td>confirmed</td>
</tr>
</tbody>
</table>
</PageHolder>
);
};
export default DrugRequest;
|
import React, { Component } from 'react'
const ProjectsContext = React.createContext({
projects: [],
archiveProjects: [],
error: null,
darkMode: false,
setError: () => {},
clearError: () => {},
setProjects: () => {},
setArchiveProjects: () => {}
})
export default ProjectsContext
export class ProjectsProvider extends Component {
constructor(props) {
super(props);
const state = {
projects: [],
darkMode: false,
error: null,
};
this.state = state
}
setProjects = projects => {
this.setState({ projects })
}
setArchiveProjects = archiveProjects => {
this.setState({ archiveProjects})
}
setDarkMode = boolean => {
this.setState({ darkMode: boolean })
}
setError = error => {
console.error(error)
this.setState({ error })
}
clearError = () => {
this.setState({ error: null })
}
render() {
const value = {
// values
projects: this.state.projects,
archiveProjects: this.state.archiveProjects,
darkMode: this.state.darkMode,
error: this.state.error,
// methods
setError: this.setError,
clearError: this.clearError,
setProjects: this.setProjects,
setArchiveProjects: this.setArchiveProjects,
setDarkMode: this.setDarkMode
}
return (
<ProjectsContext.Provider value={value}>
{this.props.children}
</ProjectsContext.Provider>
)
}
}
|
const _ = require('lodash')
const bcrypt = require('bcryptjs')
const express = require('express')
const router = express.Router()
const models = require('../models/index')
const l = require('../../../lib')
const requiresCorrectUser = (req, res, next) => {
if (!req.isAuthenticated()) {
return res.status(403).send({error: {app: 'You must be logged in'}})
}
if (req.params.user_id !== req.user.uid.toString()) {
return res.status(403).send({error: {user: {general: 'Not authorized to update this user'}}})
}
next()
}
router.put('/user/:user_id', requiresCorrectUser)
router.put('/pins/:id/save', requiresCorrectUser)
router.get('/pins/:id', async (req, res) => {
let user = await models.User.findOne({where: {uid: req.params.id}})
let pins = await models.Pin.findAll({where: {userId: user.id}})
res.json({status: 'success', message: `Retrieved all pins for ${req.params.id}`, data: pins})
})
router.get('/pins', async (req, res) => {
let pins = await models.Pin.findAll({attributes: ['heading', 'pitch', 'title', 'zoom', 'hex', 'lat', 'lng', 'name']})
res.json({status: 'success', message: 'Retrieved all pins', data: pins})
})
const saveData = (t, entry, id, promises) => {
if (entry.type === 'ADD') {
console.log(`@@@@@@@@@@@@@ ${entry.toString()} and id ${id}`)
var newPromise = models.Pin.create({
name: entry.data.name,
title: entry.data.title,
hex: entry.data.hex,
lat: entry.data.lat,
lng: entry.data.lng,
heading: entry.data.heading,
pitch: entry.data.pitch,
zoom: entry.data.zoom,
uid: entry.data.uid,
userId: id
}, {transaction: t})
promises.push(newPromise)
} else if (entry.type === 'SET') {
models.Pin.update({
name: entry.data.name,
title: entry.data.title,
hex: entry.data.hex,
lat: entry.data.lat,
lng: entry.data.lng,
heading: entry.data.heading,
pitch: entry.data.pitch,
zoom: entry.data.zoom
}, { where: {uid: entry.data.uid}, transaction: t })
promises.push(newPromise)
} else if (entry.type === 'DELETE') {
var newPromise = models.Pin.destroy({where: {uid: entry.uid}})
promises.push(newPromise)
}
}
router.post('/pins/:user_id/save', (req, res) => {
return models.sequelize.transaction((t) => {
var promises = []
req.body.map((entry) => {
saveData(t, entry, req.user.id, promises)
})
return Promise.all(promises)
}).then((result) => {
models.Pin
.findAll({where: {userId: req.user.id}})
.then((pins) => {
res.json({status: 'success', message: 'Saved pins', data: pins})
})
}).catch((reason) => {
console.log('****************************')
console.log(reason)
console.log('+++++++++++++++++++++++++++++++++++')
})
})
// Update user
router.put('/user/:user_id', async (req, res) => {
let errors = l.validateFields(req.body, 'update')
if (!_.isEmpty(errors)) {
return res.status(422).send({error: {user: errors}})
}
let user = await models.User.findOne({where: {id: req.user.id}})
let existingEmail = await models.User.findOne({where: {email: req.body.email, id: {not: user.id}}})
if (existingEmail) {
return res.status(422).send({error: {user: {email: 'Email is taken'}}})
}
if (req.body.password) {
bcrypt.genSalt(10, async (err, salt) => {
if (err) return res.status(422).send(err)
bcrypt.hash(req.body.password, salt, async (err, hash) => {
if (err) return res.status(422).send('error hashing')
await user.update({email: req.body.email, password: hash})
res.json({status: 'success', message: 'Succesfully saved user', data: {uid: user.uid, email: user.email}})
})
})
} else {
await user.update({email: req.body.email})
res.json({status: 'success', message: 'Succesfully saved user', data: {uid: user.uid, email: user.email}})
}
})
module.exports = router
|
/*
* Ajax news search
*/
function search() {
var keystring = jQuery('#search').val();
var url = jQuery('#search').data('url');
var csrf = jQuery('#search').data('csrf');
jQuery('#postsList').load(url, {keystring:keystring, csrf:csrf});
}
jQuery(function() {
jQuery('#search').keyup(function(event){
if(event.keyCode == 13) search();
});
jQuery('#searchBtn').click(search);
});
|
import React, { Component } from 'react';
import LoadableWrapped from '../LoadableWrapped';
const Dashboard = LoadableWrapped({
loader: () => import('cps/Dashboard'),
modules: ['cps/Dashboard'],
webpack: () => [require.resolveWeak('cps/Dashboard')],
});
const Hello = LoadableWrapped({
loader: () => import('cps/Hello'),
modules: ['cps/Hello'],
webpack: () => [require.resolveWeak('cps/Hello')],
});
class Detail extends Component {
constructor(props) {
super(props);
this.state = {
dashboard: false,
hello: false,
};
}
handleDashboard = () => {
this.setState({
dashboard: true,
});
}
handleHello = () => {
this.setState({
hello: true,
});
}
render() {
const { dashboard, hello } = this.state;
return (
<div>
<button onClick={this.handleDashboard}>dashboard</button>
<button onClick={this.handleHello}>hello</button>
<hr />
{
dashboard &&
<Dashboard />
}
{
hello &&
<Hello />
}
</div>
);
}
}
export default Detail;
|
"use strict";
exports.__esModule = true;
exports.RuleProcessor = void 0;
var RuleProcessor = /** @class */ (function () {
function RuleProcessor(rule) {
this.id = rule.id;
this.amountNeeded = rule.amountNeeded;
this.strict = rule.strict;
this.discount = rule.discount;
this.applyTo = rule.applyTo;
}
;
RuleProcessor.prototype.apply = function (product, amount) {
if (this.id === product.id) {
if (this.strict) {
if (amount === this.amountNeeded) {
this.applyToMath(product, amount);
}
}
else {
if (amount >= this.amountNeeded) {
this.applyToMath(product, amount);
}
}
}
else {
this.totalCost = product.price * amount;
}
return this.totalCost;
};
;
RuleProcessor.prototype.applyToMath = function (product, amount) {
console.log(this.applyTo, product, amount);
if (this.applyTo === 'single') {
var discountAmount = (product.price * this.discount);
var discountPrice = Math.round(product.price - discountAmount);
this.totalCost = discountPrice * amount;
}
if (this.applyTo === 'total') {
this.totalCost = (product.price * amount) * this.discount;
}
};
;
return RuleProcessor;
}());
exports.RuleProcessor = RuleProcessor;
|
var mongoose = require( 'mongoose' );
var facultySchema = new mongoose.Schema({
firstName: {
type: String,
required: true
},
lastName: {
type: String,
required: true
},
email: {
type: String,
unique: true,
required: true
},
bio: {
type: String,
required: false
},
schedule: {
type: Array,
required: false
},
});
mongoose.model('Faculty', facultySchema);
|
var tarokka = {
"seniordeck": [
{
"name": "Артефакт",
"ally": "Ищите человека, выступающего с обезьяной. Это человек более могущественный, чем кажется.",
"location": "Он рыщет во тьме, где ранее сияли лучи рассвета - в святом месте.",
"image": "img/artifact.png",
"value": "джокер 1",
"suit": " "
},
{
"name": "Зверь",
"ally": "Вервольф затаил ненависть к вашему врагу. Воспользуйтесь этим в свою пользу.",
"location": "Зверь восседает на своём тёмном троне.",
"image": "img/beast.png",
"value": "валет",
"suit": "бубен"
},
{
"name": "А. Сломленный",
"ally": "Ваш величайший союзник будет волшебником. Его разум сломлен, но его заклинания крепки.",
"location": "Он бродит по гробнице того, кому завидовал более всего.",
"image": "img/brokenone.png",
"value": "король",
"suit": "бубен"
},
{
"name": "Б. Сломленный",
"ally": "Я вижу человека веры, чьё сознание висит на волоске. Он потерял кого-то близкого.",
"location": "Он бродит по гробнице того, кому завидовал более всего.",
"image": "img/brokenone.png",
"value": "король",
"suit": "бубен"
},
{
"name": "Тёмный властелин",
"ally": "Ах, худшая из всех правд: Вам придётся встретиться со злом этой земли самим!",
"location": "Он рыщет в глубокой тьме, в том месте, куда он должен возвращаться.",
"image": "img/darklord.png",
"value": "король",
"suit": "пики"
},
{
"name": "А. Донжон",
"ally": "Ищите беспокойного молодого человека, окружённого богатствами и безумием. Его дом - тюрьма.",
"location": "Он бродит по залу костей в тёмных ямах его замка.",
"image": "img/donjon.png",
"value": "король",
"suit": "трефы"
},
{
"name": "Б. Донжон",
"ally": "Ищите девушку, ведомую безумием, запертую в сердце дома её мёртвого отца. Излечение её безумия - ключ к успеху.",
"location": "Он бродит по залу костей в тёмных ямах его замка.",
"image": "img/donjon.png",
"value": "король",
"suit": "трефы"
},
{
"name": "Прорицатель",
"ally": "Ищите сумеречного эльфа, живущего среди Вистани. Он понёс великую потерю и его преследуют тёмные сны. Помогите ему, и он поможет вас в ответ.",
"location": "Он ждёт вас в месте мудрости, тепла и отчаяния. Великие секреты скрыты там.",
"image": "img/seer.png",
"value": "валет",
"suit": "трефы"
},
{
"name": "А. Привидение",
"ally": "Я вижу падшего паладина из падшего рыцарского ордена. Он бродит, будто привидение, в логове мёртвого дракона.",
"location": "Отправляйтесь в гробницу отца.",
"image": "img/ghost.png",
"value": "король",
"suit": "черви"
},
{
"name": "Б. Привидение",
"ally": "Расшевелите дух неуклюжего рыцаря, чья усыпальница лежит глубого внутри замка",
"location": "Отправляйтесь в гробницу отца.",
"image": "img/ghost.png",
"value": "король",
"suit": "черви"
},
{
"name": "Палач",
"ally": "Ищите брата невесты дьявола. Его называют 'младшим', но у него могучая душа.",
"location": "Я вижу тёмную фигуру на балконе, смотрящую вниз на эти измученные земли с кривой ухмылкой.",
"image": "img/executioner.png",
"value": "валет",
"suit": "пики"
},
{
"name": "А. Всадник",
"ally": "Я вижу мертвеца благородного по роду, под охраной собственной вдовы. Верните жизнь в мёртвое тело, и он станет вашим верным союзником.",
"location": "Он бродит в том месте, куда он должен вернуться - месте смерти.",
"image": "img/horseman.png",
"value": "джокер 2",
"suit": " "
},
{
"name": "Б. Всадник",
"ally": "Человек смерти по имени Арригал покинет своего тёмного владыку, чтобы служить вашему делу. Но будьте осторожны! Его душа сгнила.",
"location": "Он бродит в том месте, куда он должен вернуться - месте смерти.",
"image": "img/horseman.png",
"value": "джокер 2",
"suit": " "
},
{
"name": "А. Невинный",
"ally": "Я вижу молодого человека с добрым сердцем. Маменькин сынок! У него сильное тело, но слабый разум. Ищите его в деревне Баровия.",
"location": "Он с тем, чья кровь скрепила его проклятие, брат свечи, которую задули слишком рано.",
"image": "img/innocent.png",
"value": "дама",
"suit": "черви"
},
{
"name": "Б. Невинный",
"ally": "Невеста зла - та, кого вы ищите!",
"location": "Он с тем, чья кровь скрепила его проклятие, брат свечи, которую задули слишком рано.",
"image": "img/innocent.png",
"value": "дама",
"suit": "черви"
},
{
"name": "А. Марионетка",
"ally": "Что за ужас? Я вижу человека, созданного человеком. Не стареющий и одинокий, он бродит в башне замка.",
"location": "Возденьте взгляд свой ввысь. Ищите бьющееся сердце замка. Он ждёт вас рядом с ним.",
"image": "img/marionette.png",
"value": "валет",
"suit": "черви"
},
{
"name": "Б. Марионетка",
"ally": "Ищите человека музыки, человека с двумя головами. Он живёт в месте великого голода и печали.",
"location": "Возденьте взгляд свой ввысь. Ищите бьющееся сердце замка. Он ждёт вас рядом с ним.",
"image": "img/marionette.png",
"value": "валет",
"suit": "черви"
},
{
"name": "Туманы",
"ally": "Вистанка бродит по этой земле в одиночестве, в поисках ментора. Она не остаётся на одном месте подолгу. Ищите её у аббатства Святого Марковия, близ туманов.",
"location": "Карты не видят, где рыщет зло. Туманы скрывают всё!",
"image": "img/mists.png",
"value": "дама",
"suit": "пики"
},
{
"name": "Ворон",
"ally": "Ищите вожака пернатых, что живут среди лозы. Хотя он стар, ему под силу ещё один бой.",
"location": "Ищите у могилы матери.",
"image": "img/raven.png",
"value": "дама",
"suit": "трефы"
},
{
"name": "А. Искуситель",
"ally": "Я вижу дитя - Вистанку. Вы должны поторопиться, ведь её судьба лежит на весах. Найдёте её у озера!",
"location": "Я вижу тайное место - хранилище соблазнов, спрятанное за дамой великой красоты. Зло ждёт наверху своей башни-сокровищницы.",
"image": "img/tempter.png",
"value": "дама",
"suit": "бубен"
},
{
"name": "Б. Искуситель",
"ally": "Я слышу свадебный звон или, быть может, похоронный колокол. Он зовёт в аббатство на склоне горы. Там вы найдёте женщину, что является чем-то большим, нежели просто объединением частей.",
"image": "img/tempter.png",
"value": "дама",
"suit": "бубен"
}
],
"juniordeck": [
{
"name": "Мститель",
"description": "Сокровище находится в драконьем доме, в руках когда-то чистых, а ныне запятнанных.",
"image": "img/avenger.png",
"value": "1",
"suit": "мечи"
},
{
"name": "Паладин",
"description": "Я вижу спящего принца, слугу света и брата тьмы. Сокровище покоится с ним.",
"image": "img/paladin.png",
"value": "2",
"suit": "мечи"
},
{
"name": "Солдат",
"description": "Отправляйтесь в горы. Взберитесь на башню, охраняемую золотыми рыцарями.",
"image": "img/soldier.png",
"value": "3",
"suit": "мечи"
},
{
"name": "Наёмник",
"description": "Искомое лежит с мертвецом, под горами золотых монет.",
"image": "img/mercenary.png",
"value": "4",
"suit": "мечи"
},
{
"name": "Мирмидон",
"description": "Ищите волчье логово в холмах над горным озером. Сокровище принадлежит Матери Ночи.",
"image": "img/myrmidon.png",
"value": "5",
"suit": "мечи"
},
{
"name": "Берсерк",
"description": "Найдите крипту Бешенного Пса. Сокровище внутри, под почерневшими костями.",
"image": "img/berserker.png",
"value": "6",
"suit": "мечи"
},
{
"name": "Сокрытый",
"description": "Я вижу безликого бога. Он ждет вас в конце длинного, извилистого пути, глубоко в горах.",
"image": "img/hoodedone.png",
"value": "7",
"suit": "мечи"
},
{
"name": "Диктатор",
"description": "Я вижу трон под стать королю.",
"image": "img/dictator.png",
"value": "8",
"suit": "мечи"
},
{
"name": "Мучитель",
"description": "Есть город, в котором не всё в порядке. Там вы найдете дом порчи, а внутри темную комнату, полную застывших призраков.",
"image": "img/torturer.png",
"value": "9",
"suit": "мечи"
},
{
"name": "Воин",
"description": "Искомое лежит во чреве тьмы, в логове дьявола: том месте, куда он должен возвращаться.",
"image": "img/warrior.png",
"value": "мастер",
"suit": "мечи"
},
{
"name": "Превращающий",
"description": "Отправляйтесь в места, где голова кружится от высоты, а сами камни - живые!",
"image": "img/transmuter.png",
"value": "1",
"suit": "звёзды"
},
{
"name": "Прорицающий",
"description": "Смотрите на ту, кто видит всё. Сокровище спрятано в её лагере.",
"image": "img/diviner.png",
"value": "2",
"suit": "звёзды"
},
{
"name": "Очарователь",
"description": "Я вижу преклонившую колени женщину - розу великой красоты, сорванную слишком рано. Хозяин топей знает, о ком я говорю.",
"image": "img/enchanter.png",
"value": "3",
"suit": "звёзды"
},
{
"name": "Преграждающий",
"description": "Я вижу павший дом под охраной великого каменного дракона. Ищите на самой верхушке.",
"image": "img/abjurer.png",
"value": "4",
"suit": "звёзды"
},
{
"name": "Элементалист",
"description": "Сокровище спрятано в маленьком замке под горой, охраняемом янтарными гигантами.",
"image": "img/elementalist.png",
"value": "5",
"suit": "звёзды"
},
{
"name": "Воплощающий",
"description": "Обыщите крипту ординарца волшебника. Его посох послужит ключом.",
"image": "img/evoker.png",
"value": "6",
"suit": "звёзды"
},
{
"name": "Иллюзионист",
"description": "Человек не тот, кем кажется. Он прибудет сюда в ярмарочном фургоне. Там и есть то, что вы ищете.",
"image": "img/illusionist.png",
"value": "7",
"suit": "звёзды"
},
{
"name": "Некромант",
"description": "Женщина подвешена над пылающим огнем. Найдите ее и найдете сокровище.",
"image": "img/necromancer.png",
"value": "8",
"suit": "звёзды"
},
{
"name": "Сотворяющий",
"description": "Вижу мёртвую деревню, утопленную ркеой. Там правит та, кто принёс в мир великое зло.",
"image": "img/conjurer.png",
"value": "9",
"suit": "звёзды"
},
{
"name": "Волшебник",
"description": "Ищите башню волшебника на озере. Имя волшебника и его слуга приведут вас к тому, что вы ищите.",
"image": "img/wizard.png",
"value": "мастер",
"suit": "звёзды"
},
{
"name": "Бретёр",
"description": "Я вижу скелет смертоносного воина, лежащего на ложе из камня, с горгульями по сторонам.",
"image": "img/swashbuckler.png",
"value": "1",
"suit": "монеты"
},
{
"name": "Филантроп",
"description": "Ищите место, где взращиваются болезнь и безумие. Сокровище всё ещё там, где дети раньше плакали.",
"image": "img/philanthropist.png",
"value": "2",
"suit": "монеты"
},
{
"name": "Торговец",
"description": "Загляните к винному волшебнику! Сокровище скрывается в дереве и песке.",
"image": "img/trader.png",
"value": "3",
"suit": "монеты"
},
{
"name": "Купец",
"description": "Ищите бочку с некогда лучшим вином, от которого теперь не осталось и капли.",
"image": "img/merchant.png",
"value": "4",
"suit": "монеты"
},
{
"name": "Член гильдии",
"description": "Вижу тёмную комнату, полную бутылей. Это гробница члена гильдии.",
"image": "img/guildmember.png",
"value": "5",
"suit": "монеты"
},
{
"name": "Попрошайка",
"description": "Искомое есть у раненного эльфа. Он расстанется с сокровищем, чтобы увидеть, как воплотятся его темнейшие мечты.",
"image": "img/beggar.png",
"value": "6",
"suit": "монеты"
},
{
"name": "Вор",
"description": "Искомое лежит там, где пересекаются жизнь и смерть, средь похороненных мёртвых.",
"image": "img/thief.png",
"value": "7",
"suit": "монеты"
},
{
"name": "Сборщик податей",
"description": "Искомое находится в руках Вистани. Ключ к получению сокровища у пропавшего ребёнка.",
"image": "img/taxcollector.png",
"value": "8",
"suit": "монеты"
},
{
"name": "Скряга",
"description": "Ищите за пламенем, крепость внутри крепости.",
"image": "img/miser.png",
"value": "9",
"suit": "монеты"
},
{
"name": "Плут",
"description": "Вжиу гнездо воронов. Там вы найдёте свою награду.",
"image": "img/rogue.png",
"value": "мастер",
"suit": "монеты"
},
{
"name": "Монах",
"description": "Сокровище, что вы ищите спрятано за солнцем в доме святого.",
"image": "img/monk.png",
"value": "1",
"suit": "глифы"
},
{
"name": "Миссионер",
"description": "Я вижу сад, запорошенный снегом, за которым присматривает пугало с усмешкой из мешковины. Ищите не сад, а охранника.",
"image": "img/missionary.png",
"value": "2",
"suit": "глифы"
},
{
"name": "Лекарь",
"description": "Ищите на западе водоём, благословлённый светом белого солнца.",
"image": "img/healer.png",
"value": "3",
"suit": "глифы"
},
{
"name": "Пастух",
"description": "Ищите мать, что родила зло.",
"image": "img/shepherd.png",
"value": "4",
"suit": "глифы"
},
{
"name": "Друид",
"description": "Злое дерево растёт на вершине холма из могил, где покоятся древние. Вороны помогут отыскать его. Ищите сокровище там.",
"image": "img/druid.png",
"value": "5",
"suit": "глифы"
},
{
"name": "Анархист",
"description": "Я вижу стены из костей, канделябры из костей и стол из костей - всё, что осталось от врагов давно забытых.",
"image": "img/anarchist.png",
"value": "6",
"suit": "глифы"
},
{
"name": "Шарлатан",
"description": "Я вижу одинокую мельницу, стоящую над пропастью. Сокровище находится внутри.",
"image": "img/charlatan.png",
"value": "7",
"suit": "глифы"
},
{
"name": "Епископ",
"description": "Искомое лежит в груде сокровищ за створками янтарных дверей.",
"image": "img/bishop.png",
"value": "8",
"suit": "глифы"
},
{
"name": "Предатель",
"description": "Ищите богатую женщину. Верный союзник дьявола, она хранит сокровище под замком и ключом, вместе с костями древнего врага.",
"image": "img/traitor.png",
"value": "9",
"suit": "глифы"
},
{
"name": "Священник",
"description": "Вы найдете то, что ищете в замке, среди руин места просьб и мольбы.",
"image": "img/priest.png",
"value": "мастер",
"suit": "глифы"
}
]
};
|
const AdsModel = require('../Models/AdsModel')
const ClientModel = require('../Models/ClientModel')
const DiscountModel = require('../Models/DiscountModel')
const CheckoutModel = require('../Models/CheckoutModel')
const ClientDiscountModel = require('../Models/ClientDiscountModel')
class Checkout {
constructor(){
this.AdsObject = new AdsModel()
this.ClientObject = new ClientModel()
this.DiscountObject = new DiscountModel()
this.CheckoutObject = new CheckoutModel()
this.ClientDiscountObject = new ClientDiscountModel()
}
new = (pricingRule = {}) => {
let res = { status: 'ok'}
res = this._createAds(pricingRule.ads)
if (res.status !== 'error')
res = this._createClients(pricingRule.clients)
if (res.status !== 'error')
res = this._createDiscounts(pricingRule.discounts)
if (res.status !== 'error')
res = this._createClientDiscount(pricingRule.clientDiscount)
return res
}
_createAds = (ads = []) => {
this.AdsObject.flush()
let status = 'ok'
for ( let i = 0 ; i < ads.length ; i +=1 ){
let res = this.AdsObject.create(ads[i])
if (res.status != 'ok')
return {
status: 'error',
error: 'an error happend in creating one of the ads',
additionalError: res.error
}
}
return {
status: 'ok'
}
}
_createClients = (clients = []) => {
this.ClientObject.flush()
let status = 'ok'
for ( let i = 0 ; i < clients.length ; i +=1 ){
let res = this.ClientObject.create({name:clients[i]})
if (res.status != 'ok')
return {
status: 'error',
error: 'an error happend in creating one of the clients',
additionalError: res.error
}
}
return {
status: 'ok'
}
}
_createDiscounts = (discounts = []) => {
let status = 'ok'
for ( let i = 0 ; i < discounts.length ; i +=1 ){
let res = this.DiscountObject.create(discounts[i])
if (res.status != 'ok')
return {
status: 'error',
error: 'an error happend in creating one of the discounts',
additionalError: res.error
}
}
return {
status: 'ok'
}
}
_createClientDiscount = (clientDiscount = []) => {
this.ClientDiscountObject.flush()
let status = 'ok'
for ( let i = 0 ; i < clientDiscount.length ; i +=1 ){
let res = this.ClientDiscountObject.create(clientDiscount[i])
if (res.status != 'ok')
return {
status: 'error',
error: 'an error happend in creating one of the clientDiscount',
additionalError: res.error
}
}
return {
status: 'ok'
}
}
addItem = (data = {}) => {
if (!data.clientName) return 'clientName is not defined'
if (!data.item) return 'item is not defined'
const res = this.CheckoutObject.create({
clientName: data.clientName,
item: data.item
})
if (res.status === 'error')
return res
return {
status: 'ok'
}
}
getTotal = (data = {}) => {
if (!data.clientName) return {
status: 'error',
error: 'client does not exist'
}
const resClientObject = this.ClientObject.find({name:data.clientName})
if (resClientObject.status === 'error')
return {
status: 'error',
error: 'this client does not exist'
}
const checkouts = this.CheckoutObject.list({clientName:data.clientName})
const resOfClientDiscount = this.ClientDiscountObject.find({
clientName: data.clientName
})
let discountNames = []
if (resOfClientDiscount.status === 'ok')
if (resOfClientDiscount.clientDiscount && resOfClientDiscount.clientDiscount.discountNames.length > 0){
discountNames = resOfClientDiscount.clientDiscount.discountNames
}
let discountDetails = []
if (discountNames.length > 0) {
for (let i = 0; i < discountNames.length; i += 1) {
const disResponse = this.DiscountObject.find({name: discountNames[i]})
if (disResponse.status === 'ok') {
discountDetails.push(disResponse.discount)
}
}
}
// Calculating the price withoutDiscount
let checkoutItems = []
for (let i = 0 ; i < checkouts.items.length ; i += 1){
let thisAd = this.AdsObject.find({name: checkouts.items[i].item})
if (thisAd.status === 'ok'){
checkoutItems.push({
clientName: checkouts.items[i].clientName,
item: checkouts.items[i].item,
ads: thisAd.ads
})
}
}
discountDetails.forEach(discountItem => {
if (discountItem.type === 'reduce'){
checkoutItems.map(checkout => {
if (checkout.item === discountItem.adsName){
checkout.ads.price = discountItem.newPrice
return checkout
}
})
}
let freeCheckout = {}
if (discountItem.type === 'more'){
let bought = 0;
checkoutItems.map(checkout => {
if (checkout.item === discountItem.adsName){
bought++
freeCheckout = checkout
return checkout
}
})
const dividedNumber = parseInt(bought / discountItem.bought)
if (dividedNumber >= 1){
const differenceNumber = discountItem.willget - discountItem.bought
for (let d = 0; d < dividedNumber*differenceNumber; d++) {
checkoutItems.push({
clientName: freeCheckout.clientName,
item: freeCheckout.item,
ads: {
price: 0
}
})
}
}
}
if (discountItem.type === 'reduceLimtiedItems'){
let bought = 0;
checkoutItems.map(checkout => {
if (checkout.item === discountItem.adsName){
bought++
freeCheckout = checkout
return checkout
}
})
if (bought >= discountItem.limitedPurchased){
checkoutItems.map(itemRLI => {
if (itemRLI.item === discountItem.adsName){
itemRLI.ads.price = discountItem.newPrice
}
return itemRLI
})
}
}
})
let total = 0
total = checkoutItems.reduce((oldResult = 0, newItem) => {
return Number(oldResult) + Number(newItem.ads.price)
}, 0)
return {
status: 'ok',
total: total
}
}
}
module.exports = Checkout
|
import React from "react";
import { Grid, Row, Col } from "react-bootstrap";
const Vehicle = ({ vehicle, isFetching }) => {
if (isFetching) {
return (
<Grid>
<Row>
<Col md={12}>
<span className="img-loader" />
</Col>
</Row>
</Grid>
);
}
return (
<Grid>
<h1>Vehicle: {vehicle.name}</h1>
<Row>
<Col md={12}>
<h3>Model: {vehicle.model}</h3>
<h3>Manufacturer: {vehicle.manufacturer}</h3>
<h3>Cost (in Credits): {vehicle.cost_in_credits}</h3>
</Col>
</Row>
</Grid>
);
};
export default Vehicle;
|
import React from "react";
import Slider from "rc-slider";
import "rc-slider/assets/index.css";
import './style.css'
const { createSliderWithTooltip } = Slider;
const Range = createSliderWithTooltip(Slider.Range);
const ItemRange = React.memo(
({ min, max, data = [null, null], handleChange, name, title, step, marks }) => {
const handleChangeInput = (e, index) => {
let newValue;
if (index === 0) {
newValue = [e.target.value, data[1]];
} else {
newValue = [data[0], e.target.value];
}
handleChange && handleChange({ [name]: newValue });
};
const style = {
height: 5,
width: 5,
backgroundColor: '#bbb',
borderRadius: '50%',
display: 'inline-block',
color: 'transparent'
}
// const marks = {
// 0: {
// label: '0',
// style
// },
// 5000000: {
// label: '1',
// style
// },
// 10000000: {
// label: '2',
// style
// },
// 15000000: {
// label: '3',
// style
// },
// 20000000: {
// label: '4',
// style
// }
// }
return (
<div>
<p>{title}</p>
<Range
min={min}
max={max}
step={step}
defaultValue={data}
value={data}
dots={true}
marks={marks}
tipFormatter={(value) => `${value}đ`}
onChange={(value) => handleChange && handleChange({ [name]: value })}
/>
<div className="count-inputs">
<input
type="number"
value={data[0]}
onChange={(e) => handleChangeInput(e, 0)}
/>
<span> to </span>
<input
type="number"
value={data[1]}
onChange={(e) => handleChangeInput(e, 1)}
/>
</div>
</div>
);
}
);
export default ItemRange;
|
// OBJETO TOTAL
// var personaLitaral = {
// nombre: "Jose literal",
// apellido: "vasquez",
// edad: 20,
// saluda: function () {
// return "Hola soy " + this.nombre;
// }
// }
// console.log (personaLitaral.saluda())
// };
// // FUNCION CONSTRUCTORA
// var Persona = function (nombre, apellido, age) {
// this.nombre = nombre;
// this.apellido = apellido;
// this.age = age;
// this.saluda = function (nombre2) {
// console.log("hola " + nombre2 + " soy " + this.nombre);
// };
// };
// Persona.prototype.age = 0;
// Persona.prototype.growUp = function (age) {
// return this.age += age
// }
// var jhon = new Persona("Jhon", "Arias");
// console.log(jhon.growUp(11));
// console.log(jhon.growUp(3));
// // function printObject(obj) {
// // for (var key in obj) {
// // console.log (key + ": " + obj[key]);
// // }
// // }
// // var carProperties = {
// // brand: "Toyota",
// // model: "2016",
// // cc: 150,
// // velocidadInicial: 0,
// // velocidadActual: 0;
// // accelerate: function () {
// // return velocidadActual= this.velocidad * 0.34%;
// // }
// // }
// // var Car = function name(params) {
// // }
// //Funcion que return par o impar
// // var isPar = function (number) {
// // if (number < 0) {
// // number = Math.abs(number);
// // }
// // if (number === 0){
// // return true;
// // } else if (number === 1) {
// // return false;
// // } else {
// // number = number - 2;
// // return isPar(number);
// // }
// // }
// // console.log(isPar(20))
// // // Funcion que sume los elementos de un array
// // var array_sum = function (my_array) {
// // if (my_array.length === 1) {
// // return my_array[0];
// // } else {
// // return my_array.pop() + array_sum(my_array);
// // }
// // };
// function compose(a, b) {
// return b(a());
// }
// var greet = function () {
// return "Bienvenidos";
// };
// var yell = function (str) {
// return str.toUpperCase() + "!";
// };
// console.log(compose(greet, yell));
// var maria = {
// nombre: "Terah",
// edad: 32,
// altura: 1.70,
// peso: 60,
// colorPelo: "cafe",
// hijos: {
// german: {
// nombre: "German"
// }
// },
// bmi: function () {
// return this.peso / (this.altura * this.altura)
// },
// }
// console.log(maria.bmi())
|
import React, { Component } from 'react';
import { connect } from 'react-redux'
import RaisedButton from 'material-ui/RaisedButton';
import IconButton from 'material-ui/IconButton';
import AutoSearch from '../core/AutoSearch';
import FlatButton from 'material-ui/FlatButton';
import ContentAdd from 'material-ui/svg-icons/content/add';
import { loadContacts, loadContact, addContact } from '../../actions/contact.action';
import './styles.css';
export class ContactsComponent extends Component {
constructor(props) {
super(props);
this.props.dispatch(loadContacts());
}
addContact() {
this.props.dispatch(addContact());
}
loadContact(id){
this.props.dispatch(loadContact(id));
}
makeEditButton(contact) {
return (
<div>
<RaisedButton
className="edit-button-contacts"
label="Edit"
secondary={true}
onTouchTap={this.loadContact.bind(this, contact._id)} />
<IconButton iconClassName="muidocs-icon-action-home"
onTouchTap={this.loadContact.bind(this, contact._id)} />
</div>
);
}
renderTable() {
// return makeTable(
// this.props.contacts,
// [ 'forPerson.givenName', 'title', 'atOrganization', 'email', 'startDate', 'endDate', 'mobile', 'action'],
// this.makeEditButton.bind(this)
// );
}
render() {
return (
<div className='contacts-container'>
<div className='contacts-header'>
<AutoSearch type="contact" />
<FlatButton
label="Add Contact"
labelPosition="before"
primary={true}
icon={<ContentAdd
style={{
background: 'rgb(249, 117, 36)',
fill: 'white',
borderRadius: '50%',
width: '30px',
height: '30px'
}}
/>}
onTouchTap={this.addContact.bind(this)}
style={{
float: 'right',
}}
labelStyle={{
fontSize: '25px',
textTransform: 'unset',
color: 'rgb(249, 117, 36)'
}}
/>
</div>
<br />
{this.renderTable()}
<div className="table-buffer"></div>
</div>
)
}
}
const mapStateToProps = (state, props) => {
return {
contact: state.contactReducer.contact,
contacts: state.contactReducer.contacts
}
};
export default connect(mapStateToProps)(ContactsComponent);
|
import { Meteor } from 'meteor/meteor';
import { withTracker } from 'meteor/react-meteor-data';
import { Groups } from '../../../api/groups/groups';
import GroupsList from '../GroupsList/GroupsList';
export default MyGroupsContainer = withTracker(() => {
const sub$ = Meteor.subscribe('groups.getOwnGroups');
return {
groups: Groups.find().fetch(),
onPublishStop: sub$.stop,
};
})(GroupsList);
|
import core from './ui.tree_list.core';
import { filterRowModule } from '../grid_core/ui.grid_core.filter_row';
core.registerModule('filterRow', filterRowModule);
|
import {HeaderControlsLiner} from "../common/headerControlsLiner";
import {HeaderControlsSVG} from "../common/headerControlsSVG";
export const PlayTrackSVG = () => {
return <HeaderControlsLiner>
<HeaderControlsSVG
xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20"
stroke="currentColor"
><path fillRule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM9.555 7.168A1 1 0 008 8v4a1 1 0 001.555.832l3-2a1 1 0 000-1.664l-3-2z" clipRule="evenodd" />
</HeaderControlsSVG>
</HeaderControlsLiner>
}
|
'use strict';
angular.module('AdProcmt').controller('prcmtOrderShowCtlr',['$scope','ProcmtUtils','PrcmtOrderState','PrcmtDeliveryState','genericResource','$routeParams','$location','$q','fileExtractor',function($scope,ProcmtUtils,PrcmtOrderState,PrcmtDeliveryState,genericResource,$routeParams,$location,$q,fileExtractor){
var self = this ;
$scope.prcmtOrderShowCtlr = self;
self.prcmtOrderHolder = {
prcmtProcOrder:{},
poItems:[]
};
self.prcmtOrderItemHolder = {};
self.error = "";
self.loadArticlesByNameLike = findArticleByName;
self.loadArticlesByCipLike = findArticleByCip;
self.loading = true;
self.onSelect = onSelect;
self.save = save;
self.close = close;
self.addItem = addItem;
self.editItem = editItem;
self.deleteItem = deleteItem;
self.selectedIndex;
self.selectedItem;
self.totalAmountEntered = 0;
self.closeStatus = false;
self.show = false;
self.showMore = showMore;
self.showLess = showLess;
self.loadstkSection = loadstkSection;
self.loadOrgUnit = loadOrgUnit;
self.loadBusinessPartner = loadBusinessPartner;
self.poItemsDeleted = [];
self.transform = transform;
self.handlePrintRequestEvent =handlePrintRequestEvent;
self.running ="";
load();
function load(){
self.prcmtOrderHolder = PrcmtOrderState.getOrderHolder();
if(self.prcmtOrderHolder.prcmtProcOrder.poStatus=='INITIATED' || self.prcmtOrderHolder.prcmtProcOrder.poStatus=='ONGOING'){
self.closeStatus = true;
}
};
function loadOrgUnit(val){
return loadOrgUnitPromise(val).then(function(entitySearchResult){
return entitySearchResult.resultList;
})
}
function loadOrgUnitPromise(val){
var searchInput = {
entity:{},
fieldNames:[],
start: 0,
max: 10
};
if(val){
searchInput.entity.identif='hs';
searchInput.entity.fullName = val+'%';
searchInput.fieldNames.push('fullName');
}
var deferred = $q.defer();
genericResource.findByLike(ProcmtUtils.orgunits,searchInput).success(function (entitySearchResult) {
deferred.resolve(entitySearchResult);
}).error(function(){
deferred.reject("No organisation unit");
});
return deferred.promise;
}
function loadstkSection(val){
return loadstkSectionPromise(val).then(function(entitySearchResult){
return entitySearchResult.resultList;
})
}
function loadstkSectionPromise(val){
var searchInput = {
entity:{},
fieldNames:[],
start: 0,
max: 10
};
var deferred = $q.defer();
genericResource.findByLike(ProcmtUtils.stkSection,searchInput).success(function (entitySearchResult) {
deferred.resolve(entitySearchResult);
}).error(function(){
deferred.reject("No section unit");
});
return deferred.promise;
}
function loadBusinessPartner(val){
return loadBusinessPartnerPromise(val).then(function(entitySearchResult){
return entitySearchResult.resultList;
})
}
function loadBusinessPartnerPromise(businessPartnerName){
var searchInput = {
entity:{},
fieldNames:[],
start: 0,
max: 10
};
if(businessPartnerName){
searchInput.entity.cpnyName = businessPartnerName+'%';
searchInput.fieldNames.push('cpnyName');
}
var deferred = $q.defer();
genericResource.findByLike(ProcmtUtils.adbnsptnr,searchInput).success(function (entitySearchResult) {
deferred.resolve(entitySearchResult);
}).error(function(){
deferred.reject("No Manufacturer/Supplier");
});
return deferred.promise;
}
function findArticleByName (value) {
return findArticle('artName',value);
}
function findArticleByCip (value) {
return findArticle('artPic',value);
}
function findArticle(variableName, variableValue){
return genericResource.findByLikePromissed(ProcmtUtils.stkArtlot2strgsctnsUrlBase, variableName, variableValue)
.then(function (entitySearchResult) {
var resultList = entitySearchResult.resultList;
var displayDatas = [];
angular.forEach(resultList,function(item){
var artName = item.artName;
var displayable = {};
var sectionArticleLot = item.sectionArticleLot;
if(sectionArticleLot) {
var artQties = sectionArticleLot.artQties;
if(!artQties) artQties = [];
angular.forEach(artQties, function(artQty){
var displayableStr = "";
displayable.artName = artName;
displayableStr = artQty.artPic
displayableStr += " - "+artName;
if(artQty.lotPic) {
displayable.lotPic = artQty.lotPic;
}
if(artQty.section) {
displayable.section = artQty.section;
displayableStr += " - "+artQty.section;
}
if(artQty.stockQty) {
displayable.stockQty = artQty.stockQty;
displayableStr += " - Qty ("+artQty.stockQty+")";
}
displayable.artPic = artQty.artPic;
displayable.sppuPreTax = sectionArticleLot.sppuHT;
displayable.minSppuHT = sectionArticleLot.minSppuHT;
displayable.sppuTaxIncl = sectionArticleLot.sppuTaxIncl;
displayable.sppuCur = sectionArticleLot.sppuCur;
displayable.vatPct = sectionArticleLot.vatPct;
displayable.vatSalesPct = sectionArticleLot.vatSalesPct;
displayable.salesVatAmt = sectionArticleLot.salesVatAmt;
displayable.salesWrntyDys = sectionArticleLot.salesWrntyDys;
displayable.salesRtrnDays = sectionArticleLot.salesRtrnDays;
displayable.pppuPreTax = sectionArticleLot.pppuHT;
displayable.purchWrntyDys = sectionArticleLot.purchWrntyDys;
displayable.purchRtrnDays = sectionArticleLot.purchRtrnDays;
displayable.displayableStr = displayableStr;
displayDatas.push(displayable);
});
}
});
return displayDatas;
});
}
function onSelect(item,model,label){
self.prcmtOrderItemHolder.prcmtPOItem.artPic = item.artPic;
self.prcmtOrderItemHolder.prcmtPOItem.artName = item.artName;
self.prcmtOrderItemHolder.prcmtPOItem.pppuPreTax = item.sppuPreTax;
self.prcmtOrderItemHolder.prcmtPOItem.pppuCur = item.sppuCur;
self.prcmtOrderItemHolder.prcmtPOItem.vatPct = item.vatPct;
self.prcmtOrderItemHolder.prcmtPOItem.stkQtyPreOrder =item.stockQty;
}
/*function save(){
for(var i=0;i<self.poItemsDeleted.length;i++){
self.prcmtOrderHolder.poItems.push(self.poItemsDeleted[i])
}
var start=0;
var max=5;
var prcmtOrderHolderTmp={
prcmtProcOrder:{},
poItems:[]
};
while(start<self.prcmtOrderHolder.poItems.length){
var data = {
prcmtProcOrder:{},
poItems:[]
};
data.prcmtProcOrder = self.prcmtOrderHolder.prcmtProcOrder;
for(var i=start;i<start+max;i++){
if(self.prcmtOrderHolder.poItems[i])
data.poItems.push(self.prcmtOrderHolder.poItems[i]);
}
start +=max;
savePrcmtPromise(data).then(function(result){
prcmtOrderHolderTmp.prcmtProcOrder = result.prcmtProcOrder;
self.prcmtOrderHolder.prcmtProcOrder = result.prcmtProcOrder;//if not javax.persistence.OptimisticLockException, new version always
for(var i=0;i<result.poItems.length;i++){
prcmtOrderHolderTmp.poItems.push(result.poItems[i]);
}
})
}
self.prcmtOrderHolder = prcmtOrderHolderTmp;
}*/
function save(){
self.running ="Veuillez patientez, l'enregistrement se poursuit ...";
for(var i=0;i<self.poItemsDeleted.length;i++){
self.prcmtOrderHolder.poItems.push(self.poItemsDeleted[i])
}
var start=0;
var max=5;
var requests = [];
while(start<self.prcmtOrderHolder.poItems.length){
var data = {
prcmtProcOrder:{},
poItems:[]
};
data.prcmtProcOrder = self.prcmtOrderHolder.prcmtProcOrder;
for(var i=start;i<start+max;i++){
if(self.prcmtOrderHolder.poItems[i])
data.poItems.push(self.prcmtOrderHolder.poItems[i]);
}
start +=max;
var request = genericResource.customMethod(ProcmtUtils.urlManageOrder+'/update',data);
requests.push(request);
}
$q.all(requests).then(function(result) {
var prcmtOrderHolderTmp={
prcmtProcOrder:{},
poItems:[]
};
angular.forEach(result, function(response) {
prcmtOrderHolderTmp.prcmtProcOrder = response.data.prcmtProcOrder;
for(var i=0;i<response.data.poItems.length;i++){
prcmtOrderHolderTmp.poItems.push(response.data.poItems[i]);
}
});
return prcmtOrderHolderTmp;
}).then(function(tmpResult) {
self.running ="";
self.prcmtOrderHolder = tmpResult;
});
}
function close () {
self.running ="Veuillez patientez, l'enregistrement se poursuit ...";
for(var i=0;i<self.poItemsDeleted.length;i++){
self.prcmtOrderHolder.poItems.push(self.poItemsDeleted[i])
}
var start=0;
var max=5;
var requests = [];
while(start<self.prcmtOrderHolder.poItems.length){
var data = {
prcmtProcOrder:{},
poItems:[]
};
data.prcmtProcOrder = self.prcmtOrderHolder.prcmtProcOrder;
for(var i=start;i<start+max;i++){
if(self.prcmtOrderHolder.poItems[i])
data.poItems.push(self.prcmtOrderHolder.poItems[i]);
}
start +=max;
var request = genericResource.customMethod(ProcmtUtils.urlManageOrder+'/close',data);
requests.push(request);
}
$q.all(requests).then(function(result) {
var prcmtOrderHolderTmp={
prcmtProcOrder:{},
poItems:[]
};
angular.forEach(result, function(response) {
prcmtOrderHolderTmp.prcmtProcOrder = response.data.prcmtProcOrder;
for(var i=0;i<response.data.poItems.length;i++){
prcmtOrderHolderTmp.poItems.push(response.data.poItems[i]);
}
});
return prcmtOrderHolderTmp;
}).then(function(tmpResult) {
self.prcmtOrderHolder = tmpResult;
self.closeStatus = false;
self.running ="";
});
}
function transform () {
genericResource.customMethod(ProcmtUtils.urlManageOrder+'/transform',self.prcmtOrderHolder).success(function(data){
PrcmtDeliveryState.setDeliveryHolder(data);
$location.path('/PrcmtDeliverys/addItem');
});
}
function addItem(){
var found = false;
for(var i=0;i<self.prcmtOrderHolder.poItems.length;i++){
if(self.prcmtOrderHolder.poItems[i].prcmtPOItem.artPic==self.prcmtOrderItemHolder.prcmtPOItem.artPic){
self.prcmtOrderHolder.poItems[i].prcmtPOItem.qtyOrdered = parseInt(self.prcmtOrderHolder.poItems[i].prcmtPOItem.qtyOrdered) + parseInt(self.prcmtOrderItemHolder.prcmtPOItem.qtyOrdered);
found = true;
break;
}
}
if(!found){
self.prcmtOrderHolder.poItems.unshift(self.prcmtOrderItemHolder);
}
self.prcmtOrderItemHolder = {};
$('#artName').focus();
}
function deleteItem(index){
var prcmtOrderItemHolderDeleted = {};
angular.copy(self.prcmtOrderHolder.poItems[index],prcmtOrderItemHolderDeleted) ;
self.prcmtOrderHolder.poItems.splice(index,1);
if(prcmtOrderItemHolderDeleted.prcmtPOItem && prcmtOrderItemHolderDeleted.prcmtPOItem.id) {
prcmtOrderItemHolderDeleted.deleted = true;
self.poItemsDeleted.push(prcmtOrderItemHolderDeleted);
}
}
function editItem(index){
angular.copy(self.prcmtOrderHolder.poItems[index],self.prcmtOrderItemHolder) ;
self.prcmtOrderHolder.poItems.splice(index,1);
}
function showMore(){
self.show = true;
}
function showLess(){
self.show = false;
}
function handlePrintRequestEvent() {
genericResource.builfReportGet(ProcmtUtils.urlpoitems+'/orderreport.pdf',self.prcmtOrderHolder.prcmtProcOrder.poNbr).success(function(data){
fileExtractor.extractFile(data,"application/pdf");
}).error(function (error) {
$scope.error = error;
});
}
}]);
|
(function (exports) {
const $M = require('memory');
$M.set_memcheck(true);
function fch(csm) {
const $memcheck_call_push = $M.memcheck_call_push, $memcheck_call_pop = $M.memcheck_call_pop;
$memcheck_call_push('fch', 'derp.ljs', 1, 0);
var a = 0;
var b = 0;
var c = 0;
var t = 0;
a = csm % 10 | 0;
t = 1;
b = csm / 10 | 0;
while (b !== 0) {
c = b % 10 | 0;
if (t === 1) {
c = (c / 5 | 0) + ((c * 2 | 0) % 10 | 0) | 0;
}
b = b / 10 | 0;
a = a + c | 0;
t = !t;
}
a = 10 - (a % 10 | 0) | 0;
var returnval;
if (a === 10) {
returnval = '0';
}
if (t === 1) {
returnval = '0' + ((a & 1 ? a + 9 | 0 : a) / 2 | 0);
}
returnval = '0' + a;
console.log(returnval);
$memcheck_call_pop();
}
}.call(this, typeof exports === 'undefined' ? derp_ljs = {} : exports));
|
var cryptglue_8c =
[
[ "CRYPT_MOD_CALL_CHECK", "cryptglue_8c.html#a69a7f3b98b67a0831a8a5e3fc47d5c93", null ],
[ "CRYPT_MOD_CALL", "cryptglue_8c.html#acaf721ab817757c241a5abd18fc8618b", null ],
[ "crypt_init", "cryptglue_8c.html#aaecf706c319966f9eafd582b58ba531f", null ],
[ "crypt_cleanup", "cryptglue_8c.html#a397940a79b0c75800fed7d264f7fd6b4", null ],
[ "crypt_invoke_message", "cryptglue_8c.html#a166ec08d102f4330fdd0cc44a32bdf96", null ],
[ "crypt_has_module_backend", "cryptglue_8c.html#a07a6c891658dd90ef8333a1e5bbcc285", null ],
[ "crypt_pgp_void_passphrase", "cryptglue_8c.html#ab11bb907cc90bcd3aadecfd0000b5350", null ],
[ "crypt_pgp_valid_passphrase", "cryptglue_8c.html#ad29ef155ee6ccc83b50614068bb5b597", null ],
[ "crypt_pgp_decrypt_mime", "cryptglue_8c.html#aa8e21077ffe83ed3b10dc22acdd6c2e2", null ],
[ "crypt_pgp_application_handler", "cryptglue_8c.html#aaf94d2bf9e0c58d5d8e436397611be27", null ],
[ "crypt_pgp_encrypted_handler", "cryptglue_8c.html#ab8e4063aa85a986a6879cbd45e14096c", null ],
[ "crypt_pgp_invoke_getkeys", "cryptglue_8c.html#a7d989caa27c6539e55662007a6cf2cc5", null ],
[ "crypt_pgp_check_traditional", "cryptglue_8c.html#a23f9a8913c1bdea8fcd8d6d0d24a5f3d", null ],
[ "crypt_pgp_traditional_encryptsign", "cryptglue_8c.html#a52255d60b8d24437af39c9271c9e15c9", null ],
[ "crypt_pgp_make_key_attachment", "cryptglue_8c.html#ac671b1b0cd5df34d49ea749d29df8d3f", null ],
[ "crypt_pgp_find_keys", "cryptglue_8c.html#acc0b640120a1e7459ff7ee4081031848", null ],
[ "crypt_pgp_sign_message", "cryptglue_8c.html#abb7ee2dc3d7dbc1ccb6a4986d9a9c92b", null ],
[ "crypt_pgp_encrypt_message", "cryptglue_8c.html#a8842b530f442565e1c2079172b897867", null ],
[ "crypt_pgp_invoke_import", "cryptglue_8c.html#a842ab48184b60e3b7b206536b7b78a61", null ],
[ "crypt_pgp_verify_one", "cryptglue_8c.html#a9457dc1f6c58f46461c4866e08946b5c", null ],
[ "crypt_pgp_send_menu", "cryptglue_8c.html#a4438b36797bfd5151c51b860f22417a4", null ],
[ "crypt_pgp_extract_key_from_attachment", "cryptglue_8c.html#afa26cebcc0c8d8866129fc2eabdbe874", null ],
[ "crypt_pgp_set_sender", "cryptglue_8c.html#a9f42f50373941a87a03df3424ce1b7c4", null ],
[ "crypt_smime_void_passphrase", "cryptglue_8c.html#a84e2b083debe6ba85cf3deca3e0fe99a", null ],
[ "crypt_smime_valid_passphrase", "cryptglue_8c.html#a82c5ed5b55a8c04d810494995152f10d", null ],
[ "crypt_smime_decrypt_mime", "cryptglue_8c.html#a34e8cf4a9f68adbcd30d41a242ede1e7", null ],
[ "crypt_smime_application_handler", "cryptglue_8c.html#a449d34e46ef8984a0a435909e1c0d7ab", null ],
[ "crypt_smime_getkeys", "cryptglue_8c.html#a3f60f47f4d4dee7f43f502b7244af35f", null ],
[ "crypt_smime_verify_sender", "cryptglue_8c.html#aebb744100faa768a15a3099a9a9b5147", null ],
[ "crypt_smime_find_keys", "cryptglue_8c.html#a57c1bc28957ade858546c243dad15173", null ],
[ "crypt_smime_sign_message", "cryptglue_8c.html#a8a5cfb9361fdcea0c4e35095f0886baa", null ],
[ "crypt_smime_build_smime_entity", "cryptglue_8c.html#a2fe1beb64b690bc9f5f77c910c124a7d", null ],
[ "crypt_smime_invoke_import", "cryptglue_8c.html#a9a62b3e7470b9f9e899a63ebae53b4da", null ],
[ "crypt_smime_verify_one", "cryptglue_8c.html#a805ac5f7d1ad9d7714f01d2e13e8b6be", null ],
[ "crypt_smime_send_menu", "cryptglue_8c.html#ad3d6b0f181d912a4b2ce734c79dcd4eb", null ],
[ "crypt_smime_set_sender", "cryptglue_8c.html#a9f57744c7bcac595aa1a8838f83dc369", null ],
[ "CryptModPgpClassic", "cryptglue_8c.html#a1f7c9dc5fc2564205211bbc38c0e191e", null ],
[ "CryptModSmimeClassic", "cryptglue_8c.html#ae586200df6b40e4d660cca9a505b6b05", null ],
[ "CryptModPgpGpgme", "cryptglue_8c.html#a18a127bb6ba65da242de83f9a996a072", null ],
[ "CryptModSmimeGpgme", "cryptglue_8c.html#a90e492b5253e62d56fc2adbaa7a6120a", null ]
];
|
import React from 'react'
import {AiFillGithub , AiOutlineFundView , AiOutlineFolderView} from 'react-icons/ai'
const View= props => {
return (
<div>
<div className="preview">
<button className="btn-view" >Live Demo</button>
<div className="line">
<h2 className="git_link"><AiFillGithub/></h2>
</div>
<div className="stat">
<h6 >{props.stat}</h6>
<h6 style={{color:'rgba(156, 156, 9, 0.89)'}}>{props.cons}</h6>
<h6 style={{color:'rgba(18, 108, 224, 0.541)'}}>{props.open}</h6>
</div>
</div>
</div>
)
}
export default View ;
|
$(document).ready(function(){
// $('#tgllahir').datepicker({
// autoclose:true,
// dateformat:"dd-mm-yyyy",
// language:"id"
// });
// $(document).on('click', '#cekDataRegistrasi', function(){
// const nik = $('#cekData')
// $('#cekData').on("submit", function(event){
// event.preventDefault();
// });
// $('#nik').prop('readonly', true);
// $('#cekDataRegistrasi').click(function() {
// if($('#nokk').val() == ""){
// alert("Mohon isi No KK Anda");
// $(location).attr('href', 'cekdata.php');
// }else if($('#nik').val() == ""){
// alert("Mohon isi NIK Anda");
// $(location).attr('href', 'cekdata.php');
// }else if($('#nokk').val() !== "" && $('#nik').val() !== ""){
// $(location).attr('href', 'registrasi.php');
// }
// })
// $('#cekData').on("submit", function(event){
// event.preventDefault();
// if($('#nokk').val() == ""){
// alert("Mohon isi No KK Anda");
// } else if($('#nik').val() == ""){
// alert("Mohon isi NIK Anda");
// } else{
// $.ajax({
// url:"registrasi.php",
// method:"POST",
// data:$('#cekData').serialize()
// });
// $(location).attr('href', 'registrasi.php');
// }
// });
// $.ajax({
// url:"select.php",
// method:"POST",
// data:{employee_id:employee_id},
// success:function(data){
// $('#detail_karyawan').html(data);
// $('#dataModal').modal('show');
// }
// });
// });
});
|
import React, { Fragment, useState, useEffect } from "react";
import PropTypes from "prop-types";
import { connect } from "react-redux";
import { editEducation, getCurrentProfile } from "../../actions/profile";
import TextField from "@material-ui/core/TextField";
import { FormControlLabel, Checkbox } from "@material-ui/core";
import moment from "moment";
import { Link } from "react-router-dom";
const EditEducation = ({
profile: { profile, loading },
editEducation,
getCurrentProfile,
history,
match
}) => {
const [education, setEducation] = useState({
school: "",
degree: "",
fieldofstudy: "",
from: "",
to: "",
current: false,
description: "",
disabled: false
});
const [toDateDisabled, toggleDisabled] = useState(false);
useEffect(() => {
getCurrentProfile();
for (let i = 0; i < profile.education.length; i++) {
if (profile.education[i]._id === match.params.id) {
education.id = profile.education[i]._id;
education.school = profile.education[i].school;
education.degree = profile.education[i].degree;
education.fieldofstudy = profile.education[i].fieldofstudy;
education.from = moment(profile.education[i].from).format("YYYY-MM-DD");
education.to = moment(profile.education[i].to).format("YYYY-MM-DD");
education.current = profile.education[i].current;
education.description = profile.education[i].description;
setEducation(education);
}
}
}, [loading, getCurrentProfile]);
const {
school,
degree,
fieldofstudy,
from,
to,
current,
description
} = education;
const onChange = e =>
setEducation({ ...education, [e.target.name]: e.target.value });
const onSubmit = e => {
e.preventDefault();
editEducation(education, education.id, history);
};
return (
<Fragment>
<div>
<h1 className="large text-primary">Update Your Education</h1>
<p className="lead">
<i className="fas fa-user" />{" "}
<span style={{ font: "inherit" }}>
Let's get some information to make your profile stand out
</span>
</p>
<form className="form" onSubmit={e => onSubmit(e)}>
<div className="form-group">
<TextField
label="school"
value={school}
name="school"
onChange={e => onChange(e)}
/>
</div>
<div className="form-group">
<TextField
label="degree"
value={degree}
name="degree"
onChange={e => onChange(e)}
/>
</div>
<div className="form-group">
<TextField
label="fieldofstudy"
value={fieldofstudy}
name="fieldofstudy"
onChange={e => onChange(e)}
/>
</div>
<div className="form-group">
{/* date type */}
<TextField
InputLabelProps={{ shrink: true }}
label="from"
type="date"
value={from}
name="from"
onChange={e => onChange(e)}
/>
</div>
<div className="form-group">
{/* checkbox type */}
<FormControlLabel
control={
<Checkbox
checked={current}
onChange={e => {
setEducation({ ...education, current: !current, to: "" });
toggleDisabled(!toDateDisabled);
}}
value={current}
name="current"
/>
}
label="Current"
/>
</div>
<div className="form-group">
{/* date type */}
<TextField
InputLabelProps={{ shrink: true }}
label="to"
type="date"
value={to}
name="to"
onChange={e => onChange(e)}
disabled={current ? "disabled" : ""}
/>
</div>
<div className="form-group">
{/* textarea type*/}
<TextField
aria-label="Description"
rows={3}
placeholder="Description"
label="description"
value={description}
name="description"
onChange={e => onChange(e)}
/>
</div>
<input type="submit" className="btn btn-primary my-1 submit" />
<Link to="/dashboard" className="btn btn-light my-1">
Go Back
</Link>
</form>
</div>
</Fragment>
);
};
EditEducation.propTypes = {
editEducation: PropTypes.func.isRequired,
getCurrentProfile: PropTypes.func.isRequired,
profile: PropTypes.object.isRequired
};
const mapStateToProps = state => ({
profile: state.profile
});
export default connect(
mapStateToProps,
{ editEducation, getCurrentProfile }
)(EditEducation);
|
// Made up item IDs that I use for items such as the bracers/boots from the Karazhan basement bosses where all the items use the same item id but they have different stats
// But each item in the sim needs to have a unique ID so I just make one up here and use that
const fakeItemIds = {
lurkersCordOfShadowWrath: -1,
lurkersCordOfFireWrath: -2,
lurkersCordOfTheSorcerer: -3,
lurkersCordOfTheInvoker: -4,
ravagersCuffsOfFireWrath: -5,
ravagersCuffsOfTheSorcerer: -6,
ravagersCuffsOfTheInvoker: -7,
glidersBootsOfShadowWrath: -8,
glidersBootsOfFireWrath: -9,
glidersBootsOfTheInvoker: -10,
drakeweaveRaimentOfShadowWrath: -11,
drakeweaveRaimentOfFireWrath: -12,
drakeweaveRaimentOfTheSorcerer: -13,
drakeweaveRaimentOfTheInvoker: -14,
flawlessWandOfShadowWrath: -15,
flawlessWandOfFireWrath: -16,
archmageSlippersOfShadowWrath: -17,
archmageSlippersOfFireWrath: -18,
elementalistBootsOfShadowWrath: -19,
elementalistBootsOfFireWrath: -20,
illidariCloakOfShadowWrath: -21,
illidariCloakOfFireWrath: -22,
ravagersCuffsOfShadowWrath: -23
}
var items = {
head: {
cowlOfGuildan: {
name: "Cowl of Gul'dan",
stamina: 51,
intellect: 43,
meta: 1,
yellow: 1,
socketBonus: {
spellPower: 5
},
spellPower: 74,
hasteRating: 32,
critRating: 36,
id: 34332,
source: "Sunwell Plateau",
phase: 5
},
lightningEtchedSpecs: {
name: "Lightning Etched Specs",
stamina: 47,
meta: 1,
blue: 1,
socketBonus: {
spellPower: 5
},
spellPower: 71,
critRating: 53,
hitRating: 25,
id: 34355,
source: "Engineering",
phase: 5
},
hyperMagnifiedMoonSpecs: {
name: "Hyper-Magnified Moon Specs",
stamina: 40,
intellect: 37,
meta: 1,
blue: 1,
socketBonus:{
spellPower: 5
},
spellPower: 64,
critRating: 54,
id: 35182,
source: "Engineering",
phase: 5
},
darkConjurorsCollar: {
name: "Dark Conjuror's Collar",
stamina: 51,
intellect: 42,
meta: 1,
blue: 1,
socketBonus: {
spellPower: 5
},
spellPower: 75,
hasteRating: 30,
critRating: 38,
id: 34340,
source: 'Sunwell Plateau',
phase: 5
},
coverOfUrsocTheMighty: {
name: "Cover of Ursoc the Mighty",
stamina: 45,
intellect: 41,
spirit: 30,
meta: 1,
red: 1,
socketBonus: {
spellPower: 5
},
critRating: 37,
spellPower: 71,
id: 34403,
source: "Sunwell Plateau",
phase: 5
},
helmOfArcanePurity: {
name: 'Helm of Arcane Purity',
stamina: 51,
intellect: 42,
spirit: 38,
meta: 1,
red: 1,
socketBonus: {
spellPower: 5
},
spellPower: 75,
critRating: 30,
id: 34405,
source: 'Sunwell Plateau',
phase: 5
},
skyshatterHeadGuard: {
name: "Skyshatter Headguard",
stamina: 42,
intellect: 37,
meta: 1,
blue: 1,
socketBonus: {
spellPower: 5
},
spellPower: 62,
critRating: 36,
mp5: 8,
id: 31014,
source: "Mount Hyjal",
phase: 3
},
brutalGladiatorsMailHelm: {
name: "Brutal Gladiator's Mail Helm",
stamina: 74,
intellect: 29,
meta: 1,
red: 1,
socketBonus: {
resilienceRating: 4
},
critRating: 32,
resilienceRating: 32,
spellPower: 55,
id: 35050,
source: "PVP",
phase: 5
},
cataclysmHeadpiece: {
name: "Cataclysm Headpiece",
stamina: 35,
intellect: 28,
meta: 1,
yellow: 1,
socketBonus: {
hitRating: 4
},
hitRating: 18,
critRating: 26,
spellPower: 54,
mp5: 7,
id: 30171,
source: "Serpent Shrine Cavern",
phase: 2
},
gadgetstormGoggles: {
name: "Gadgetstorm Goggles",
stamina: 28,
meta: 1,
blue: 1,
socketBonus: {
spellPower: 5
},
hitRating: 12,
critRating: 40,
spellPower: 55,
id: 32476,
source: "Engineering",
phase: 2
},
magnifiedMoonSpecs: {
name: "Magnified Moon Specs",
stamina: 22,
intellect: 24,
meta: 1,
blue: 1,
socketBonus: {
spellPower: 5
},
critRating: 41,
spellPower: 50,
id: 32480,
source: "Engineering",
phase: 2
},
vengefulGladiatorsMailHelm: {
name: "Vengeful Gladiator's Mail Helm",
stamina: 67,
intellect: 23,
meta: 1,
red: 1,
socketBonus: {
resilienceRating: 4
},
critRating: 26,
resilienceRating: 32,
spellPower: 49,
id: 33713,
source: "PVP",
phase: 3
},
hoodOfHexing: {
name: 'Hood of Hexing',
stamina: 24,
intellect: 33,
red: 1,
yellow: 1,
blue: 1,
socketBonus: {
spellPower: 5
},
spellPower: 56,
hitRating: 31,
critRating: 24,
id: 33453,
source: "Zul'Aman",
phase: 4
},
cowlOfTheIllidariHighlord: {
name: 'Cowl of the Illidari Highlord',
stamina: 33,
intellect: 31,
meta: 1,
blue: 1,
socketBonus: {
spellPower: 5
},
spellPower: 64,
hitRating: 21,
critRating: 47,
id: 32525,
source: 'Black Temple',
phase: 3
},
cycloneFaceguard: {
name: 'Cyclone Faceguard',
stamina: 30,
intellect: 31,
meta: 1,
yellow: 1,
socketBonus: {
spellPower: 5
},
critRating: 25,
spellPower: 39,
mp5: 8,
id: 29035,
source: "Karazhan",
phase: 1
},
mercilessGladiatorsMailHelm: {
name: "Merciless Gladiator's Mail Helm",
stamina: 60,
intellect: 19,
meta: 1,
red: 1,
socketBonus: {
resilienceRating: 4
},
critRating: 22,
resilienceRating: 32,
spellPower: 43,
id: 32011,
source: "PVP",
phase: 2
},
stormMastersHelmet: {
name: "Storm Master's Helmet",
stamina: 24,
intellect: 32,
meta: 1,
blue: 1,
socketBonus: {
critRating: 4
},
critRating: 32,
spellPower: 37,
id: 32086,
source: "50 Badge of Justice - G'eras",
phase: 1
},
maskOfPrimalPower: {
name: "Mask of Primal Power",
stamina: 33,
intellect: 39,
red: 1,
yellow: 1,
blue: 1,
socketBonus: {
spellPower: 5
},
critRating: 30,
spellPower: 46,
id: 33972,
source: "75 Badge of Justice - G'eras",
phase: 4
},
gladiatorsMailHelm: {
name: "Gladiator's Mail Helm",
stamina: 54,
intellect: 15,
meta: 1,
red: 1,
socketBonus: {
resilienceRating: 4
},
critRating: 18,
resilienceRating: 30,
spellPower: 37,
id: 27471,
source: "PVP",
phase: 1
},
exorcistsSilkHood: {
name: "Exorcist's Silk Hood",
stamina: 34,
intellect: 14,
meta: 1,
socketBonus: {
hitRating: 3
},
critRating: 25,
resilienceRating: 14,
spellPower: 29,
id: 28760,
source: "Spirit Shards",
phase: 1
},
exorcistsMailHelm: {
name: "Exorcist's Mail Helm",
stamina: 30,
intellect: 16,
meta: 1,
socketBonus: {
critRating: 3
},
critRating: 24,
resilienceRating: 17,
spellPower: 29,
id: 28758,
source: "Spirit Shards",
phase: 1
},
gnomishPowerGoggles: {
name: "Gnomish Power Goggles",
intellect: 21,
spellPower: 59,
critRating: 28,
id: 23828,
source: "Engineering",
phase: 1
},
grandMarshalsMailHelm: {
name: "Grand Marshal's Mail Helm",
stamina: 36,
intellect: 16,
meta: 1,
red: 1,
socketBonus: {
resilienceRating: 4
},
critRating: 16,
resilienceRating: 16,
spellPower: 23,
id: 28696,
source: "PVP",
phase: 1
},
seersMailHelm: {
name: "Seer's Mail Helm",
stamina: 36,
intellect: 16,
meta: 1,
red: 1,
socketBonus: {
resilienceRating: 4
},
critRating: 16,
resilienceRating: 16,
spellPower: 23,
id: 35388,
source: "Sha'tar - Revered, Vendor",
phase: 1
},
manabindersCowl: {
name: 'Mana-Binders Cowl',
stamina: 38,
intellect: 29,
meta: 1,
yellow: 1,
socketBonus: {
spellPower: 5
},
spellPower: 34,
critRating: 15,
id: 32089,
source: "50 Badge of Justice - G'eras",
phase: 1
},
cowlOfTheGrandEngineer: {
name: 'Cowl of the Grand Engineer',
stamina: 22,
intellect: 27,
yellow: 2,
blue: 1,
socketBonus: {
spellPower: 5
},
spellPower: 53,
hitRating: 16,
critRating: 35,
id: 29986,
source: 'The Eye',
phase: 2
},
collarOfChogall: {
name: "Collar of Cho'gall",
stamina: 42,
intellect: 36,
spellPower: 68,
id: 28804,
source: "Gruul's Lair",
phase: 1
},
unimindHeaddress: {
name: 'Uni-Mind Headdress',
stamina: 31,
intellect: 40,
spellPower: 46,
hitRating: 19,
critRating: 25,
id: 28744,
source: 'Karazhan',
phase: 1
},
wickedWitchsHat: {
name: "Wicked Witch's Hat",
stamina: 38,
intellect: 37,
spellPower: 43,
critRating: 32,
id: 28586,
source: 'Karazhan',
phase: 1
},
spellstrikeHood: {
name: 'Spellstrike Hood',
stamina: 16,
intellect: 12,
red: 1,
blue: 1,
yellow: 1,
socketBonus: {
stamina: 6
},
spellPower: 46,
critRating: 24,
hitRating: 16,
setId: 559,
id: 24266,
source: 'Tailoring',
phase: 1
},
incantersCowl: {
name: "Incanter's Cowl",
stamina: 15,
intellect: 27,
spirit: 17,
meta: 1,
yellow: 1,
socketBonus: {
spirit: 4
},
spellPower: 29,
critRating: 19,
id: 28278,
source: 'The Mechanar',
phase: 1
},
manaEtchedCrown: {
name: 'Mana-Etched Crown',
stamina: 27,
intellect: 20,
meta: 1,
red: 1,
socketBonus: {
resilienceRating: 4
},
spellPower: 34,
spellPen: 15,
setId: 658,
id: 28193,
source: 'Black Morass',
phase: 1
},
hoodOfOblivion: {
name: 'Hood of Oblivion',
stamina: 27,
intellect: 32,
meta: 1,
blue: 1,
socketBonus: {
spellPower: 5
},
spellPower: 40,
setId: 644,
id: 28415,
source: 'Arcatraz',
phase: 1
},
maghariRitualistsHorns: {
name: "Mag'hari Ritualist's Horns (Horde only)",
stamina: 18,
intellect: 16,
spellPower: 50,
critRating: 15,
hitRating: 12,
id: 28169,
source: 'Nagrand Quest (Horde)',
phase: 1
},
mageCollarOfTheFirestorm: {
name: 'Mage-Collar of the Firestorm',
stamina: 32,
intellect: 33,
spellPower: 39,
critRating: 23,
id: 27488,
source: 'Heroic Blood Furnace',
phase: 1
},
evokersHelmetOfSecondSight: {
name: "Evoker's Helmet of Second Sight",
stamina: 12,
intellect: 15,
spirit: 8,
blue: 2,
yellow: 1,
socketBonus: {
spellPower: 5
},
spellPower: 35,
critRating: 24,
id: 31104,
source: 'Shadowmoon Valley Quest',
phase: 1
},
demonfangRitualHelm: {
name: 'Demonfang Ritual Helm',
stamina: 39,
intellect: 30,
spellPower: 36,
hitRating: 19,
id: 27781,
source: 'Heroic Underbog',
phase: 1
},
hydromancersHeadwrap: {
name: "Hydromancer's Headwrap",
stamina: 21,
intellect: 27,
meta: 1,
blue: 1,
socketBonus: {
spellPower: 5
},
spellPower: 33,
id: 28183,
source: 'Steamvaults Quest',
phase: 1
},
headdressOfAlacrity: {
name: 'Headdress of Alacrity',
stamina: 25,
intellect: 33,
spirit: 18,
spellPower: 33,
critRating: 17,
id: 27466,
source: 'Heroic Hellfire Ramparts',
phase: 1
},
},
neck: {
pendantOfSunfire: {
name: 'Pendant of Sunfire',
stamina: 27,
intellect: 19,
yellow: 1,
socketBonus: {
spellPower: 2
},
spellPower: 34,
critRating: 25,
hasteRating: 25,
id: 34359,
source: 'Jewelcrafting',
phase: 5
},
amuletOfUnfetteredMagics: {
name: 'Amulet of Unfettered Magics',
stamina: 24,
intellect: 17,
spellPower: 39,
hasteRating: 32,
hitRating: 15,
id: 34204,
source: 'Sunwell Plateau',
phase: 5
},
sindoreiPendantOfConquest: {
name: "Sin'dorei Pendant of Conquest",
stamina: 18,
intellect: 19,
blue: 1,
socketBonus: {
spellPower: 2
},
spellPower: 34,
critRating: 19,
resilienceRating: 18,
id: 35290,
source: 'Sunwell Plateau',
phase: 5
},
shatteredSunPendantOfAcumen: {
name: 'Shattered Sun Pendant of Acumen',
stamina: 19,
intellect: 18,
spellPower: 37,
id: 34678,
source: 'Shattered Sun Offensive - Exalted',
phase: 5
},
loopOfCursedBones: {
name: 'Loop of Cursed Bones',
stamina: 19,
intellect: 20,
spellPower: 32,
hasteRating: 27,
id: 33466,
source: "Zul'Aman",
phase: 4
},
vindicatorsPendantOfSubjugation: {
name: "Vindicator's Pendant of Subjugation",
stamina: 31,
intellect: 15,
yellow: 1,
socketBonus: {
stamina: 3
},
hasteRating: 21,
resilienceRating: 18,
spellPower: 25,
id: 35319,
source: "PVP",
phase: 3
},
translucentSpellthreadNecklace: {
name: 'Translucent Spellthread Necklace',
spellPower: 46,
critRating: 24,
hitRating: 15,
id: 32349,
source: 'Black Temple',
phase: 3
},
hellfireEncasedPendant: {
name: 'Hellfire-Encased Pendant',
stamina: 16,
intellect: 17,
spirit: 12,
firePower: 51,
critRating: 24,
id: 32589,
source: 'Hyjal Summit & Black Temple',
phase: 3
},
nadinasPendantOfPurity: {
name: "Nadina's Pendant of Purity",
stamina: 16,
intellect: 14,
critRating: 19,
spellPower: 27,
mp5: 8,
id: 32370,
source: 'Black Temple',
phase: 3
},
veteransPendantOfConquest: {
name: "Veteran's Pendant of Conquest",
stamina: 27,
intellect: 12,
yellow: 1,
socketBonus: {
stamina: 3
},
spellPower: 21,
critRating: 18,
resilienceRating: 18,
id: 33067,
source: 'PVP',
phase: 2
},
veteransPendantOfDominance: {
name: "Veteran's Pendant of Dominance",
stamina: 31,
intellect: 16,
yellow: 1,
socketBonus: {
stamina: 3
},
spellPower: 26,
resilienceRating: 18,
id: 33065,
source: 'PVP',
phase: 2
},
theSunKingsTalisman: {
name: "The Sun King's Talisman",
stamina: 22,
intellect: 16,
spellPower: 41,
critRating: 24,
id: 30015,
source: 'The Eye',
phase: 2
},
pendantOfTheLostAges: {
name: 'Pendant of the Lost Ages',
stamina: 27,
intellect: 17,
spellPower: 36,
id: 30008,
source: 'Serpentshrine Cavern',
phase: 2
},
manasurgePendant: {
name: 'Manasurge Pendant',
stamina: 24,
intellect: 22,
spellPower: 28,
id: 29368,
source: '25 Badge of Justice',
phase: 1
},
adornmentOfStolenSouls: {
name: 'Adornment of Stolen Souls',
stamina: 18,
intellect: 20,
spellPower: 28,
critRating: 23,
id: 28762,
source: 'Karazhan',
phase: 1
},
broochOfNaturesMercy: {
name: "Brooch of Nature's Mercy",
intellect: 24,
spirit: 19,
hasteRating: 33,
spellPower: 25,
id: 33281,
source: "Zul'Aman",
phase: 4
},
warpEngineersPrismaticChain: {
name: "Warp Engineer's Prismatic Chain",
stamina: 17,
intellect: 18,
spellPower: 19,
critRating: 16,
id: 28254,
source: 'The Mechanar',
phase: 1
},
hydraFangNecklace: {
name: 'Hydra-fang Necklace',
stamina: 17,
intellect: 16,
spellPower: 19,
hitRating: 16,
id: 27758,
source: 'Heroic Underbog',
phase: 1
},
broochOfHeightenedPotential: {
name: 'Brooch of Heightened Potential',
stamina: 15,
intellect: 14,
spellPower: 22,
critRating: 14,
hitRating: 9,
id: 28134,
source: 'Shadow Labyrinth',
phase: 1
},
broochOfUnquenchableFury: {
name: 'Brooch of Unquenchable Fury',
stamina: 24,
intellect: 21,
spellPower: 26,
hitRating: 15,
id: 28530,
source: 'Karazhan',
phase: 1
},
eyeOfTheNight: {
name: 'Eye of the Night',
critRating: 26,
hitRating: 16,
spellPen: 15,
id: 24116,
source: 'Jewelcrafting BoE',
phase: 1
},
chainOfTheTwilightOwl: {
name: 'Chain of the Twilight Owl',
intellect: 19,
spellPower: 21,
id: 24121,
source: 'Jewelcrafting BoE',
phase: 1
},
luminousPearlsOfInsight: {
name: 'Luminous Pearls of Insight',
intellect: 15,
spellPower: 25,
critRating: 11,
id: 24462,
source: 'The Underbog',
phase: 1
},
charlottesIvy: {
name: "Charlotte's Ivy",
stamina: 18,
intellect: 19,
spirit: 14,
spellPower: 23,
setId: 667,
id: 31338,
source: 'World Drop',
phase: 1
},
natashasEmberNecklace: {
name: "Natasha's Ember Necklace",
intellect: 15,
spellPower: 29,
critRating: 10,
id: 31692,
source: "Blade's Edge Mountains Quest",
phase: 1
},
torcOfTheSethekkProphet: {
name: 'Torc of the Sethekk Prophet',
intellect: 18,
spellPower: 19,
critRating: 21,
id: 29333,
source: 'Sethekk Halls Quest',
phase: 1
},
omorsUnyieldingWill: {
name: "Omor's Unyielding Will",
intellect: 19,
stamina: 19,
spellPower: 25,
id: 27464,
source: 'Heroic Hellfire Ramparts',
phase: 1
},
talismanOfTheBreaker: {
name: 'Talisman of the Breaker',
stamina: 18,
intellect: 17,
spellPower: 23,
id: 29347,
source: 'Heroic Blood Furnace',
phase: 1
},
amuletOfVeknilash: {
name: "Amulet of Vek'nilash",
stamina: 9,
intellect: 5,
spellPower: 27,
critRating: 14,
id: 21608,
source: 'AQ40',
phase: 0
},
gemOfTrappedInnocents: {
name: 'Gem of Trapper Innocents',
stamina: 9,
intellect: 7,
spellPower: 15,
critRating: 28,
id: 23057,
source: 'Naxxramas',
phase: 0
}
},
shoulders: {
amiceOfTheConvoker: {
name: 'Amice of the Convoker',
stamina: 36,
intellect: 28,
red: 1,
yellow: 1,
socketBonus: {
spellPower: 4
},
spellPower: 53,
critRating: 22,
hasteRating: 30,
id: 34210,
source: 'Sunwell Plateau',
phase: 5
},
eruptingEpaulets: {
name: 'Erupting Epaulets',
stamina: 30,
intellect: 30,
yellow: 1,
red: 1,
socketBonus: {
spellPower: 4
},
critRating: 30,
hasteRating: 24,
spellPower: 53,
id: 34390,
source: 'Sunwell Plateau',
phase: 5
},
spauldersOfDevastation: {
name: 'Spaulders of Devastation',
stamina: 27,
intellect: 30,
spirit: 26,
yellow: 1,
red: 1,
socketBonus: {
spellPower: 4
},
hasteRating: 30,
spellPower: 54,
id: 34391,
source: 'Sunwell Plateau',
phase: 5
},
shoulderpadsOfKnowledgesPursuit: {
name: "Shoulderpads of Knowledge's Pursuit",
stamina: 33,
intellect: 33,
spirit: 22,
red: 1,
yellow: 1,
socketBonus: {
spellPower: 4
},
spellPower: 53,
critRating: 26,
id: 34393,
source: 'Sunwell Plateau',
phase: 5
},
felTingedMantle: {
name: 'Fel-Tinged Mantle',
stamina: 18,
intellect: 20,
yellow: 1,
blue: 1,
socketBonus: {
spellPower: 4
},
spellPower: 35,
critRating: 21,
id: 34607,
source: "Heroic Magisters' Terrace",
phase: 5
},
duskhallowMantle: {
name: 'Duskhallow Mantle',
stamina: 12,
intellect: 10,
red: 1,
yellow: 1,
socketBonus: {
spellPower: 4
},
spellPower: 29,
critRating: 24,
id: 34788,
source: "Magisters' Terrace",
phase: 5
},
skyshatterMantle: {
name: 'Skyshatter Mantle',
stamina: 30,
intellect: 31,
blue: 1,
yellow: 1,
socketBonus: {
spellPower: 4
},
hitRating: 11,
critRating: 27,
spellPower: 46,
mp5: 4,
id: 31023,
source: "Black Temple",
phase: 3
},
mantleOfIllIntent: {
name: 'Mantle of Ill Intent',
stamina: 28,
intellect: 24,
spellPower: 40,
hasteRating: 33,
id: 33489,
source: "Zul'Aman",
phase: 4
},
mantleOfNimbleThought: {
name: 'Mantle of Nimble Thought',
stamina: 37,
intellect: 26,
spellPower: 44,
hasteRating: 38,
id: 32587,
source: 'Tailoring',
phase: 3
},
hatefuryMantle: {
name: 'Hatefury Mantle',
stamina: 15,
intellect: 18,
yellow: 1,
blue: 1,
socketBonus: {
critRating: 3
},
spellPower: 55,
spellPen: 23,
critRating: 24,
id: 30884,
source: 'Hyjal Summit',
phase: 3
},
pauldronsOfTheFuriousElements: {
name: 'Pauldrons of the Furious Elements',
stamina: 28,
intellect: 24,
hasteRating: 33,
spellPower: 40,
id: 33970,
source: "Badges of Justice",
phase: 4
},
bloodcursedShoulderpads: {
name: 'Blood-cursed Shoulderpads',
stamina: 25,
intellect: 19,
spellPower: 55,
critRating: 25,
hitRating: 18,
id: 32338,
source: 'Black Temple',
phase: 3
},
cataclysmShoulderpads: {
name: 'Cataclysm Shoulderpads',
stamina: 26,
intellect: 19,
blue: 1,
yellow: 1,
socketBonus: {
critRating: 3
},
critRating: 24,
spellPower: 41,
mp5: 6,
id: 30173,
source: "Tempest Keep",
phase: 2
},
pauldronsOfTribalFury: {
name: 'Pauldrons of Tribal Fury',
stamina: 31,
intellect: 23,
red: 1,
yellow: 1,
socketBonus: {
spellPower: 4
},
hitRating: 26,
spellPower: 39,
id: 33937,
source: "Zul'Aman",
phase: 4
},
mantleOfTheElvenKings: {
name: 'Mantle of the Elven Kings',
stamina: 27,
intellect: 18,
spirit: 17,
spellPower: 39,
critRating: 25,
hitRating: 18,
id: 30024,
source: 'The Eye',
phase: 2
},
illidariShoulderpads: {
name: 'Illidari Shoulderpads',
stamina: 34,
intellect: 23,
yellow: 2,
socketBonus: {
spellPower: 4
},
spellPower: 39,
critRating: 16,
id: 30079,
source: 'Serpentshrine Cavern',
phase: 2
},
cycloneShoulderguards: {
name: 'Cyclone Shoulderguards',
stamina: 28,
intellect: 26,
yellow: 2,
socketBonus: {
spellPower: 4
},
critRating: 12,
spellPower: 36,
id: 29037,
source: "Karazhan",
phase: 1
},
pauldronsOfWildMagic: {
name: 'Pauldrons of Wild Magic',
stamina: 21,
intellect: 28,
critRating: 23,
spellPower: 33,
id: 32078,
source: "Heroic Slave Pens",
phase: 1
},
mantleOfTheMindFlayer: {
name: 'Mantle of the Mind Flayer',
stamina: 33,
intellect: 29,
spellPower: 35,
spellPen: 23,
id: 28726,
source: 'Karazhan',
phase: 1
},
spauldersOfTheTornHeart: {
name: 'Spaulders of the Torn-Heart',
stamina: 10,
intellect: 7,
spirit: 8,
spellPower: 40,
critRating: 18,
id: 30925,
source: 'Shadowmoon Valley Quest',
phase: 1
},
manaSphereShoulderguards: {
name: 'Mana-Sphere Shoulderguards',
stamina: 23,
intellect: 26,
spirit: 17,
spellPower: 29,
id: 28374,
source: 'The Arcatraz',
phase: 1
},
incantersPauldrons: {
name: "Incanter's Pauldrons",
stamina: 24,
intellect: 17,
spirit: 16,
red: 1,
yellow: 1,
socketBonus: {
critRating: 3
},
spellPower: 20,
id: 27738,
source: 'The Steamvaults',
phase: 1
},
manaEtchedSpaulders: {
name: 'Mana-Etched Spaulders',
stamina: 25,
intellect: 17,
yellow: 1,
red: 1,
socketBonus: {
resilienceRating: 3
},
spellPower: 20,
critRating: 16,
setId: 658,
id: 27796,
source: 'Heroic Slave Pens',
phase: 1
},
spauldersOfOblivion: {
name: 'Spaulders of Oblivion',
stamina: 25,
intellect: 17,
blue: 1,
yellow: 1,
socketBonus: {
hitRating: 3
},
spellPower: 29,
setId: 644,
id: 27778,
source: 'Shadow Labyrinth',
phase: 1
},
pauldronsOfArcaneRage: {
name: 'Pauldrons of Arcane Rage',
stamina: 18,
intellect: 18,
spirit: 12,
spellPower: 27,
id: 24024,
source: 'Hellfire Ramparts',
phase: 1
},
mantleOfThreeTerrors: {
name: 'Mantle of Three Terrors',
stamina: 29,
intellect: 25,
spellPower: 29,
hitRating: 12,
id: 27994,
source: 'Black Morass',
phase: 1
},
mindragePauldrons: {
name: 'Mindrage Pauldrons',
stamina: 22,
intellect: 15,
spellPower: 34,
spellPen: 10,
id: 27816,
source: 'Heroic Mana-Tombs',
phase: 1
}
},
back: {
tatteredCapeOfAntonidas: {
name: 'Tattered Cape of Antonidas',
stamina: 25,
intellect: 26,
red: 1,
socketBonus: {
spellPower: 2
},
spellPower: 42,
hasteRating: 32,
id: 34242,
source: 'Sunwell Plateau',
phase: 5
},
cloakOfTheBetrayed: {
name: 'Cloak of the Betrayed',
stamina: 12,
intellect: 12,
yellow: 1,
socketBonus: {
spellPower: 2
},
spellPower: 23,
hitRating: 13,
id: 34792,
source: "Magisters' Terrace",
phase: 5
},
shadowcastersDrape: {
name: "Shadow Caster's Drape",
stamina: 22,
intellect: 20,
spellPower: 27,
hasteRating: 25,
id: 33591,
source: "Zul'Aman",
phase: 4
},
cloakOfTheIllidariCouncil: {
name: 'Cloak of the Illidari Council',
stamina: 24,
intellect: 16,
spellPower: 42,
critRating: 25,
id: 32331,
source: 'Black Temple',
phase: 3
},
shroudOfTheHighborne: {
name: 'Shroud of the Highborne',
stamina: 24,
intellect: 23,
spellPower: 23,
hasteRating: 32,
id: 32524,
source: 'Black Temple',
phase: 3
},
royalCloakOfTheSunstriders: {
name: 'Royal Cloak of the Sunstriders',
stamina: 27,
intellect: 22,
spellPower: 44,
id: 29992,
source: 'The Eye',
phase: 2
},
illidariCloakOfFireWrath: {
name: 'Illidari Cloak of Fire Wrath',
firePower: 47,
displayId: 31201,
id: fakeItemIds.illidariCloakOfFireWrath,
source: 'Netherstorm Rare Spawn',
phase: 1
},
bruteCloakOfTheOgreMagi: {
name: 'Brute Cloak of the Ogre-Magi',
stamina: 18,
intellect: 20,
spellPower: 28,
critRating: 23,
id: 28797,
source: "Gruul's Lair",
phase: 1
},
sethekkOracleCloak: {
name: 'Sethekk Oracle Cloak',
stamina: 18,
intellect: 18,
spellPower: 22,
hitRating: 12,
id: 27981,
source: 'Sethekk Halls',
phase: 1
},
rubyDrapeOfTheMysticant: {
name: 'Ruby Drape of the Mysticant',
stamina: 22,
intellect: 21,
spellPower: 30,
hitRating: 18,
id: 28766,
source: 'Karazhan',
phase: 1
},
cloakOfEntropy: {
name: 'Cloak of Entropy',
intellect: 11,
spellPower: 25,
hitRating: 10,
id: 31140,
source: 'BoE World Drop',
phase: 1
},
babasCloakOfArcanistry: {
name: "Baba's Cloak of Arcanistry",
stamina: 15,
intellect: 15,
spellPower: 22,
critRating: 14,
id: 28269,
source: 'The Mechanar',
phase: 1
},
cloakOfTheBlackVoid: {
name: 'Cloak of the Black Void',
intellect: 11,
spellPower: 35,
id: 24252,
source: 'Tailoring',
phase: 1
},
ancientSpellcloakOfTheHighborne: {
name: 'Ancient Spellcloak of the Highborne',
intellect: 15,
spellPower: 36,
critRating: 19,
id: 30735,
source: 'Doom Lord Kazzak',
phase: 1
},
cloakOfWovenEnergy: {
name: 'Cloak of Woven Energy',
stamina: 6,
intellect: 13,
spirit: 3,
spellPower: 29,
critRating: 6,
id: 29813,
source: 'Netherstorm Quest',
phase: 1
},
shawlOfShiftingProbabilities: {
name: 'Shawl of Shifting Probabilities',
stamina: 18,
intellect: 16,
spellPower: 21,
critRating: 22,
id: 29369,
source: "25 Badge of Justice - G'eras",
phase: 1
},
shadowCloakOfDalaran: {
name: 'Shadow-Cloak of Dalaran',
stamina: 19,
intellect: 18,
spellPower: 36,
id: 28570,
source: 'Karazhan',
phase: 1
},
spellSlingersProtector: {
name: "Spell-slinger's Protector",
stamina: 15,
intellect: 14,
spirit: 9,
spellPower: 16,
critRating: 13,
id: 28030,
source: 'Nagrand Quest',
phase: 1
},
embroideredCapeOfMysteries: {
name: 'Embroidered Cape of Mysteries',
stamina: 18,
intellect: 20,
spellPower: 25,
id: 27485,
source: 'Heroic Blood Furnace',
phase: 1
},
sporeSoakedVaneer: {
name: 'Spore-Soaked Vaneer',
stamina: 15,
intellect: 15,
spellPower: 19,
critRating: 11,
id: 24362,
source: 'Slave Pens',
phase: 1
},
cloakOfTheNecropolis: {
name: 'Cloak of the Necropolis',
stamina: 12,
intellect: 11,
spellPower: 26,
critRating: 14,
hitRating: 8,
id: 23050,
source: 'Naxxramas',
phase: 0
},
cloakOfTheDevoured: {
name: 'Cloak of the Devoured',
stamina: 11,
intellect: 10,
spellPower: 30,
hitRating: 8,
id: 22731,
source: 'AQ40',
phase: 0
}
},
chest: {
tormentedDemonsoulRobes: {
name: "Tormented Demonsoul Robes",
stamina: 39,
intellect: 38,
yellow: 1,
socketBonus: {
spellPower: 2
},
critRating: 50,
spellPower: 62,
id: 34936,
source: "100 Badge of Justice - G'eras",
phase: 5
},
shroudOfTheLorenial: {
name: "Shroud of the Lore`nial",
stamina: 34,
intellect: 35,
spirit: 33,
yellow: 1,
socketBonus: {
spellPower: 2
},
hitRating: 29,
spellPower: 61,
id: 34917,
source: "100 Badge of Justice - G'eras",
phase: 5
},
sunfireRobe: {
name: 'Sunfire Robe',
stamina: 36,
intellect: 34,
red: 3,
socketBonus: {
spellPower: 5
},
spellPower: 71,
critRating: 40,
hasteRating: 40,
id: 34364,
source: 'Tailoring',
phase: 5
},
felConquererRemains: {
name: 'Fel Conquerer Remains',
stamina: 60,
intellect: 41,
red: 1,
yellow: 2,
socketBonus: {
spellPower: 5
},
spellPower: 71,
critRating: 24,
hasteRating: 33,
id: 34232,
source: 'Sunwell Plateau',
phase: 5
},
garmentsOfCrashingShores: {
name: 'Garments of Crashing Shores',
stamina: 48,
intellect: 41,
red: 1,
yellow: 2,
socketBonus: {
spellPower: 5
},
critRating: 25,
hasteRating: 40,
spellPower: 71,
id: 34396,
source: "Sunwell Plateau",
phase: 5
},
robesOfGhostlyHatred: {
name: 'Robes of Ghostly Hatred',
stamina: 39,
intellect: 40,
spirit: 32,
red: 2,
yellow: 1,
socketBonus: {
spellPower: 5
},
spellPower: 71,
critRating: 26,
hasteRating: 27,
id: 34399,
source: 'Sunwell Plateau',
phase: 5
},
scarletSindoreiRobes: {
name: "Scarlet Sin'dorei Robes",
stamina: 31,
intellect: 22,
red: 1,
blue: 1,
yellow: 1,
socketBonus: {
spellPower: 5
},
spellPower: 51,
critRating: 36,
id: 34610,
source: "Heroic Magisters' Terrace",
phase: 5
},
robeOfDepartedSpirits: {
name: 'Robe of Departed Spirits',
stamina: 34,
intellect: 31,
spirit: 30,
spellPower: 54,
hasteRating: 35,
id: 33317,
source: "Zul'Aman",
phase: 4
},
skyshatterBreastplate: {
name: 'Skyshatter Breastplate',
stamina: 42,
intellect: 41,
blue: 1,
yellow: 2,
socketBonus: {
spellPower: 5
},
hitRating: 17,
critRating: 27,
spellPower: 62,
mp5: 7,
id: 31017,
source: "Black Temple",
phase: 3
},
robesOfRhonin: {
name: 'Robes of Rhonin',
stamina: 55,
intellect: 38,
spellPower: 81,
hitRating: 27,
critRating: 24,
id: 30913,
source: 'Hyjal Summit',
phase: 3
},
robeOfTheShadowCouncil: {
name: 'Robe of the Shadow Council',
stamina: 37,
intellect: 36,
spirit: 26,
spellPower: 73,
critRating: 28,
id: 32327,
source: 'Black Temple',
phase: 3
},
robeOfHatefulEchoes: {
name: 'Robe of Hateful Echoes',
stamina: 34,
intellect: 36,
red: 1,
yellow: 2,
socketBonus: {
stamina: 6
},
spellPower: 50,
critRating: 25,
id: 30056,
source: 'Serpentshrine Cavern',
phase: 2
},
vestmentsOfTheSeaWitch: {
name: 'Vestments of the Sea-Witch',
stamina: 28,
intellect: 28,
yellow: 2,
blue: 1,
socketBonus: {
spellPower: 5
},
spellPower: 57,
critRating: 31,
hitRating: 27,
id: 30107,
source: 'Serpentshrine Cavern',
phase: 2
},
cataclysmChestpiece: {
name: 'Cataclysm Chestpiece',
stamina: 37,
intellect: 28,
blue: 1,
yellow: 2,
socketBonus: {
spellPower: 5
},
critRating: 24,
spellPower: 55,
mp5: 10,
id: 30169,
source: "Tempest Keep",
phase: 2
},
drakeweaveRaimentOfFireWrath: {
name: 'Drakeweave Raiment of Fire Wrath',
firePower: 85,
displayId: 31158,
id: fakeItemIds.drakeweaveRaimentOfFireWrath,
source: 'Hemathion - BEM Rare',
phase: 1
},
/* drakeweaveRaimentOfTheSorcerer: {
name: 'Drakeweave Raiment of the Sorcerer',
stamina: 47,
intellect: 32,
spellPower: 37,
displayId: 31158,
id: fakeItemIds.drakeweaveRaimentOfTheSorcerer,
source: 'Hemathion - BEM Rare',
phase: 1
},
drakeweaveRaimentOfTheInvoker: {
name: 'Drakeweave Raiment of the Invoker',
intellect: 32,
spellPower: 37,
critRating: 32,
displayId: 31158,
id: fakeItemIds.drakeweaveRaimentOfTheInvoker,
source: 'Hemathion - BEM Rare',
phase: 1
}, */
netherstrikeBreastplate: {
name: 'Netherstrike Breastplate',
stamina: 34,
intellect: 23,
blue: 2,
yellow: 1,
socketBonus: {
spellPower: 5
},
critRating: 32,
spellPower: 37,
mp5: 8,
id: 29519,
source: "Crafted",
phase: 1
},
windhawkHauberk: {
name: 'Windhawk Hauberk',
stamina: 28,
intellect: 29,
spirit: 29,
blue: 2,
yellow: 1,
socketBonus: {
spellPower: 5
},
critRating: 19,
spellPower: 46,
id: 29522,
source: 'Crafted',
phase: 1
},
cycloneChestguard: {
name: 'Cyclone Chestguard',
stamina: 33,
intellect: 32,
red: 1,
yellow: 1,
blue: 1,
socketBonus: {
hitRating: 4
},
critRating: 20,
spellPower: 39,
mp5: 8,
id: 29033,
source: "Magtheridon's Lair",
phase: 1
},
spellfireRobe: {
name: 'Spellfire Robe',
intellect: 17,
yellow: 1,
blue: 1,
socketBonus: {
stamina: 4
},
firePower: 72,
critRating: 28,
setId: 552,
id: 21848,
source: 'Tailoring',
phase: 1
},
willOfEdwardTheOdd: {
name: 'Will of Edward the Odd',
intellect: 30,
spellPower: 53,
critRating: 30,
id: 31340,
source: 'World Drop',
phase: 1
},
warpInfusedDrape: {
name: 'Warp Infused Drape',
stamina: 27,
intellect: 28,
red: 1,
yellow: 1,
blue: 1,
socketBonus: {
critRating: 4
},
spellPower: 30,
hitRating: 12,
id: 28342,
source: 'The Botanica',
phase: 1
},
bloodfyreRobesOfAnnihilation: {
name: 'Bloodfyre Robes of Annihilation',
stamina: 27,
intellect: 27,
spellPower: 54,
id: 28252,
source: 'The Mechanar',
phase: 1
},
anchoritesRobes: {
name: "Anchorite's Robes",
stamina: 16,
intellect: 38,
spirit: 18,
yellow: 2,
blue: 1,
socketBonus: {
mp5: 2
},
spellPower: 29,
id: 29129,
source: 'The Aldor - Honored',
phase: 1
},
tidefuryChestpiece: {
name: 'Tidefury Chestpiece',
stamina: 28,
intellect: 22,
blue: 1,
yellow: 2,
socketBonus: {
spellPower: 5
},
hitRating: 10,
spellPower: 36,
mp5: 4,
id: 28231,
source: "The Arcatraz",
phase: 1
},
worldfireChestguard: {
name: 'Worldfire Chestguard',
stamina: 33,
intellect: 32,
critRating: 22,
spellPower: 40,
id: 28391,
source: 'The Arcatraz',
phase: 1
},
vermillionRobesOfTheDominant: {
name: 'Vermillion Robes of the Dominant',
stamina: 37,
intellect: 33,
spellPower: 42,
hitRating: 12,
id: 27799,
source: 'The Steamvaults',
phase: 1
},
manaEtchedVestments: {
name: 'Mana-Etched Vestments',
stamina: 25,
intellect: 25,
red: 1,
blue: 1,
yellow: 1,
socketBonus: {
spellPower: 5
},
spellPower: 29,
critRating: 17,
setId: 658,
id: 28191,
source: 'Heroic Old Hillsbrad Foothills',
phase: 1
},
robeOfTheCrimsonOrder: {
name: 'Robe of the Crimson Order',
intellect: 23,
spellPower: 50,
hitRating: 30,
id: 31297,
source: 'BoE World Drop',
phase: 1
},
robeOfTheGreatDarkBeyond: {
name: 'Robe of the Great Dark Beyond',
stamina: 30,
intellect: 25,
spirit: 18,
spellPower: 39,
critRating: 23,
id: 27824,
source: 'Mana-Tombs',
phase: 1
},
robeOfTheElderScribes: {
name: 'Robe of the Elder Scribes',
stamina: 27,
intellect: 29,
spirit: 24,
spellPower: 32,
critRating: 24,
id: 28602,
source: 'Karazhan',
phase: 1
},
robesOfTheAugurer: {
name: 'Robes of the Augurer',
stamina: 18,
intellect: 18,
spirit: 11,
red: 1,
blue: 1,
yellow: 1,
socketBonus: {
critRating: 4
},
spellPower: 28,
id: 24481,
source: 'The Underbog',
phase: 1
},
auchenaiAnchoritesRobe: {
name: "Auchenai Anchorite's Robe",
intellect: 24,
red: 1,
yellow: 2,
socketBonus: {
critRating: 4
},
spellPower: 28,
hitRating: 23,
id: 29341,
source: 'Auchenai Crypts Quest',
phase: 1
},
robeOfOblivion: {
name: 'Robe of Oblivion',
stamina: 30,
intellect: 20,
red: 1,
blue: 1,
yellow: 1,
socketBonus: {
stamina: 6
},
spellPower: 40,
setId: 644,
id: 28232,
source: 'Shadow Labyrinth',
phase: 1
},
incantersRobe: {
name: "Incanter's Robe",
stamina: 24,
intellect: 22,
spirit: 22,
yellow: 2,
red: 1,
socketBonus: {
intellect: 4
},
spellPower: 29,
critRating: 8,
id: 28229,
source: 'Botanica',
phase: 1
},
windchannelersTunicOfTheInvoker: {
name: "Windchanneler's Tunic of the Invoker",
intellect: 33,
spellPower: 38,
critRating: 33,
id: 31554,
source: 'Heroic Mana-Tombs',
phase: 1
},
goldweaveTunic: {
name: 'Goldweave Tunic',
stamina: 13,
intellect: 15,
spirit: 8,
spellPower: 42,
critRating: 14,
id: 28052,
source: 'Hellfire Peninsula Quest',
phase: 1
}
},
bracer: {
skyshatterBands: {
name: 'Skyshatter Bands',
stamina: 15,
intellect: 23,
yellow: 1,
socketBonus: {
spellPower: 2
},
critRating: 28,
hasteRating: 11,
spellPower: 39,
id: 34437,
source: "Sunwell Plateau",
phase: 5
},
bindingsOfRagingFire: {
name: 'Bindings of Raging Fire',
stamina: 9,
intellect: 10,
yellow: 1,
socketBonus: {
spellPower: 2
},
spellPower: 22,
hasteRating: 18,
id: 34697,
source: "Magisters' Terrace",
phase: 5
},
furyOfTheUrsine: {
name: 'Fury of the Ursine',
stamina: 12,
intellect: 17,
spirit: 16,
yellow: 1,
socketBonus: {
spellPower: 2
},
spellPower: 29,
critRating: 17,
id: 33285,
source: "Zul'Aman",
phase: 4
},
bracersOfNimbleThought: {
name: 'Bracers of Nimble Thought',
stamina: 27,
intellect: 20,
spellPower: 34,
hasteRating: 28,
id: 32586,
source: 'Tailoring BoE',
phase: 3
},
focusedManaBindings: {
name: 'Focused Mana Bindings',
stamina: 27,
intellect: 20,
spellPower: 42,
hitRating: 19,
id: 32270,
source: 'Black Temple',
phase: 3
},
cuffsOfDevastation: {
name: 'Cuffs of Devastation',
stamina: 22,
intellect: 20,
spirit: 19,
yellow: 1,
socketBonus: {
stamina: 3
},
spellPower: 34,
critRating: 14,
id: 30870,
source: 'Hyjal Summit',
phase: 3
},
eluniteEmpoweredBracers: {
name: 'Elunite Empowered Bracers',
stamina: 27,
intellect: 22,
hitRating: 19,
spellPower: 34,
mp5: 6,
id: 32351,
source: 'Black Temple',
phase: 3
},
windhawkBracers: {
name: 'Windhawk Bracers',
stamina: 22,
intellect: 17,
spirit: 7,
yellow: 1,
socketBonus: {
intellect: 2
},
critRating: 16,
spellPower: 27,
id: 29523,
source: 'Crafted',
phase: 1
},
armwrapsOfTheKaldoreiProtector: {
name: 'Armwraps of the Kaldorei Protector',
stamina: 19,
intellect: 22,
yellow: 1,
socketBonus: {
spellPower: 2
},
critRating: 20,
spellPower: 26,
id: 33578,
source: "?",
phase: 3
},
bandsOfTheComingStorm: {
name: 'Bands of the Coming Storm',
stamina: 28,
intellect: 28,
critRating: 21,
spellPower: 32,
id: 32259,
source: 'Black Temple',
phase: 3
},
netherStrikeBracers: {
name: 'Netherstrike Bracers',
stamina: 13,
intellect: 13,
yellow: 1,
socketBonus: {
spellPower: 2
},
critRating: 17,
spellPower: 20,
mp5: 6,
id: 29521,
source: 'Crafted',
phase: 1
},
worldsEndBracers: {
name: "World's End Bracers",
stamina: 18,
intellect: 19,
critRating: 17,
spellPower: 22,
id: 27522,
source: "Heroic Blood Furnace",
phase: 1
},
bracersOfMartyrdom: {
name: 'Bracers of Martyrdom',
stamina: 15,
intellect: 20,
spirit: 28,
blue: 1,
socketBonus: {
spellPower: 2
},
spellPower: 22,
id: 30871,
source: 'Hyjal Summit',
phase: 3
},
crystalweaveBracers: {
name: "Crystalweave Bracers",
intellect: 16,
red: 1,
socketBonus: {
spellPower: 2
},
critRating: 12,
spellPower: 23,
id: 32655,
source: "50 Apexis Shards",
phase: 2
},
mindstormWristbands: {
name: 'Mindstorm Wristbands',
stamina: 13,
intellect: 13,
spellPower: 36,
critRating: 23,
id: 29918,
source: 'The Eye',
phase: 2
},
veteransSilkCuffs: {
name: "Veteran's Silk Cuffs",
stamina: 25,
intellect: 18,
yellow: 1,
socketBonus: {
spellPower: 2
},
spellPower: 22,
critRating: 14,
resilienceRating: 13,
id: 32820,
source: 'PVP',
phase: 2
},
crimsonBracersOfGloom: {
name: 'Crimson Bracers of Gloom',
stamina: 18,
intellect: 18,
spellPower: 22,
hitRating: 12,
id: 27462,
source: 'Heroic Hellfire Ramparts',
phase: 1
},
ravagersCuffsOfFireWrath: {
name: "Ravager's Cuffs of Fire Wrath",
firePower: 58,
displayId: 30684,
id: fakeItemIds.ravagersCuffsOfFireWrath,
source: 'Karazhan',
phase: 1
},
ravagersCuffsOfTheSorcerer: {
name: "Ravager's Cuffs of the Sorcerer",
stamina: 32,
intellect: 22,
spellPower: 25,
displayId: 30684,
id: fakeItemIds.ravagersCuffsOfTheSorcerer,
source: 'Karazhan',
phase: 1
},
ravagersCuffsOfTheInvoker: {
name: "Ravager's Cuffs of the Invoker",
intellect: 22,
spellPower: 25,
critRating: 22,
displayId: 30684,
id: fakeItemIds.ravagersCuffsOfTheInvoker,
source: 'Karazhan',
phase: 1
},
illidariBracers: {
name: 'Illidari Bracers of the Invoker',
intellect: 17,
spellPower: 20,
critRating: 17,
id: 31224,
source: 'Ambassador Jerrikar - SMV Rare',
phase: 1
},
marshalsSilkCuffs: {
name: "Marshal's Silk Cuffs",
stamina: 22,
intellect: 17,
yellow: 1,
socketBonus: {
spellPower: 2
},
spellPower: 20,
resilienceRating: 11,
critRating: 12,
id: 29002,
source: 'PVP',
phase: 1
},
harbingerBands: {
name: 'Harbinger Bands',
stamina: 21,
intellect: 21,
spirit: 14,
spellPower: 26,
id: 28477,
source: 'Karazhan',
phase: 1
},
bandsOfNefariousDeeds: {
name: 'Bands of Nefarious Deeds',
stamina: 27,
intellect: 22,
spellPower: 32,
id: 28515,
source: 'Karazhan',
phase: 1
},
arcaniumSignetBands: {
name: 'Arcanium Signet Bands',
stamina: 14,
intellect: 15,
spellPower: 30,
id: 27746,
source: 'Heroic Underbog',
phase: 1
},
bracersOfHavok: {
name: 'Bracers of Havok',
intellect: 12,
yellow: 1,
socketBonus: {
critRating: 2
},
spellPower: 30,
id: 24250,
source: 'Tailoring',
phase: 1
},
shattrathWraps: {
name: 'Shattrath Wraps',
stamina: 15,
intellect: 15,
red: 1,
socketBonus: {
stamina: 3
},
spellPower: 21,
id: 28174,
source: 'Auchindon Quest',
phase: 1
},
arcingBracers: {
name: 'Arcing Bracers',
stamina: 15,
intellect: 15,
spirit: 10,
spellPower: 18,
id: 24392,
source: 'The Blood Furnace',
phase: 1
},
bandsOfNetherkurse: {
name: 'Bands of Netherkurse',
intellect: 18,
spirit: 13,
spellPower: 21,
spellPen: 15,
id: 27517,
source: 'The Shattered Halls',
phase: 1
},
bandsOfNegotion: {
name: 'Bands of Negotion',
stamina: 25,
intellect: 22,
spellPower: 29,
id: 29240,
source: 'Heroic Mana-Tombs',
phase: 1
},
rockfuryBracers: {
name: 'Rockfury Bracers',
stamina: 7,
spellPower: 27,
hitRating: 8,
id: 21186,
source: 'Silithus Quest',
phase: 0
},
},
gloves: {
enslavedDoomguardSoulgrips: {
name: "Enslaved Doomguard Soulgrips",
stamina: 33,
intellect: 27,
yellow: 1,
socketBonus: {
spellPower: 2
},
critRating: 30,
spellPower: 47,
id: 34938,
source: "75 Badge of Justice - G'eras",
phase: 5
},
cataclysmHandgrips: {
name: 'Cataclysm Handgrips',
stamina: 25,
intellect: 27,
hitRating: 19,
critRating: 19,
spellPower: 41,
mp5: 7,
id: 30170,
source: "Serpent Shrine Cavern",
phase: 2
},
gripsOfNaturesWrath: {
name: "Grips of Nature's Wrath",
stamina: 30,
intellect: 27,
red: 1,
yellow: 1,
socketBonus: {
spellPower: 4
},
critRating: 21,
spellPower: 34,
id: 33534,
source: 'Sunwell Plateau',
phase: 5
},
graspOfTheMoonkin: {
name: 'Grasp of the Moonkin',
stamina: 28,
intellect: 30,
hasteRating: 25,
spellPower: 30,
id: 33974,
source: "Zul'Aman",
phase: 4
},
skyshatterGauntlets: {
name: 'Skyshatter Gauntlets',
stamina: 30,
intellect: 31,
yellow: 1,
socketBonus: {
spellPower: 2
},
hitRating: 19,
critRating: 26,
spellPower: 46,
id: 31008,
source: 'Mount Hyjal',
phase: 3
},
tranquilMoonlightWraps: {
name: 'Tranquil Moonlight Wraps',
stamina: 30,
intellect: 28,
spirit: 20,
red: 1,
yellow: 1,
socketBonus: {
spellPower: 4
},
critRating: 30,
spellPower: 50,
id: 34407,
source: 'Sunwell Plateau',
phase: 5
},
gauntletsOfTheAncientShadowmoon: {
name: 'Gauntlets of the Ancient Shadowmoon',
stamina: 30,
intellect: 32,
red: 1,
blue: 1,
socketBonus: {
critRating: 2
},
critRating: 28,
hasteRating: 24,
spellPower: 43,
id: 34350,
source: 'Sunwell Plateau',
phase: 5
},
cycloneHandguards: {
name: 'Cyclone Handguards',
stamina: 26,
intellect: 29,
hitRating: 19,
spellPower: 34,
mp5: 6,
id: 29034,
source: 'Karazhan',
phase: 1
},
spiritwalkerGauntlets: {
name: 'Spiritwalker Gauntlets',
stamina: 38,
intellect: 27,
hasteRating: 37,
spellPower: 28,
id: 32275,
source: 'Black Temple',
phase: 3
},
botanistsGlovesOfGrowth: {
name: "Botanist's Gloves of Growth",
stamina: 22,
intellect: 21,
yellow: 1,
blue: 1,
socketBonus: {
spellPower: 3
},
hasteRating: 37,
spellPower: 28,
id: 32328,
source: 'Black Temple',
phase: 3
},
earthMantleHandwraps: {
name: 'Earth Mantle Handwraps',
stamina: 21,
intellect: 18,
red: 1,
yellow: 1,
socketBonus: {
intellect: 3
},
critRating: 16,
spellPower: 19,
id: 27793,
source: 'The Steamvault',
phase: 1
},
barbedGlovesOfTheSage: {
name: "Barbed Gloves of the Sage",
stamina: 28,
intellect: 30,
spirit: 25,
yellow: 1,
socketBonus: {
spellPower: 2
},
hitRating: 15,
spellPower: 45,
id: 34904,
source: "75 Badge of Justice - G'eras",
phase: 5
},
sunfireHandwraps: {
name: 'Sunfire Handwraps',
stamina: 33,
intellect: 30,
spellPower: 53,
critRating: 37,
id: 34366,
source: 'Tailoring BoE',
phase: 5
},
glovesOfTyrisPower: {
name: "Gloves of Tyri's Power",
stamina: 33,
intellect: 32,
spirit: 27,
red: 1,
yellow: 1,
socketBonus: {
spellPower: 4
},
spellPower: 47,
hasteRating: 36,
id: 34406,
source: 'Sunwell Plateau',
phase: 5
},
handguardsOfDefiledWorlds: {
name: 'Handguards of Defiled Worlds',
stamina: 33,
intellect: 32,
yellow: 1,
red: 1,
socketBonus: {
spellPower: 4
},
spellPower: 47,
hitRating: 27,
hasteRating: 36,
id: 34344,
source: 'Sunwell Plateau',
phase: 5
},
glovesOfArcaneAcuity: {
name: 'Gloves of Arcane Acuity',
stamina: 16,
intellect: 20,
red: 1,
blue: 1,
socketBonus: {
spellPower: 4
},
spellPower: 34,
hitRating: 18,
id: 34808,
source: "Magisters' Terrace",
phase: 5
},
gauntletsOfTheSunKing: {
name: 'Gauntlets of the Sun King',
stamina: 28,
intellect: 29,
spirit: 20,
spellPower: 42,
critRating: 28,
id: 29987,
source: 'The Eye',
phase: 2
},
soulEatersHandwraps: {
name: "Soul-Eater's Handwraps",
stamina: 31,
intellect: 24,
yellow: 1,
blue: 1,
socketBonus: {
spellPower: 4
},
spellPower: 36,
critRating: 21,
id: 28780,
source: "Magtheridon's Lair",
phase: 1
},
handwrapsOfFlowingThought: {
name: 'Handwraps of Flowing Thought',
stamina: 24,
intellect: 22,
spellPower: 35,
hitRating: 14,
yellow: 1,
blue: 1,
socketBonus: {
hitRating: 3
},
id: 28507,
source: 'Karazhan',
phase: 1
},
spellfireGloves: {
name: 'Spellfire Gloves',
intellect: 10,
yellow: 1,
blue: 1,
socketBonus: {
stamina: 4
},
firePower: 50,
critRating: 23,
setId: 552,
id: 21847,
source: 'Tailoring',
phase: 1
},
glovesOfTheDeadwatcher: {
name: 'Gloves of the Deadwatcher',
stamina: 24,
intellect: 24,
spellPower: 29,
hitRating: 18,
id: 27493,
source: 'Heroic Auchenai Crypts',
phase: 1
},
glovesOfPandemonium: {
name: 'Gloves of Pandemonium',
intellect: 15,
spellPower: 25,
critRating: 22,
hitRating: 10,
id: 31149,
source: 'BoE World Drop',
phase: 1
},
angerSparkGloves: {
name: 'Anger-Spark Gloves',
red: 2,
socketBonus: {
critRating: 3
},
spellPower: 30,
critRating: 25,
hitRating: 20,
id: 30725,
source: 'Doomwalker',
phase: 1
},
manasparkGloves: {
name: 'Manaspark Gloves',
stamina: 14,
intellect: 14,
spirit: 10,
red: 1,
yellow: 1,
socketBonus: {
critRating: 3
},
spellPower: 16,
hitRating: 15,
id: 24450,
source: 'The Underbog',
phase: 1
},
manaEtchedGloves: {
name: 'Mana-Etched Gloves',
stamina: 25,
intellect: 17,
red: 1,
yellow: 1,
socketBonus: {
resilienceRating: 1
},
spellPower: 20,
critRating: 16,
setId: 658,
id: 27465,
source: 'Heroic Hellfire Ramparts',
phase: 1
},
glovesOfOblivion: {
name: 'Gloves of Oblivion',
stamina: 33,
intellect: 21,
spellPower: 26,
hitRating: 20,
setId: 644,
id: 27537,
source: 'Shattered Halls',
phase: 1
},
tempestsTouch: {
name: "Tempest's Touch",
stamina: 10,
intellect: 20,
spirit: 6,
blue: 2,
socketBonus: {
critRating: 3
},
spellPower: 27,
spellPen: 9,
id: 29317,
source: 'Caverns of Time Quest',
phase: 1
},
gripsOfTheVoid: {
name: 'Grips of the Void',
stamina: 18,
intellect: 11,
spellPower: 35,
critRating: 10,
id: 30930,
source: 'Shadowmoon Valley Quest',
phase: 1
},
energistArmwraps: {
name: 'Energist Armwraps',
stamina: 27,
intellect: 26,
spellPower: 34,
id: 28317,
source: 'The Botanica',
phase: 1
},
incantersGloves: {
name: "Incanter's Gloves",
stamina: 21,
intellect: 24,
spirit: 12,
spellPower: 29,
critRating: 14,
id: 27508,
source: 'The Steamvaults',
phase: 1
},
handsOfTheSun: {
name: 'Hands of the Sun',
stamina: 22,
intellect: 23,
firePower: 34,
critRating: 21,
id: 27764,
source: 'Heroic Underbog',
phase: 1
},
darkStormGauntlets: {
name: 'Dark Storm Gauntlets',
stamina: 19,
intellect: 15,
spellPower: 37,
hitRating: 8,
id: 21585,
source: 'AQ40',
phase: 0
},
},
belt: {
aftershockWaistguard: {
name: "Aftershock Waistguard",
stamina: 27,
intellect: 27,
yellow: 1,
socketBonus: {
stamina: 3
},
hasteRating: 34,
spellPower: 47,
id: 34935,
source: "75 Badge of Justice - G'eras",
phase: 5
},
beltOfTheMalefic: {
name: 'Belt of the Malefic',
stamina: 25,
intellect: 29,
yellow: 1,
socketBonus: {
spellPower: 2
},
spellPower: 50,
hasteRating: 29,
critRating: 20,
hitRating: 20,
setId: 670,
id: 34541,
source: 'Sunwell Plateau',
phase: 5
},
anetheronsNoose: {
name: "Anetheron's Noose",
stamina: 22,
intellect: 23,
yellow: 1,
blue: 1,
socketBonus: {
spellPower: 4
},
spellPower: 55,
critRating: 24,
id: 30888,
source: 'Hyjal Summit',
phase: 3
},
waistwrapOfInfinity: {
name: 'Waistwrap of Infinity',
stamina: 31,
intellect: 22,
spellPower: 56,
hasteRating: 32,
id: 32256,
source: 'Black Temple',
phase: 3
},
angelistasSash: {
name: "Angelista's Sash",
stamina: 29,
intellect: 30,
spellPower: 28,
hasteRating: 37,
id: 30895,
source: 'Hyjal Summit',
phase: 3
},
veteransSilkBelt: {
name: "Veteran's Silk Belt",
stamina: 39,
intellect: 27,
spellPower: 32,
resilienceRating: 26,
critRating: 27,
id: 32807,
source: 'PVP',
phase: 2
},
veteransDreadweaveBelt: {
name: "Veteran's Dreadweave Belt",
stamina: 45,
intellect: 30,
spellPower: 36,
resilienceRating: 31,
id: 32799,
source: 'PVP',
phase: 2
},
beltOfBlasting: {
name: 'Belt of Blasting',
spellPower: 50,
hitRating: 23,
critRating: 30,
blue: 1,
yellow: 1,
socketBonus: {
spellPower: 4
},
id: 30038,
source: 'Tailoring',
phase: 2
},
cordOfScreamingTerrors: {
name: 'Cord of Screaming Terrors',
stamina: 34,
intellect: 15,
yellow: 2,
socketBonus: {
stamina: 4
},
spellPower: 50,
hitRating: 24,
id: 30064,
source: 'Serpentshrine Cavern',
phase: 2
},
fireCordOfTheMagus: {
name: 'Fire-Cord of the Magus',
stamina: 21,
intellect: 23,
firePower: 60,
critRating: 30,
id: 30020,
source: 'The Eye',
phase: 2
},
sashOfSealedFate: {
name: 'Sash of Sealed Fate',
intellect: 15,
spellPower: 35,
critRating: 23,
id: 31283,
source: 'World Drop',
phase: 1
},
lurkersCordOfFireWrath: {
name: "Lurker's Cord of Fire Wrath",
firePower: 78,
displayId: 30675,
id: fakeItemIds.lurkersCordOfFireWrath,
source: 'Karazhan',
phase: 1
},
lurkersCordOfTheSorcerer: {
name: "Lurker's Cord of the Sorcerer",
stamina: 43,
intellect: 29,
spellPower: 34,
displayId: 30675,
id: fakeItemIds.lurkersCordOfTheSorcerer,
source: 'Karazhan',
phase: 1
},
lurkersCordOfTheInvoker: {
name: "Lurker's Cord of the Invoker",
intellect: 28,
spellPower: 33,
critRating: 28,
displayId: 30675,
id: fakeItemIds.lurkersCordOfTheInvoker,
source: 'Karazhan',
phase: 1
},
nethershardGirdle: {
name: 'Nethershard Girdle',
stamina: 22,
intellect: 30,
spirit: 22,
spellPower: 35,
id: 28565,
source: 'Karazhan',
phase: 1
},
beltOfDivineInspiration: {
name: 'Belt of Divine Inspiration',
stamina: 27,
intellect: 26,
yellow: 1,
blue: 1,
socketBonus: {
spellPower: 4
},
spellPower: 43,
id: 28799,
source: "Gruul's Lair",
phase: 1
},
maleficGirdle: {
name: 'Malefic Girdle',
stamina: 27,
intellect: 26,
spellPower: 37,
critRating: 21,
id: 28654,
source: 'Karazhan',
phase: 1
},
infernoWaistCord: {
name: 'Inferno Waist Cord',
intellect: 18,
firePower: 59,
critRating: 24,
id: 30673,
source: 'Karazhan',
phase: 1
},
spellfireBelt: {
name: 'Spellfire Belt',
intellect: 18,
yellow: 1,
blue: 1,
socketBonus: {
stamina: 4
},
firePower: 50,
critRating: 18,
setId: 552,
id: 21846,
source: 'Tailoring',
phase: 1
},
girdleOfRuination: {
name: 'Girdle of Ruination',
stamina: 18,
intellect: 13,
red: 1,
yellow: 1,
socketBonus: {
stamina: 4
},
spellPower: 39,
critRating: 20,
id: 24256,
source: 'Tailoring',
phase: 1
},
sashOfSerpentra: {
name: 'Sash of Serpentra',
stamina: 31,
intellect: 21,
spellPower: 25,
hitRating: 17,
id: 27795,
source: 'Steamvaults',
phase: 1
},
marshalsSilkBelt: {
name: "Marshal's Silk Belt",
stamina: 33,
intellect: 22,
spellPower: 28,
critRating: 24,
resilienceRating: 24,
id: 29001,
source: 'PVP',
phase: 1
},
marshalsDreadweaveBelt: {
name: "Marshal's Dreadweave Belt",
stamina: 39,
intellect: 27,
spellPower: 32,
resilienceRating: 27,
id: 28980,
source: 'PVP',
phase: 1
},
beltOfDepravity: {
name: 'Belt of Depravity',
stamina: 31,
intellect: 27,
spellPower: 34,
hitRating: 17,
id: 29241,
source: 'Heroic Arcatraz',
phase: 1
},
mageFuryGirdle: {
name: 'Mage-Fury Girdle',
stamina: 22,
intellect: 23,
spellPower: 28,
critRating: 20,
id: 27742,
source: 'Heroic Slave Pens',
phase: 1
},
glyphLinedSash: {
name: 'Glyph-Lined Sash',
stamina: 21,
intellect: 23,
yellow: 2,
socketBonus: {
spellPower: 4
},
spellPower: 30,
critRating: 9,
id: 27843,
source: 'Heroic Mana-Tombs',
phase: 1
},
adalsGift: {
name: "A'dal's Gift",
intellect: 25,
spellPower: 34,
critRating: 21,
id: 31461,
source: 'Tempest Keep Quest',
phase: 1
},
oracleBeltOfTimelessMystery: {
name: 'Orcale Belt of Timeless Mystery',
stamina: 22,
intellect: 24,
spirit: 17,
spellPower: 29,
id: 27768,
source: 'Heroic Underbog',
phase: 1
},
mindfireWaistband: {
name: 'Mindfire Waistband',
stamina: 10,
intellect: 14,
spirit: 8,
yellow: 1,
blue: 1,
socketBonus: {
hitRating: 3
},
spellPower: 21,
critRating: 11,
id: 24395,
source: 'The Blood Furnace',
phase: 1
},
consortiumPrincesWrap: {
name: "Consortium Prince's Wrap",
spellPower: 30,
spellPen: 20,
critRating: 22,
id: 29328,
source: 'Mana Tombs',
phase: 1
},
sashOfArcaneVisions: {
name: 'Sash of Arcane Visions',
stamina: 18,
intellect: 23,
spirit: 19,
spellPower: 28,
critRating: 22,
id: 29257,
source: 'Heroic Auchenai Crypts',
phase: 1
},
eyestalkWaistCord: {
name: 'Eyestalk Waist Cord',
stamina: 10,
intellect: 9,
spellPower: 41,
critRating: 14,
id: 22730,
source: 'AQ40',
phase: 0
},
plagueheartBelt: {
name: 'Plagueheart Belt',
stamina: 23,
intellect: 12,
spellPower: 34,
critRating: 14,
setId: 529,
id: 22510,
source: 'Naxxramas',
phase: 0
}
},
legs: {
legwrapsOfSwelteringFlame: {
name: "Legwraps of Sweltering Flame",
stamina: 37,
intellect: 36,
spirit: 30,
yellow: 1,
blue: 1,
socketBonus: {
spellPower: 4
},
hitRating: 25,
spellPower: 63,
id: 34918,
source: "100 Badge of Justice - G'eras",
phase: 5
},
corruptedSoulclothPantaloons: {
name: "Corrupted Soulcloth Pantaloons",
stamina: 37,
intellect: 33,
yellow: 1,
blue: 1,
socketBonus: {
spellPower: 4
},
critRating: 43,
spellPower: 62,
id: 32937,
source: "100 Badge of Justice - G'eras",
phase: 5
},
pantaloonsOfGrowingStrife: {
name: 'Pantaloons of Growing Strife',
stamina: 29,
intellect: 36,
spirit: 25,
red: 1,
yellow: 2,
socketBonus: {
spellPower: 5
},
spellPower: 71,
hasteRating: 42,
id: 34386,
source: 'Sunwell Plateau',
phase: 5
},
leggingsOfCalamity: {
name: 'Leggings of Calamity',
stamina: 48,
intellect: 41,
red: 2,
yellow: 1,
socketBonus: {
spellPower: 5
},
spellPower: 71,
hasteRating: 32,
critRating: 33,
id: 34181,
source: 'Sunwell Plateau',
phase: 5
},
leggingsOfChanneledElements: {
name: 'Legs of Channeled Elements',
stamina: 25,
intellect: 28,
spirit: 28,
yellow: 2,
blue: 1,
socketBonus: {
spellPower: 5
},
spellPower: 59,
hitRating: 18,
critRating: 34,
id: 30916,
source: 'Hyjal Summit',
phase: 3
},
leggingsOfDevastation: {
name: 'Leggings of Devastation',
stamina: 40,
intellect: 42,
yellow: 2,
blue: 1,
socketBonus: {
spellPower: 3
},
spellPower: 60,
hitRating: 26,
id: 32367,
source: 'Black Temple',
phase: 3
},
leggingsOfTheMalefic: {
name: 'Leggings of the Malefic',
stamina: 55,
intellect: 44,
yellow: 1,
socketBonus: {
hitRating: 2
},
spellPower: 62,
critRating: 37,
hitRating: 19,
setId: 670,
id: 31053,
source: 'Black Temple',
phase: 3
},
mercilessGladiatorsFelweaveTrousers: {
name: "Merciless Gladiator's Felweave Trousers",
stamina: 60,
intellect: 20,
spellPower: 49,
critRating: 29,
resilienceRating: 30,
source: 'PVP',
id: 31983,
setId: 615,
phase: 2
},
mercilessGladiatorsDreadweaveLeggings: {
name: "Merciless Gladiator's Dreadweave Trousers",
stamina: 69,
intellect: 27,
spellPower: 53,
resilienceRating: 33,
source: 'PVP',
id: 31975,
setId: 568,
phase: 2
},
leggingsOfTheCorruptor: {
name: 'Leggings of the Corruptor',
stamina: 48,
intellect: 32,
yellow: 1,
socketBonus: {
stamina: 3
},
spellPower: 55,
hitRating: 24,
critRating: 32,
setId: 646,
id: 30213,
source: 'Serpentshrine Cavern',
phase: 2
},
trousersOfTheAstromancer: {
name: 'Trousers of the Astromancer',
stamina: 33,
intellect: 36,
spirit: 22,
blue: 2,
yellow: 1,
socketBonus: {
spellPower: 5
},
spellPower: 54,
id: 29972,
source: 'The Eye',
phase: 2
},
voidheartLeggings: {
name: 'Voidheart Leggings',
stamina: 42,
intellect: 38,
spellPower: 49,
critRating: 25,
hitRating: 17,
setId: 645,
id: 28966,
source: "Gruul's Lair",
phase: 1
},
spellstrikePants: {
name: 'Spellstrike Pants',
stamina: 12,
intellect: 8,
blue: 1,
red: 1,
yellow: 1,
socketBonus: {
stamina: 6
},
spellPower: 46,
critRating: 26,
hitRating: 22,
setId: 559,
id: 24262,
source: 'Tailoring',
phase: 1
},
gladiatorsFelweaveTrousers: {
name: "Gladiator's Felweave Trousers",
stamina: 54,
intellect: 25,
spellPower: 42,
resilienceRating: 30,
critRating: 28,
setId: 615,
id: 30201,
source: 'PVP',
phase: 1
},
gladiatorsDreadweaveLeggings: {
name: "Gladiator's Dreadweave Leggings",
stamina: 60,
intellect: 30,
spellPower: 49,
resilienceRating: 30,
id: 24555,
setId: 568,
source: 'PVP',
phase: 1
},
leggingsOfTheSeventhCircle: {
name: 'Leggings of the Seventh Circle',
intellect: 22,
red: 1,
yellow: 2,
socketBonus: {
spellPower: 5
},
spellPower: 50,
critRating: 25,
hitRating: 18,
id: 30734,
source: 'Doom Lord Kazzak',
phase: 1
},
devilStitchedLegs: {
name: 'Devil-Stitched Legs',
stamina: 32,
intellect: 28,
red: 1,
yellow: 1,
blue: 1,
socketBonus: {
spellPower: 5
},
spellPower: 29,
id: 28338,
source: 'The Botanica',
phase: 1
},
princelyReignLeggings: {
name: 'Princely Reign Leggings',
stamina: 18,
intellect: 28,
spirit: 12,
spellPower: 33,
hitRating: 18,
id: 24359,
source: 'Slave Pens',
phase: 1
},
aransSorcerousSlacks: {
name: "Aran's Sorcerous Slacks",
stamina: 29,
intellect: 28,
red: 1,
blue: 1,
yellow: 1,
socketBonus: {
spellPower: 5
},
spellPower: 23,
critRating: 21,
id: 28212,
source: 'Heroic Old Hillsbrad Foothills',
phase: 1
},
leggingsOfTheSkettisElite: {
name: 'Leggings of the Skettis Elite',
intellect: 33,
spirit: 33,
spellPower: 39,
id: 30836,
source: 'Lower City - Revered',
phase: 1
},
trialFireTrousers: {
name: 'Trial-Fire Trousers',
stamina: 42,
intellect: 40,
yellow: 3,
socketBonus: {
spellPower: 5
},
spellPower: 49,
id: 28594,
source: 'Karazhan',
phase: 1
},
breechesOfTheOccultist: {
name: 'Breeches of the Occulist',
stamina: 37,
intellect: 22,
yellow: 2,
blue: 1,
socketBonus: {
spellPower: 5
},
spellPower: 36,
critRating: 23,
id: 30531,
source: 'Heroic Black Morass',
phase: 1
},
stormreaverShadowKilt: {
name: 'Stormreaver Shadow-Kilt',
stamina: 19,
intellect: 26,
spirit: 14,
spellPower: 30,
critRating: 25,
id: 27418,
source: 'Old Hillsbrad Foothills',
phase: 1
},
trousersOfOblivion: {
name: 'Trousers of Oblivion',
stamina: 42,
intellect: 33,
spellPower: 39,
hitRating: 12,
setId: 644,
id: 27948,
source: 'Sethekk Halls',
phase: 1
},
pantaloonsOfFlamingWrath: {
name: 'Pantaloons of Flaming Wrath',
intellect: 28,
spellPower: 33,
critRating: 42,
id: 30709,
source: 'The Shattered Halls',
phase: 1
},
khadgarsKiltOfAbjuration: {
name: "Khadgar's Kilt of Abjuration",
stamina: 20,
intellect: 22,
spirit: 15,
blue: 2,
yellow: 1,
socketBonus: {
spellPower: 5
},
spellPower: 36,
id: 28185,
source: 'Black Morass',
phase: 1
},
manaEtchedPantaloons: {
name: 'Mana-Etched Pantaloons',
stamina: 34,
intellect: 32,
spellPower: 33,
critRating: 21,
spellPen: 18,
setId: 658,
id: 27907,
source: 'Heroic Underbog',
phase: 1
},
kirinTorMastersTrousers: {
name: "Kirin Tor Master's Trousers",
stamina: 27,
intellect: 29,
spirit: 25,
red: 1,
blue: 1,
yellow: 1,
socketBonus: {
hitRating: 4
},
spellPower: 36,
id: 30532,
source: 'Heroic Shadow Labyrinth',
phase: 1
},
incantersTrousers: {
name: "Incanter's Trousers",
stamina: 25,
intellect: 30,
spirit: 17,
spellPower: 42,
critRating: 18,
id: 27838,
source: 'Sethekk Halls',
phase: 1
},
deadlyBorerLeggings: {
name: 'Deadly Borer Leggings',
stamina: 21,
intellect: 23,
spirit: 15,
spellPower: 27,
critRating: 22,
id: 25711,
source: 'The Blood Furnace Quest',
phase: 1
},
leggingsOfPolarity: {
name: 'Leggings of Polarity',
stamina: 20,
intellect: 14,
spellPower: 44,
critRating: 28,
id: 23070,
source: 'Naxxramas',
phase: 0
},
plagueheartLeggings: {
name: 'Plagueheart Leggings',
stamina: 30,
intellect: 25,
spellPower: 37,
critRating: 14,
spellPen: 10,
setId: 529,
id: 22505,
source: 'Naxxramas',
phase: 0
}
},
boots: {
bootsOfIncantations: {
name: "Boots of Incantations",
stamina: 37,
intellect: 26,
spirit: 23,
yellow: 1,
socketBonus: {
spellPower: 2
},
hitRating: 17,
spellPower: 48,
id: 34919,
source: "75 Badge of Justice - G'eras",
phase: 5
},
bootsOfTheMalefic: {
name: 'Boots of the Malefic',
stamina: 24,
intellect: 26,
yellow: 1,
socketBonus: {
spellPower: 2
},
spellPower: 50,
hasteRating: 29,
critRating: 16,
hitRating: 28,
setId: 670,
id: 34564,
source: 'Sunwell Plateau',
phase: 5
},
footpadsOfMadness: {
name: 'Footpads of Madness',
stamina: 25,
intellect: 22,
spellPower: 50,
hasteRating: 25,
id: 33357,
source: "Zul'Aman",
phase: 4
},
blueSuedeShoes: {
name: 'Blue Suede Shoes',
stamina: 37,
intellect: 32,
spellPower: 56,
hitRating: 18,
id: 30894,
source: 'Hyjal Summit',
phase: 3
},
slippersOfTheSeacaller: {
name: 'Slippers of the Seacaller',
stamina: 25,
intellect: 18,
spirit: 18,
yellow: 1,
blue: 1,
socketBonus: {
spellPower: 4
},
spellPower: 44,
critRating: 29,
id: 32239,
source: 'Black Temple',
phase: 3
},
veteransSilkFootguards: {
name: "Veteran's Silk Footguards",
stamina: 39,
intellect: 27,
spellPower: 32,
resilienceRating: 26,
critRating: 27,
id: 32795,
source: 'PVP',
phase: 2
},
veteransDreadweaveStalkers: {
name: "Veteran's Dreadweave Stalkers",
stamina: 45,
intellect: 30,
spellPower: 36,
resilienceRating: 31,
id: 32787,
source: 'PVP',
phase: 2
},
velvetBootsOfTheGuardian: {
name: 'Velvet Boots of the Guardian',
stamina: 21,
intellect: 21,
spirit: 15,
spellPower: 49,
critRating: 24,
id: 30067,
source: 'Serpentshrine Cavern',
phase: 2
},
bootsOfBlasting: {
name: 'Boots of Blasting',
stamina: 25,
intellect: 25,
spellPower: 39,
hitRating: 18,
critRating: 25,
id: 30037,
source: 'Tailoring',
phase: 2
},
glidersBootsOfFireWrath: {
name: "Glider's Boots of Fire Wrath",
firePower: 78,
displayId: 30680,
id: fakeItemIds.glidersBootsOfFireWrath,
source: 'Karazhan',
phase: 1
},
glidersBootsOfTheInvoker: {
name: "Glider's Boots of the Invoker",
intellect: 28,
spellPower: 33,
critRating: 28,
displayId: 30680,
id: fakeItemIds.glidersBootsOfTheInvoker,
source: 'Karazhan',
phase: 1
},
elementalistBootsOfFireWrath: {
name: 'Elementalist Boots of Fire Wrath',
firePower: 60,
id: fakeItemIds.elementalistBootsOfFireWrath,
displayId: 24686,
source: 'World Drop',
phase: 1
},
archmageSlippersOfFireWrath: {
name: 'Archmage Slippers of Fire Wrath',
firePower: 58,
id: fakeItemIds.archmageSlippersOfFireWrath,
displayId: 24678,
source: 'World Drop',
phase: 1
},
bootsOfBlasphemy: {
name: 'Boots of Blaphemy',
stamina: 36,
intellect: 29,
spellPower: 36,
id: 29242,
source: 'Heroic Slave Pens',
phase: 1
},
bootsOfForetelling: {
name: 'Boots of Foretelling',
stamina: 27,
intellect: 23,
red: 1,
yellow: 1,
socketBonus: {
intellect: 3
},
spellPower: 26,
critRating: 19,
id: 28517,
source: 'Karazhan',
phase: 1
},
bootsOfTheInfernalCoven: {
name: 'Boots of the Infernal Coven',
stamina: 27,
intellect: 27,
spirit: 23,
spellPower: 34,
id: 28670,
source: 'Karazhan',
phase: 1
},
rubySlippers: {
name: 'Ruby Slippers',
stamina: 33,
intellect: 29,
spellPower: 35,
hitRating: 16,
id: 28585,
source: 'Karazhan',
phase: 1
},
marshalsSilkFootguards: {
name: "Marshal's Silk Footguards",
stamina: 33,
intellect: 23,
spellPower: 28,
resilienceRating: 24,
critRating: 24,
id: 29003,
source: 'PVP',
phase: 1
},
marshalsDreadweaveStalkers: {
name: "Marshal's Dreadweave Stalkers",
stamina: 40,
intellect: 27,
spellPower: 32,
resilienceRating: 27,
id: 28982,
source: 'PVP',
phase: 1
},
shattrathJumpers: {
name: 'Shattrath Jumpers',
stamina: 25,
intellect: 17,
blue: 1,
yellow: 1,
socketBonus: {
intellect: 3
},
spellPower: 29,
id: 28179,
source: 'Auchindon Quest',
phase: 1
},
bootsOfEtherealManipulation: {
name: 'Boots of Ethereal Manipulation',
stamina: 27,
intellect: 27,
spirit: 21,
spellPower: 33,
id: 29258,
source: 'Heroic Botanica',
phase: 1
},
sigilLacedBoots: {
name: 'Sigil-Laced Boots',
stamina: 24,
intellect: 18,
red: 1,
yellow: 1,
socketBonus: {
intellect: 3
},
spellPower: 20,
critRating: 17,
id: 28406,
source: 'The Arcatraz',
phase: 1
},
extravagantBootsOfMalice: {
name: 'Extravagant Boots of Malice',
stamina: 27,
intellect: 24,
spellPower: 30,
hitRating: 14,
id: 27821,
source: 'Heroic Mana-Tombs',
phase: 1
},
embroideredSpellpyreBoots: {
name: 'Embroidered Spellpyre Boots',
stamina: 21,
intellect: 21,
spellPower: 41,
id: 27848,
source: 'Heroic Blood Furnace',
phase: 1
},
bootsOfTheNexusWarden: {
name: 'Boots of the Nexus Warden',
stamina: 27,
intellect: 17,
spellPower: 21,
hitRating: 18,
id: 30519,
source: 'Netherstorm Quest',
phase: 1
},
etherealBootsOfTheSkystrider: {
name: 'Ethereal Boots of the Skyrider',
stamina: 19,
intellect: 19,
spirit: 12,
spellPower: 26,
critRating: 17,
id: 25957,
source: 'Mana-Tombs',
phase: 1
},
silentSlippersOfMeditation: {
name: 'Silent Slippers of Meditation',
stamina: 24,
intellect: 25,
spirit: 21,
spellPower: 26,
id: 27902,
source: 'Shadow Labyrinth',
phase: 1
},
slippersOfSerenity: {
name: 'Slippers of Serenity',
stamina: 10,
intellect: 22,
spirit: 15,
red: 1,
blue: 2,
socketBonus: {
resilienceRating: 3
},
spellPower: 12,
id: 27411,
source: 'Auchenai Crypts',
phase: 1
},
plagueheartSandals: {
name: 'Plagueheart Sandals',
stamina: 20,
intellect: 16,
spellPower: 32,
critRating: 14,
setId: 529,
id: 22508,
source: 'Naxxramas',
phase: 0
}
},
ring: {
fusedNethergonBand: {
name: "Fused Nethergon Band",
stamina: 27,
intellect: 19,
hitRating: 28,
spellPower: 36,
id: 34889,
source: "60 Badge of Justice - G'eras",
phase: 5
},
loopOfForgedPower: {
name: 'Loop of Forged Power',
stamina: 27,
intellect: 28,
spellPower: 34,
hitRating: 19,
hasteRating: 30,
unique: true,
id: 34362,
source: 'Jewelcrafting BoE',
phase: 5
},
ringOfOmnipotence: {
name: 'Ring of Omnipotence',
stamina: 21,
intellect: 14,
spellPower: 40,
critRating: 22,
hasteRating: 31,
unique: true,
id: 34230,
source: 'Sunwell Plateau',
phase: 5
},
sindoreiBandOfDominance: {
name: "Sin'dorei Band of Dominance",
stamina: 22,
intellect: 15,
spellPower: 34,
critRating: 28,
resilienceRating: 15,
unique: true,
id: 35282,
source: 'Sunwell Plateau',
phase: 5
},
bandOfArcaneAlactrity: {
name: 'Band of Arcane Alacrity',
stamina: 18,
intellect: 12,
spellPower: 22,
hasteRating: 18,
unique: true,
id: 34704,
source: "Magisters' Terrace",
phase: 5
},
signetOfAncientMagics: {
name: 'Signet of Ancient Magics',
stamina: 12,
intellect: 17,
blue: 1,
socketBonus: {
spellPower: 2
},
spellPower: 29,
mp5: 5,
unique: true,
id: 33293,
source: "Zul'Aman",
phase: 4
},
manaAttunedBand: {
name: 'Mana Attuned Band',
intellect: 19,
spellPower: 34,
hitRating: 18,
hasteRating: 29,
unique: true,
id: 33497,
source: "Zul'Aman",
phase: 4
},
ringOfCapturedStorms: {
name: 'Ring of Captured Storms',
spellPower: 42,
critRating: 29,
hitRating: 19,
unique: true,
id: 32247,
source: 'Black Temple',
phase: 3
},
ringOfAncientKnowledge: {
name: 'Ring of Ancient Knowledge',
stamina: 30,
intellect: 20,
spellPower: 39,
hasteRating: 31,
id: 32527,
source: 'Black Temple',
phase: 3
},
blessedBandOfKarabor: {
name: 'Blessed Band of Karabor',
stamina: 20,
intellect: 20,
spellPower: 25,
hasteRating: 30,
mp5: 6,
unique: true,
id: 32528,
source: 'Black Temple',
phase: 3
},
bandOfTheEternalSage: {
name: 'Band of the Eternal Sage',
stamina: 28,
intellect: 25,
spellPower: 34,
critRating: 24,
unique: true,
id: 29305,
source: 'The Scale of the Sands - Exalted',
phase: 3
},
bandOfEternityRevered: {
name: 'Band of Eternity (Revered)',
stamina: 28,
intellect: 25,
spellPower: 34,
critRating: 24,
unique: true,
id: 29304,
source: 'The Scale of the Sands - Revered',
phase: 3
},
bandOfEternityHonored: {
name: 'Band of Eternity (Honored)',
stamina: 25,
intellect: 23,
spellPower: 32,
critRating: 22,
unique: true,
id: 29303,
source: 'The Scale of the Sands - Honored',
phase: 3
},
bandOfEternityFriendly: {
name: 'Band of Eternity (Friendly)',
stamina: 24,
intellect: 22,
spellPower: 29,
critRating: 21,
unique: true,
id: 29302,
source: 'The Scale of the Sands - Friendly',
phase: 2
},
veteransBandOfDominance: {
name: "Veteran's Band of Dominance",
stamina: 27,
intellect: 12,
spellPower: 29,
resilienceRating: 22,
spellPen: 10,
unique: true,
id: 33056,
source: 'PVP',
phase: 2
},
theSealOfDanzalar: {
name: 'The Seal of Danzalar',
stamina: 33,
spellPower: 25,
resilienceRating: 21,
id: 33054,
source: 'Serpentshrine Cavern',
phase: 2
},
ringOfEndlessCoils: {
name: 'Ring of Endless Coils',
stamina: 31,
spellPower: 37,
critRating: 22,
unique: true,
id: 30109,
source: 'Serpentshrine Cavern',
phase: 2
},
bandOfAlar: {
name: "Band of Al'ar",
stamina: 24,
intellect: 23,
spellPower: 37,
unique: true,
id: 29922,
source: 'The Eye',
phase: 2
},
bandOfDominion: {
name: 'Band of Dominion',
spellPower: 28,
critRating: 21,
id: 31290,
source: 'World Drop',
phase: 1
},
manastormBand: {
name: 'Manastorm Band',
intellect: 15,
spellPower: 29,
critRating: 10,
unique: true,
id: 30366,
source: 'Netherstorm Quest',
phase: 1
},
ringOfRecurrence: {
name: 'Ring of Recurrence',
stamina: 15,
intellect: 15,
spellPower: 32,
critRating: 19,
unique: true,
id: 28753,
source: 'Karazhan',
phase: 1
},
bandOfCrimsonFury: {
name: 'Band of Crimson Fury',
stamina: 22,
intellect: 22,
spellPower: 28,
hitRating: 16,
unique: true,
id: 28793,
source: "Magtheridon's Lair",
phase: 1
},
sealOfTheExorcist: {
name: 'Seal of the Exorcist',
stamina: 24,
spellPower: 28,
hitRating: 12,
resilienceRating: 11,
unique: true,
id: 28555,
source: '50 Spirit Stones',
phase: 1
},
seersSignet: {
name: "Seer's Signet",
stamina: 24,
spellPower: 34,
critRating: 12,
id: 29126,
source: 'The Scryers - Exalted',
phase: 1
},
ringOfCrypticDreams: {
name: 'Ring of Cryptic Dreams',
stamina: 16,
intellect: 17,
spellPower: 23,
critRating: 20,
unique: true,
id: 29367,
source: "25 Badge of Justice - G'eras",
phase: 1
},
ryngosBandOfIngenuity: {
name: "Ryngo's Band of Ingenuity",
stamina: 12,
intellect: 14,
spellPower: 25,
critRating: 14,
id: 28394,
source: 'The Arcatraz',
phase: 1
},
arcaneNetherband: {
name: 'Arcane Netherband',
stamina: 18,
intellect: 18,
spellPower: 21,
spellPen: 15,
id: 28327,
source: 'The Botanica',
phase: 1
},
violetSignetFriendly: {
name: 'Violet Signet (Friendly)',
stamina: 18,
intellect: 18,
spellPower: 22,
critRating: 12,
unique: true,
id: 29284,
source: 'The Violet Eye - Friendly',
phase: 1
},
violetSignetHonored: {
name: 'Violet Signet (Honored)',
stamina: 19,
intellect: 21,
spellPower: 26,
critRating: 15,
unique: true,
id: 29285,
source: 'The Violet Eye - Honored',
phase: 1
},
violetSignetRevered: {
name: 'Violet Signet (Revered)',
stamina: 22,
intellect: 22,
spellPower: 28,
critRating: 17,
unique: true,
id: 29286,
source: 'The Violet Eye - Revered',
phase: 1
},
violetSignetOfTheArchmage: {
name: 'Violet Signet of the Archmage (Exalted)',
stamina: 24,
intellect: 23,
spellPower: 29,
critRating: 17,
unique: true,
id: 29287,
source: 'The Violet Eye - Exalted',
phase: 1
},
lolasEve: {
name: "Lola's Eve",
stamina: 15,
intellect: 14,
spirit: 13,
spellPower: 29,
setId: 667,
id: 31339,
source: 'World Drop',
phase: 1
},
ashyensGift: {
name: "Ashyen's Gift",
stamina: 30,
spellPower: 23,
hitRating: 21,
unique: true,
id: 29172,
source: 'Cenarion Expedition - Exalted',
phase: 1
},
sparkingArcaniteRing: {
name: 'Sparking Arcanite Ring',
stamina: 13,
intellect: 14,
spellPower: 22,
critRating: 14,
hitRating: 10,
unique: true,
id: 28227,
source: 'Heroic Old Hillsbrad Foothills',
phase: 1
},
spectralBandOfInnervation: {
name: 'Spectral Band of Innervation',
stamina: 22,
intellect: 24,
spellPower: 29,
id: 28510,
source: 'Karazhan',
phase: 1
},
bandOfTheGuardian: {
name: 'Band of the Guardian',
intellect: 11,
spellPower: 23,
critRating: 17,
spellPen: 15,
unique: true,
id: 29320,
source: 'Caverns of Time Quest',
phase: 1
},
sagesBand: {
name: "Sage's Band",
intellect: 15,
spellPower: 18,
critRating: 14,
unique: true,
id: 25826,
source: 'Honor Hold/Thrallmar - Honored',
phase: 1
},
exarchsDiamondBand: {
name: "Exarch's Diamond Band",
stamina: 19,
intellect: 19,
spellPower: 25,
unique: true,
id: 27523,
source: 'Heroic Auchenai Crypts',
phase: 1
},
cobaltBandOfTyrigosa: {
name: 'Cobalt Band of Tyrigosa',
stamina: 19,
intellect: 17,
spellPower: 35,
unique: true,
id: 29352,
source: 'Heroic Mana-Tombs',
phase: 1
},
scintillatingCoralBand: {
name: 'Scintillating Coral Band',
stamina: 14,
intellect: 15,
spellPower: 21,
critRating: 17,
id: 27784,
source: 'The Steamvaults',
phase: 1
},
ringOfConflictSurvival: {
name: 'Ring of Conflict Survival',
stamina: 28,
spellPower: 23,
critRating: 20,
unique: true,
id: 31922,
source: 'Heroic Mana-Tombs',
phase: 1
},
yorsCollapsingBand: {
name: "Yor's Collapsing Band",
intellect: 20,
spirit: 19,
spellPower: 23,
unique: true,
id: 31921,
source: 'Heroic Mana-Tombs',
phase: 1
},
sigilOfShaffar: {
name: 'Sigil of Shaffar',
stamina: 18,
intellect: 16,
spellPower: 21,
unique: true,
id: 25954,
source: 'Mana-Tombs',
phase: 1
},
witchingBand: {
name: 'Witching Band',
stamina: 16,
intellect: 14,
spellPower: 21,
id: 24154,
source: 'Hellfire Ramparts',
phase: 1
},
ringOfTheFallenGod: {
name: 'Ring of the Fallen God',
stamina: 5,
intellect: 6,
spellPower: 37,
hitRating: 8,
unique: true,
id: 21709,
source: 'AQ40',
phase: 0
},
ringOfTheEternalFlame: {
name: 'Ring of the Eternal Flame',
intellect: 10,
firePower: 34,
critRating: 14,
id: 23237,
source: 'Naxxramas',
phase: 0
},
bandOfTheInevitable: {
name: 'Band of the Inevitable',
spellPower: 36,
hitRating: 8,
unique: true,
id: 23031,
source: 'Naxxramas',
phase: 0
},
sealOfTheDamned: {
name: 'Seal of the Damned',
stamina: 17,
spellPower: 21,
hitRating: 8,
critRating: 14,
unique: true,
id: 23025,
source: 'Naxxramas',
phase: 0
},
plagueheartRing: {
name: 'Plagueheart Ring',
stamina: 24,
spellPower: 29,
setId: 529,
unique: true,
id: 23063,
source: 'Naxxramas',
phase: 0
},
wrathOfCenarius: {
name: 'Wrath of Cenarius',
unique: true,
id: 21190,
source: 'Silithus Quest',
phase: 0
}
},
trinket: {
shiftingNaaruSliver: {
name: 'Shifting Naaru Sliver',
hasteRating: 54,
onUseSpellPower: 320,
duration: 15,
cooldown: 90,
unique: true,
id: 34429,
source: 'Sunwell Plateau',
phase: 5 // confirm
},
timbalsFocusingCrystal: {
name: "Timbal's Focusing Crystal",
spellPower: 44,
unique: true,
id: 34470,
source: "Heroic Magisters' Terrace",
phase: 5
},
hexShrunkenHead: {
name: 'Hex Shrunken Head',
spellPower: 53,
onUseSpellPower: 211,
duration: 20,
cooldown: 120,
unique: true,
id: 33829,
source: "Zul'Aman",
phase: 4 // confirm
},
theSkullOfGuldan: {
name: "The Skull of Gul'dan",
hitRating: 25,
spellPower: 55,
onUseHasteRating: 175,
duration: 20,
cooldown: 120,
unique: true,
id: 32483,
source: 'Black Temple',
phase: 3 // confirm
},
ashtongueTalismanOfShadows: {
name: 'Ashtongue Talisman of Shadows',
unique: true,
id: 32493,
source: 'Ashtongue Deathsworn - Exalted',
phase: 3
},
darkIronSmokingPipe: {
name: "Dark Iron Smoking Pipe",
spellPower: 43,
id: 38290,
source: "Blackrock Depths",
phase: 2
},
sextantOfUnstableCurrents: {
name: 'Sextant of Unstable Currents',
critRating: 40,
unique: true,
id: 30626,
source: 'Serpentshrine Cavern',
phase: 2
},
voidStarTalisman: {
name: 'Voidstar Talisman',
spellPower: 48,
unique: true,
id: 30449,
source: 'The Eye',
phase: 2
},
eyeOfMagtheridon: {
name: 'Eye of Magtheridon',
spellPower: 54,
unique: true,
id: 28789,
source: "Magtheridon's Lair",
phase: 1
},
darkmoonCardCrusade: {
name: 'Darkmoon Card: Crusade',
unique: true,
id: 31856,
source: 'Blessings Deck',
phase: 2 // unsure?
},
starkillersBauble: {
name: "Starkiller's Bauble",
hitRating: 26,
unique: true,
id: 30340,
source: 'Netherstorm Quest',
phase: 1
},
essenceOfTheMartyr: {
name: 'Essence of the Martyr',
spellPower: 28,
unique: true,
id: 29376,
source: "41 Badge of Justice - G'eras",
phase: 1
},
iconOfTheSilverCrescent: {
name: 'Icon of the Silver Crescent',
spellPower: 43,
onUseSpellPower: 155,
duration: 20,
cooldown: 120,
unique: true,
id: 29370,
source: "41 Badge of Justice - G'eras",
phase: 1
},
quagmirransEye: {
name: "Quagmirran's Eye",
spellPower: 37,
unique: true,
id: 27683,
source: 'Heroic Slave Pens',
phase: 1
},
scryersBloodgem: {
name: "Scryer's Bloodgem",
hitRating: 32,
onUseSpellPower: 151,
duration: 15,
cooldown: 90,
unique: true,
id: 29132,
source: 'The Scryers - Revered',
phase: 1
},
theLightningCapacitor: {
name: 'The Lightning Capacitor',
unique: true,
id: 28785,
source: 'Karazhan',
phase: 1
},
arcanistsStone: {
name: "Arcanist's Stone",
hitRating: 25,
onUseSpellPower: 168,
duration: 20,
cooldown: 120,
unique: true,
id: 28223,
source: 'Heroic Old Hillsbrad Foothills',
phase: 1
},
oculusOfTheHiddenEye: {
name: 'Oculus of the Hidden Eye',
spellPower: 33,
unique: true,
id: 26055,
source: 'Auchenai Crypts',
phase: 1
},
markOfDefiance: {
name: 'Mark of Defiance',
spellPower: 32,
unique: true,
id: 27922,
source: '30 Mark of Honor Hold / Thrallmar',
phase: 1
},
xirisGift: {
name: "Xi'ri's Gift",
critRating: 32,
onUseSpellPower: 151,
duration: 15,
cooldown: 90,
unique: true,
id: 29179,
source: "The Sha'tar - Revered",
phase: 1
},
shiffarsNexusHorn: {
name: "Shiffar's Nexus-Horn",
critRating: 30,
unique: true,
id: 28418,
source: 'Arcatraz',
phase: 1
},
figurineLivingRubySerpent: {
name: 'Figurine - Living Ruby Serpent',
stamina: 33,
intellect: 22,
onUseSpellPower: 151,
duration: 20,
cooldown: 300,
unique: true,
id: 24126,
source: 'Jewelcrafting',
phase: 1
},
vengeanceOfTheIllidari: {
name: 'Vengeance of the Illidari',
critRating: 26,
onUseSpellPower: 120,
duration: 15,
cooldown: 90,
unique: true,
id: 28040,
source: 'Hellfire Peninsula Quest',
phase: 1
},
ancientCrystalTalisman: {
name: 'Ancient Crystal Talisman',
spellPower: 26,
onUseSpellPower: 105,
duration: 20,
cooldown: 120,
unique: true,
id: 25620,
source: 'Zangarmarsh Quest',
phase: 1
},
terokkarTabletOfVim: {
name: 'Terokkar Tablet of Vim',
hitRating: 22,
onUseSpellPower: 84,
duration: 15,
cooldown: 90,
unique: true,
id: 25936,
source: 'Terokkar Forest Quest',
phase: 1
},
theRestrainedEssenceOfSapphiron: {
name: 'The Restrained Essence of Sapphiron',
spellPower: 40,
onUseSpellPower: 130,
duration: 20,
cooldown: 120,
unique: true,
id: 23046,
source: 'Naxxramas',
phase: 0
},
markOfTheChampion: {
name: 'Mark of the Champion',
spellPower: 85,
unique: true,
id: 23207,
source: 'Naxxramas',
phase: 0
},
neltharionsTear: {
name: "Neltharion's Tear",
spellPower: 44,
hitRating: 16,
unique: true,
id: 19379,
source: 'Blackwing Lair',
phase: 0
}
},
mainhand: {
sunflare: {
name: 'Sunflare',
stamina: 17,
intellect: 20,
spellPower: 292,
critRating: 30,
hasteRating: 23,
id: 34336,
source: 'Sunwell Plateau',
phase: 5
},
jadedCrystalDagger: {
name: 'Jaded Crystal Dagger',
stamina: 22,
intellect: 19,
spellPower: 185,
hasteRating: 18,
id: 34604,
source: "Heroic Magisters' Terrace",
phase: 5
},
archmagesGuile: {
name: "Archmage's Guile",
stamina: 12,
intellect: 11,
spellPower: 130,
critRating: 20,
id: 34667,
source: 'Shattered Sun Offensive - Revered',
phase: 5
},
bladeOfTwistedVisions: {
name: 'Blade of Twisted Visions',
stamina: 33,
intellect: 21,
spellPower: 229,
hasteRating: 21,
id: 33467,
source: "Zul'Aman",
phase: 4
},
wubsCursedHexblade: {
name: "Wub's Cursed Hexblade",
intellect: 21,
spellPower: 217,
critRating: 20,
hitRating: 13,
mp5: 6,
id: 33354,
source: "Zul'Aman",
phase: 4
},
vengefulGladiatorsSpellblade: {
name: "Vengeful Gladiator's Spellblade",
stamina: 30,
intellect: 20,
spellPower: 247,
hitRating: 17,
resilienceRating: 17,
id: 33763,
source: 'Arena',
phase: 4 // possibly phase 3
},
tempestOfChaos: {
name: 'Tempest of Chaos',
stamina: 30,
intellect: 22,
spellPower: 259,
critRating: 24,
hitRating: 17,
id: 30910,
source: 'Hyjal Summit',
phase: 3
},
theMaelstromFury: {
name: 'The Maelstrom Fury',
stamina: 33,
intellect: 21,
spellPower: 236,
critRating: 22,
id: 32237,
source: 'Black Temple',
phase: 3
},
mercilessGladiatorsSpellblade: {
name: "Merciless Gladiator's Spellblade",
stamina: 27,
intellect: 18,
spellPower: 225,
resilienceRating: 18,
hitRating: 15,
id: 32053,
source: 'PVP',
phase: 2
},
fangOfTheLeviathan: {
name: 'Fang of the Leviathan',
stamina: 28,
intellect: 20,
spellPower: 221,
critRating: 21,
id: 30095,
source: 'Serpentshrine Cavern',
phase: 2
},
bloodmawMagusBlade: {
name: 'Bloodmaw Magus-Blade',
stamina: 16,
intellect: 15,
spellPower: 203,
critRating: 25,
id: 28802,
source: "Gruul's Lair",
phase: 1
},
nathrezimMindblade: {
name: 'Nathrezim Mindblade',
stamina: 18,
intellect: 18,
spellPower: 203,
critRating: 23,
id: 28770,
source: 'Karazhan',
phase: 1
},
talonOfTheTempest: {
name: 'Talon of the Tempest',
intellect: 10,
yellow: 2,
socketBonus: {
intellect: 3
},
spellPower: 194,
critRating: 19,
hitRating: 9,
id: 30723,
source: 'Doomwalker',
phase: 1
},
eterniumRunedBlade: {
name: 'Eternium Runed Blade',
intellect: 19,
spellPower: 168,
critRating: 21,
id: 23554,
source: 'Blacksmithing BoE',
phase: 1
},
gladiatorsSpellblade: {
name: "Gladiator's Spellblade",
stamina: 28,
intellect: 18,
spellPower: 199,
resilienceRating: 18,
id: 28297,
source: 'PVP',
phase: 1
},
stormcaller: {
name: 'Stormcaller',
stamina: 12,
intellect: 12,
spellPower: 159,
critRating: 21,
id: 29155,
source: 'Thrallmar - Exalted',
phase: 1
},
bladeOfTheArchmage: {
name: 'Blade of the Archmage',
stamina: 13,
intellect: 11,
spellPower: 159,
critRating: 21,
id: 29153,
source: 'Honor Hold - Exalted',
phase: 1
},
bladeOfWizardry: {
name: 'Blade of Wizardry',
spellPower: 159,
id: 31336,
source: 'World Drop',
phase: 1
},
manaWrath: {
name: 'Mana Wrath',
stamina: 24,
intellect: 18,
spellPower: 126,
id: 27899,
source: 'The Mechanar',
phase: 1
},
greatswordOfHorridDreams: {
name: 'Greatsword of Horrid Dreams',
stamina: 15,
intellect: 14,
spellPower: 130,
hitRating: 14,
id: 27905,
source: 'Shadow Labyrinth',
phase: 1
},
timeShiftedDagger: {
name: 'Time-Shifted Dagger',
stamina: 15,
intellect: 15,
spellPower: 85,
critRating: 13,
id: 27431,
source: 'Old Hillsbrad Foothills',
phase: 1
},
starlightDagger: {
name: 'Starlight Dagger',
stamina: 15,
intellect: 15,
spellPower: 121,
hitRating: 16,
id: 27543,
source: 'Heroic Slave Pens',
phase: 1
},
theWillbreaker: {
name: 'The Willbreaker',
stamina: 15,
intellect: 14,
spellPower: 121,
critRating: 17,
id: 27512,
source: 'Heroic Blood Furnace',
phase: 1
},
continuumBlade: {
name: 'Continuum Blade',
stamina: 30,
intellect: 11,
spellPower: 121,
hitRating: 8,
id: 29185,
source: 'Keepers of Time - Revered',
phase: 1
},
runesongDagger: {
name: 'Runesong Dagger',
stamina: 12,
intellect: 11,
spellPower: 121,
critRating: 20,
id: 27868,
source: 'The Shattered Halls',
phase: 1
},
zangartoothShortblade: {
name: 'Zangartooth Shortblade',
stamina: 13,
intellect: 14,
spellPower: 61,
hitRating: 12,
id: 24453,
source: 'The Underbog',
phase: 1
},
spellfireLongsword: {
name: 'Spellfire Longsword',
stamina: 15,
intellect: 14,
spellPower: 56,
hitRating: 10,
id: 24361,
source: 'Slave Pens',
phase: 1
},
wraithBlade: {
name: 'Wraith Blade',
stamina: 10,
intellect: 8,
spellPower: 95,
hitRating: 8,
critRating: 14,
id: 22807,
source: 'Naxxramas',
phase: 0
}
},
offhand: {
heartOfThePit: {
name: 'Heart of the Pit',
stamina: 33,
intellect: 21,
spellPower: 39,
hasteRating: 32,
id: 34179,
source: 'Sunwell Plateau',
phase: 5
},
fetishOfThePrimalGods: {
name: 'Fetish of the Primal Gods',
stamina: 24,
intellect: 17,
hasteRating: 17,
spellPower: 37,
id: 33334,
source: "Zul'Aman",
phase: 4
},
chronicleOfDarkSecrets: {
name: 'Chronicle of Dark Secrets',
stamina: 16,
intellect: 12,
spellPower: 42,
hitRating: 17,
critRating: 23,
id: 30872,
source: 'Hyjal Summit',
phase: 3
},
blindSeersIcon: {
name: 'Blind-Seers Icon',
stamina: 25,
intellect: 16,
spellPower: 42,
hitRating: 24,
id: 32361,
source: 'Black Temple',
phase: 3
},
touchOfInspiration: {
name: 'Touch of Inspiration',
stamina: 24,
intellect: 21,
spellPower: 22,
mp5: 12,
id: 32350,
source: 'Black Temple',
phase: 3
},
scepterOfPurification: {
name: 'Scepter of Purification',
stamina: 24,
intellect: 17,
spirit: 25,
spellPower: 26,
id: 30911,
source: 'Hyjal Summit',
phase: 3
},
mercilessGladiatorsEndgame: {
name: "Merciless Gladiator's Endgame",
stamina: 27,
intellect: 19,
spellPower: 33,
resilienceRating: 27,
id: 31978,
source: 'PVP',
phase: 2
},
fathomstone: {
name: 'Fathomstone',
stamina: 16,
intellect: 12,
spellPower: 36,
critRating: 23,
id: 30049,
source: 'Serpentshrine Cavern',
phase: 2
},
talismanOfNightbane: {
name: 'Talisman of Nightbane',
stamina: 19,
intellect: 19,
spellPower: 28,
critRating: 17,
id: 28603,
source: 'Karazhan',
phase: 1
},
flametongueSeal: {
name: 'Flametongue Seal',
firePower: 49,
critRating: 17,
id: 29270,
source: "25 Badge of Justice - G'eras",
phase: 1
},
jewelOfInfinitePossibilities: {
name: 'Jewel of Infinite Possibilities',
stamina: 19,
intellect: 18,
spellPower: 23,
hitRating: 21,
id: 28734,
source: 'Karazhan',
phase: 1
},
khadgarsKnapsack: {
name: "Khadgar's Knapsack",
spellPower: 49,
id: 29273,
source: "25 Badge of Justice - G'eras",
phase: 1
},
karaborianTalisman: {
name: 'Karaborian Talisman',
stamina: 23,
intellect: 23,
spellPower: 35,
id: 28781,
source: "Magtheridon's Lair",
phase: 1
},
manualOfTheNethermancer: {
name: 'Manual of the Nethermancer',
stamina: 12,
intellect: 15,
spellPower: 21,
critRating: 19,
id: 28260,
source: 'The Mechanar',
phase: 1
},
gladiatorsEndgame: {
name: "Gladiator's Endgame",
stamina: 21,
intellect: 14,
spellPower: 19,
resilienceRating: 15,
id: 28346,
source: 'PVP',
phase: 1
},
lampOfPeacefulRadiance: {
name: 'Lamp of Peaceful Radiance',
stamina: 13,
intellect: 14,
spellPower: 21,
critRating: 13,
hitRating: 12,
id: 28412,
source: 'Arcatraz',
phase: 1
},
starHeartLamp: {
name: 'Star-Heart Lamp',
stamina: 17,
intellect: 18,
spellPower: 22,
hitRating: 12,
id: 28187,
source: 'Black Morass',
phase: 1
},
hortusSealOfBrilliance: {
name: "Hortus' Seal of Brilliance",
stamina: 18,
intellect: 20,
spellPower: 23,
id: 27534,
source: 'The Shattered Halls',
phase: 1
},
lordaeronMedicalGuide: {
name: 'Lordaeron Medical Guide',
stamina: 12,
intellect: 10,
spirit: 16,
spellPower: 16,
id: 28213,
source: 'Heroic Old Hillsbrad Foothills',
phase: 1
},
swamplightLantern: {
name: 'Swamplight Lantern',
intellect: 22,
spellPower: 14,
mp5: 6,
id: 27714,
source: 'Heroic Slave Pens',
phase: 1
},
sagaOfTerokk: {
name: 'The Saga of Terokk',
intellect: 23,
spellPower: 28,
id: 29330,
source: 'Sethekk Halls Quest',
phase: 1
},
sapphironsLeftEye: {
name: "Sapphiron's Left Eye",
stamina: 12,
intellect: 8,
spellPower: 26,
critRating: 14,
hitRating: 8,
id: 23049,
source: 'Naxxramas',
phase: 0
},
scepterOfInterminableFocus: {
name: 'Scepter of Interminable Focus',
spellPower: 9,
critRating: 14,
hitRating: 8,
id: 22329,
source: 'Stratholme (Live)',
phase: 0
}
},
twohand: {
grandMagistersStaffOfTorrents: {
name: "Grand Magister's Staff of Torrents",
stamina: 57,
intellect: 52,
yellow: 3,
socketBonus: {
spellPower: 5
},
spellPower: 266,
hitRating: 50,
critRating: 49,
id: 34182,
source: 'Sunwell Plateau',
phase: 5
},
suninfusedFocusStaff: {
name: 'Sun-infused Focus Staff',
stamina: 37,
intellect: 27,
red: 1,
yellow: 2,
socketBonus: {
spellPower: 5
},
spellPower: 121,
hitRating: 23,
id: 34797,
source: "Magisters' Terrace",
phase: 5
},
amaniDiviningStaff: {
name: 'Amani Divining Staff',
stamina: 58,
intellect: 47,
red: 1,
yellow: 1,
blue: 1,
socketBonus: {
spellPower: 5
},
spellPower: 217,
critRating: 31,
id: 33494,
source: "Zul'Aman",
phase: 4
},
zhardoomGreatstaffOfTheDevourer: {
name: "Zhar'doom, Greatstaff of the Devourer",
stamina: 70,
intellect: 47,
spellPower: 259,
critRating: 36,
hasteRating: 55,
id: 32374,
source: 'Black Temple',
phase: 3
},
staffOfImmaculateRecovery: {
name: 'Staff of Immaculate Recovery',
stamina: 73,
intellect: 51,
spirit: 35,
spellPower: 148,
mp5: 14,
id: 32344,
source: 'Black Temple',
phase: 3
},
apostleOfArgus: {
name: 'Apostle of Argus',
stamina: 62,
intellect: 59,
spellPower: 162,
mp5: 23,
id: 30908,
source: 'Hyjal Summit',
phase: 3
},
mercilessGladiatorsWarStaff: {
name: "Merciless Gladiator's War Staff",
stamina: 55,
intellect: 42,
spellPower: 225,
critRating: 42,
hitRating: 24,
resilienceRating: 29,
id: 32055,
source: 'PVP',
phase: 2
},
staffOfDisintegration: {
name: "Staff of Disintegration",
stamina: 75,
intellect: 50,
critRating: 75,
spellPower: 325,
id: 30313,
source: "Kael'Thas (only during encounter)",
phase: 2
},
theNexusKey: {
name: 'The Nexus Key',
stamina: 76,
intellect: 52,
spellPower: 236,
critRating: 51,
id: 29988,
source: 'The Eye',
phase: 2
},
frostscytheOfLordAhune: {
name: 'Frostscythe of Lord Ahune',
stamina: 40,
intellect: 35,
spellPower: 176,
mp5: 13,
critRating: 33,
id: 35514,
source: 'Lord Ahune',
phase: 1
},
gladiatorsWarStaff: {
name: "Gladiator's War Staff",
stamina: 48,
intellect: 35,
spellPower: 199,
hitRating: 21,
critRating: 36,
resilienceRating: 25,
id: 24557,
source: 'PVP',
phase: 1
},
terokksShadowstaff: {
name: "Terokk's Shadowstaff",
stamina: 40,
intellect: 42,
spellPower: 168,
critRating: 37,
id: 29355,
source: 'Heroic Sethekk Halls',
phase: 1
},
auchenaiStaff: {
name: 'Auchenai Staff',
intellect: 46,
spellPower: 121,
hitRating: 19,
critRating: 26,
id: 29130,
source: 'The Aldor - Revered',
phase: 1
},
staffOfInfiniteMysteries: {
name: 'Staff of Infinite Mysteries',
stamina: 61,
intellect: 51,
spellPower: 185,
hitRating: 23,
id: 28633,
source: 'Karazhan',
phase: 1
},
warpstaffOfArcanum: {
name: 'Warpstaff of Arcanum',
stamina: 37,
intellect: 38,
spellPower: 121,
critRating: 26,
hitRating: 16,
id: 28341,
source: 'Botanica',
phase: 1
},
grandScepterOfTheNexusKings: {
name: 'Grand Scepter of the Nexus-Kings',
stamina: 45,
intellect: 43,
spellPower: 121,
hitRating: 19,
id: 27842,
source: 'Heroic Mana-Tombs',
phase: 1
},
bloodfireGreatstaff: {
name: 'Bloodfire Greatstaff',
stamina: 42,
intellect: 42,
spellPower: 121,
critRating: 28,
id: 28188,
source: 'Black Morass',
phase: 1
},
staffOfPolarities: {
name: 'Staff of Polarities',
stamina: 34,
intellect: 33,
spellPower: 67,
hitRating: 28,
id: 25950,
source: 'Mana-Tombs',
phase: 1
},
atieshGreatstaffOfTheGuardian: {
name: 'Atiesh, Greatstaff of the Guardian',
stamina: 30,
intellect: 29,
spellPower: 183,
critRating: 28,
id: 22630,
source: 'Naxxramas',
phase: 0
},
brimstoneStaff: {
name: 'Brimstone Staff',
stamina: 31,
intellect: 30,
spellPower: 113,
hitRating: 16,
critRating: 14,
id: 22800,
source: 'Naxxramas',
phase: 0
},
soulseeker: {
name: 'Soulseeker',
stamina: 30,
intellect: 31,
spellPower: 126,
critRating: 28,
spellPen: 25,
id: 22799,
source: 'Naxxramas',
phase: 0
}
},
wand: {
wandOfTheDemonsoul: {
name: 'Wand of the Demonsoul',
stamina: 9,
intellect: 10,
yellow: 1,
socketBonus: {
spellPower: 2
},
spellPower: 22,
hasteRating: 18,
id: 34347,
source: 'Sunwell Plateau',
phase: 5
},
carvedWitchDoctorsStick: {
name: "Carved Witch Doctor's Stick",
stamina: 9,
intellect: 15,
spellPower: 18,
blue: 1,
socketBonus: {
spellPower: 2
},
id: 33192,
source: "25 Badge of Justice - G'eras",
phase: 4 // confirm
},
wandOfPrismaticFocus: {
name: 'Wand of Prismatic Focus',
stamina: 21,
spellPower: 25,
hitRating: 13,
id: 32343,
source: 'Black Temple',
phase: 3
},
mercilessGladiatorsTouchOfDefeat: {
name: "Merciless Gladiator's Touch of Defeat",
stamina: 15,
intellect: 13,
spellPower: 16,
resilienceRating: 14,
id: 32962,
source: 'PVP',
phase: 2
},
wandOfTheForgottenStar: {
name: 'Wand of the Forgotten Star',
spellPower: 23,
critRating: 14,
hitRating: 11,
id: 29982,
source: 'The Eye',
phase: 2
},
eredarWandOfObliteration: {
name: 'Eredar Wand of Obliteration',
stamina: 10,
intellect: 11,
spellPower: 16,
critRating: 14,
id: 28783,
source: "Magtheridon's Lair",
phase: 1
},
tirisfalWandOfAscendancy: {
name: 'Tirisfal Wand of Ascendancy',
stamina: 10,
intellect: 9,
spellPower: 15,
naturePower: 69,
hitRating: 11,
id: 28673,
source: 'Karazhan',
phase: 1
},
netherCoresControlRod: {
name: "Nether Core's Control Rod",
damageLower: 163,
damageUpper: 303,
speed: 1.8,
stamina: 9,
intellect: 10,
spellPower: 13,
hitRating: 8,
id: 28386,
source: 'Arcatraz',
phase: 1
},
gladiatorsTouchOfDefeat: {
name: "Gladiator's Touch of Defeat",
stamina: 15,
intellect: 11,
spellPower: 14,
resilienceRating: 12,
id: 28320,
source: 'PVP',
phase: 1
},
illidariRodOfDiscipline: {
name: 'Illidari Rod of Discipline',
damageLower: 107,
damageUpper: 199,
speed: 1.4,
stamina: 9,
blue: 1,
socketBonus: {
spellPower: 2
},
spellPower: 13,
id: 32872,
source: 'Shadowmoon Valley Quest',
phase: 1
},
theBlackStalk: {
name: 'The Black Stalk',
stamina: 10,
spellPower: 20,
critRating: 11,
id: 29350,
source: 'Heroic Underbog',
phase: 1
},
voidfireWand: {
name: 'Voidfire Wand',
damageLower: 138,
damageUpper: 257,
speed: 1.9,
stamina: 9,
intellect: 9,
spellPower: 11,
hitRating: 7,
id: 25939,
source: 'Mana-Tombs',
phase: 1
},
nesingwarySafariStick: {
name: 'Nesingwary Safari Stick',
damageLower: 142,
damageUpper: 265,
speed: 1.8,
spellPower: 14,
critRating: 12,
id: 25640,
source: 'Nagrand Quest',
phase: 1
},
flawlessWandOfFireWrath: {
name: 'Flawless Wand of Fire Wrath',
firePower: 25,
id: fakeItemIds.flawlessWandOfFireWrath,
displayId: 25295,
source: 'World Drop',
phase: 1
},
nexusTorch: {
name: 'Nexus Torch',
stamina: 9,
intellect: 10,
spellPower: 8,
critRating: 11,
id: 27540,
source: 'The Shattered Halls',
phase: 1
},
wandOfTheNetherwing: {
name: 'Wand of the Netherwing',
stamina: 19,
spellPower: 16,
id: 27890,
source: 'Shadow Labyrinth',
phase: 1
},
nethekursesRodOfTorment: {
name: "Nethekurse's Rod of Torment",
intellect: 10,
spellPower: 11,
critRating: 10,
id: 25806,
source: 'Shattered Halls Quest',
phase: 1
},
masterFirestone: {
name: 'Master Firestone',
firePower: 30,
id: 22128,
source: 'Warlock Spell',
phase: 1
},
masterSpellstone: {
name: 'Master Spellstone',
critRating: 20,
id: 22646,
source: 'Warlock Spell',
phase: 1
},
wandOfFates: {
name: 'Wand of Fates',
stamina: 7,
intellect: 7,
spellPower: 12,
hitRating: 8,
id: 22820,
source: 'Naxxramas',
phase: 0
},
doomfinger: {
name: 'Doomfinger',
spellPower: 16,
critRating: 14,
id: 22821,
source: 'Naxxramas',
phase: 0
}
}
}
|
import React,{Component} from 'react'
class TemperatureInput extends Component {
constructor(props){
super(props)
}
render(){
let {temp,type} = this.props.temp
let {title} = this.props.type
let {changeVal} = this.props
return (
<fieldset>
<legend>{title}</legend>
{/* 调用父组件的changVal方法 根据传入的数据和类型改变另一个类型的状态 */}
<input type = 'number' value = {temp} onChange = {changeVal.bind(null,type)} // 显示的值需要调用父组件的方法来决定
/>
</fieldset>
)
}
}
export default TemperatureInput
|
// Generated by CoffeeScript 1.6.3
var Future, appConfig, path, pathConfigFile, requirejs, savedConfigFuture, _,
__slice = [].slice;
path = require('path');
requirejs = require('requirejs');
_ = require('lodash');
Future = require('../utils/Future');
appConfig = require('../appConfig');
pathConfigFile = 'public/bundles/cord/core/requirejs/pathConfig';
savedConfigFuture = null;
exports.collect = function(targetDir) {
/*
Collects and merges requirejs configuration into single config object from the different sources:
* cordjs path-config
* enabled bundles configs
@param String targetDir directory with compiled cordjs project
@return Future[Object]
*/
var pathConfig, resultConfig;
if (savedConfigFuture) {
return savedConfigFuture;
} else {
pathConfig = require("" + (path.join(targetDir, pathConfigFile)));
resultConfig = {
baseUrl: '/',
urlArgs: 'release=' + Math.random(),
paths: pathConfig
};
requirejs.config({
baseUrl: path.join(targetDir, 'public'),
paths: pathConfig
});
return savedConfigFuture = appConfig.getBundles(targetDir).flatMap(function(bundles) {
var bundle, configs;
configs = (function() {
var _i, _len, _results;
_results = [];
for (_i = 0, _len = bundles.length; _i < _len; _i++) {
bundle = bundles[_i];
_results.push("cord!/" + bundle + "/config");
}
return _results;
})();
return Future.require(configs);
}).map(function() {
var config, configs, _i, _len;
configs = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
for (_i = 0, _len = configs.length; _i < _len; _i++) {
config = configs[_i];
if (config.requirejs) {
_.merge(resultConfig, config.requirejs);
}
}
return resultConfig;
});
}
};
|
let dataSet = [
["Dělníci v oblasti výstavby budov", 3207, 15931, -12724],
["Montážní dělníci ostatních výrobků",2064,12389,-10325],
["Montážní dělníci elektrických, energetických a elektronických zařízení",236,8451,-8215],
["Montážní dělníci mechanických zařízení",711,7431,-6720],
["Řidiči nákladních automobilů, tahačů a speciálních vozidel",3443,9790,-6347],
["Svářeči, řezači plamenem a páječi",980,5906,-4926],
["Seřizovači a obsluha obráběcích strojů (kromě dřevoobráběcích)",930,4635,-3705],
["Pomocní pracovníci v rostlinné výrobě",273,3613,-3340],
["Obsluha strojů na výrobu a zpracování výrobků z plastu",41,3027,-2986],
["Ruční baliči",259,2695,-2436],
["Švadleny, šičky, vyšívači a pracovníci v příbuzných oborech",1033,3281,-2248],
["Obsluha vysokozdvižných a jiných vozíků a skladníci",4031,6241,-2210],
["Obsluha stacionárních strojů a zařízení jinde neuvedená",236,2133,-1897],
["Obsluha zařízení na zpracování kovů",119,1787,-1668],
["Vývojáři softwaru",41,1666,-1625],
["Obsluha strojů na výrobu potravin a příbuzných výrobků",136,1730,-1594],
["Kuchaři (kromě šéfkuchařů), pomocní kuchaři",4751,6341,-1590],
["Obsluha strojů na výrobu a zpracování výrobků z pryže",8,1524,-1516],
["Pracovníci poštovního provozu (kromě úředníků na přepážkách)",226,1684,-1458],
["Řidiči autobusů, trolejbusů a tramvají",178,1508,-1330],
["Obsluha šicích a vyšívacích strojů",37,1288,-1251],
["Zpracovatelé masa, ryb a příbuzní pracovníci",278,1494,-1216],
["Všeobecné sestry bez specializace",381,1582,-1201],
["Brusiči, leštiči a ostřiči nástrojů a kovů",152,1344,-1192],
["Pracovníci v zákaznických kontaktních centrech",119,1306,-1187],
["Lékaři specialisté",61,1151,-1090],
["Nástrojaři a příbuzní pracovníci",3954,4974,-1020],
["Obsluha strojů na balení, plnění a etiketování",18,973,-955],
["Zubní lékaři",31,983,-952],
["Kosmetici a pracovníci v příbuzných oborech",1436,2367,-931],
["Policisté",353,1135,-782],
["Betonáři, železobetonáři a příbuzní pracovníci",107,854,-747],
["Mechanici a opraváři zemědělských, průmyslových a jiných strojů a zařízení",648,1305,-657],
["Stavební a provozní elektrikáři",473,1127,-654],
["Programátoři počítačových aplikací",491,1023,-532],
["Elektromechanici",911,1425,-514],
["Montéři kovových konstrukcí",91,571,-480],
["Pěstitelé zemědělských plodin",241,684,-443],
["Lakýrníci a natěrači (kromě stavebních)",373,816,-443],
["Obsluha strojů na úpravu vláken, dopřádání a navíjení příze a nití",19,426,-407],
["Specialisté v oblasti testování softwaru a příbuzní pracovníci",35,410,-375],
["Kvalitáři a testovači výrobků, laboranti (kromě potravin a nápojů)",182,550,-368],
["Obsluha automatizovaných strojů a zařízení na prvotní zpracování dřeva",65,429,-364],
["Mechanici a opraváři elektronických přístrojů",93,456,-363],
["Obsluha v zařízeních rychlého občerstvení",28,382,-354],
["Technici v ostatních průmyslových oborech",498,849,-351],
["Strojní inženýři",176,522,-346],
["Obsluha strojů v prádelnách a čistírnách",60,402,-342],
["Pracovníci pro přípravu rychlého občerstvení",56,398,-342],
["Obsluha strojů na výrobu a zpracování výrobků z papíru",7,326,-319],
["Modeláři, formíři, jádraři a slévači ve slévárnách",51,367,-316],
["Obsluha lakovacích a jiných zařízení na povrchovou úpravu kovů a jiných materiálů",19,327,-308],
["Operátoři telefonních panelů",376,674,-298],
["Zaměstnanci v ozbrojených silách (kromě generálů, důstojníků a poddůstojníků)",64,337,-273],
["Třídiči odpadů",27,293,-266],
["Obsluha čerpacích stanic a mycích linek dopravních prostředků",147,406,-259],
["Obsluha strojů a zařízení na výrobu skla, keramiky a stavebnin",75,324,-249],
["Obsluha strojů na výrobu a úpravu textilních, kožených a kožešinových výrobků jinde neuvedená",47,293,-246],
["Technici uživatelské podpory informačních a komunikačních technologií",71,316,-245],
["Specialisté v oblasti prodeje a nákupu produktů a služeb (kromě informačních a komunikačních technologií)",153,397,-244],
["Ošetřovatelé a pracovníci v sociálních službách v oblasti pobytové péče",458,701,-243],
["Prodejci po telefonu",82,323,-241],
["Pracovníci pro ruční praní a žehlení",18,254,-236],
["Bookmakeři, krupiéři a pracovníci v příbuzných oborech",94,329,-235],
["Chovatelé hospodářských zvířat (kromě drůbeže)",323,548,-225],
["Finanční a investiční poradci a příbuzní specialisté",338,559,-221],
["Odborní pracovníci v oblasti rehabilitace",100,318,-218],
["Řemeslní pracovníci a pracovníci v dalších oborech jinde neuvedení",21,237,-216],
["Systémoví analytici",66,276,-210],
["Pracovníci v půjčovnách a ostatní pracovníci v oblasti prodeje jinde neuvedení",111,319,-208],
["Všeobecné sestry se specializací",149,356,-207],
["Skláři, brusiči skla, výrobci bižuterie a skleněných ozdob",183,386,-203],
["Obsluha strojů a zařízení pro chemickou výrobu",72,274,-202],
["Mistři a příbuzní pracovníci ve výrobě (kromě hutní výroby a slévárenství)",443,644,-201],
["Specialisté v oblasti počítačových sítí (kromě správců)",112,309,-197],
["Pracovníci vězeňské služby",17,207,-190],
["Realitní makléři",142,324,-182],
["Učitelé odborných předmětů, praktického vyučování a odborného výcviku (kromě pro žáky se speciálními vzdělávacími potřebami)",268,434,-166],
["Hospodyně v domácnostech a provozovatelé malých penzionů",82,248,-166],
["Praktičtí lékaři",38,201,-163],
["Vývojáři webu a multimédií",30,189,-159],
["Pracovníci konečné úpravy tisku a vazači knih",73,232,-159],
["Obsluha tkacích a pletacích strojů",60,218,-158],
["Odborní pracovníci v oblasti pojišťovnictví",53,206,-153],
["Pracovníci pro zadávání dat",196,348,-152],
["Pomocní pracovníci v živočišné výrobě",59,200,-141],
["Montéři a opraváři elektrických vedení",220,356,-136],
["Pracovníci v oblasti osobních služeb jinde neuvedení",59,192,-133],
["Obsluha strojů a zařízení na výrobu a zpracování papíru",15,139,-124],
["Zpracovatelé ovoce, zeleniny a příbuzných produktů",4,127,-123],
["Specialisté v oblasti oční optiky a optometrie",17,139,-122],
["Pracovníci odvozu a recyklace odpadů",32,149,-117],
["Učitelé na 1. stupni základních škol",219,334,-115],
["Štukatéři a omítkáři",51,166,-115],
["Farmaceuti",73,183,-110],
["Mechanici klimatizací a chladicích zařízení",29,139,-110],
["Seřizovači a obsluha dřevoobráběcích strojů na výrobu dřevěných výrobků",45,149,-104],
["Obsluha jeřábů, zdvihacích a podobných manipulačních zařízení",201,305,-104],
["Řídící pracovníci v oblasti informačních a komunikačních technologií",86,187,-101],
["Pracovníci přípravy tisku",23,124,-101],
["Pracovníci pro ruční mytí vozidel",14,114,-100],
["Specialisté v oblasti prodeje a nákupu informačních a komunikačních technologií",13,111,-98],
["Kurýři, doručovatelé balíků a nosiči zavazadel",65,163,-98],
["Pracovníci montovaných staveb",43,137,-94],
["Inženýři elektrotechnici a energetici",76,166,-90],
["Kováři",86,173,-87],
["Pracovníci pro zpracování textů, písaři",15,99,-84],
["Čalouníci a příbuzní pracovníci",112,196,-84],
["Inženýři elektronici",48,125,-77],
["Obsluha strojů na výrobu obuvi a příbuzných výrobků",28,102,-74],
["Tiskaři",153,224,-71],
["Obsluha důlních zařízení (včetně horníků)",283,353,-70],
["Návrháři a správci databází",11,79,-68],
["Tazatelé průzkumů",2,66,-64],
["Technici elektronici",312,375,-63],
["Pokladníci ve finančních institucích, na poštách a pracovníci v příbuzných oborech",83,146,-63],
["Montéři lan a zdvihacích zařízení",5,64,-59],
["Obsluha strojů na bělení, barvení, čištění a další úpravu tkanin",2,59,-57],
["Specialisté v oblasti techniky v ostatních oborech",239,294,-55],
["Pomocní pracovníci ve smíšeném hospodářství",25,80,-55],
["Správci webu",74,128,-54],
["Inženýři v oblasti elektronických komunikací (včetně radiokomunikací)",24,75,-51],
["Odborní pracovníci v právní oblasti, bezpečnosti a v příbuzných oborech",91,141,-50],
["Zdravotničtí asistenti (praktické sestry)",405,454,-49],
["Výrobci mléčných produktů",14,63,-49],
["Obsluha pil a jiných zařízení na prvotní zpracování dřeva",169,217,-48],
["Dentální hygienisti",19,66,-47],
["Tradiční zpracovatelé textilu, kůží a příbuzných materiálů",47,91,-44],
["Lektoři a učitelé jazyků na ostatních školách",301,344,-43],
["Pracovníci v oblasti uměleckých a tradičních řemesel jinde neuvedení",73,116,-43],
["Figuranti, dělníci výkopových prací a dělníci v oblasti výstavby inženýrských děl",471,511,-40],
["Modeláři oděvů, střihači a příbuzní pracovníci",56,94,-38],
["Ostatní řídící pracovníci v oblasti správy podniku, administrativních a podpůrných činností",127,164,-37],
["Úředníci jinde neuvedení",175,212,-37],
["Nejvyšší představitelé společností a institucí (kromě politických, zájmových a příbuzných organizací)",7,43,-36],
["Úředníci ve výrobě",35,71,-36],
["Specialisté v oblasti bezpečnosti dat a příbuzní pracovníci",6,40,-34],
["Technici v oblasti telekomunikací a radiokomunikací",98,132,-34],
["Specialisté v oblasti strategie a politiky organizací",86,115,-29],
["Zprostředkovatelé finančních transakcí a finanční makléři",17,46,-29],
["Obuvníci a příbuzní pracovníci",79,107,-28],
["Odborní pracovníci v oblasti oční optiky",34,61,-27],
["Důlní a hutní technici a pracovníci v příbuzných oborech",23,49,-26],
["Fyzici a astronomové",15,40,-25],
["Porodní asistentky bez specializace",12,37,-25],
["Odborní pracovníci v oblasti peněžnictví",39,64,-25],
["Fyzioterapeuti specialisté",45,68,-23],
["Specialisté v oblasti zdravotnictví jinde neuvedení",27,49,-22],
["Technici a asistenti pro obsluhu lékařských zařízení",30,52,-22],
["Řídící pracovníci v oblasti strategie a politiky organizací",11,32,-21],
["Strojírenští technici",994,1013,-19],
["Odborní pracovníci úřadů práce a pracovních agentur",14,33,-19],
["Chovatelé drůbeže",16,34,-18],
["Lektoři a učitelé informačních technologií na ostatních školách",11,27,-16],
["Keramici a pracovníci v příbuzných oborech",129,145,-16],
["Specialisté pro styk s veřejností",17,32,-15],
["Asistenti ochrany veřejného zdraví",7,22,-15],
["Odborní administrativní pracovníci v oblasti zdravotnictví",23,38,-15],
["Stánkoví prodavači potravin (kromě rychlého občerstvení)",40,55,-15],
["Řídící pracovníci v sociální oblasti (kromě péče o seniory)",4,18,-14],
["Specialisté v oblasti účetnictví",305,319,-14],
["Pracovníci pro mytí oken",7,18,-11],
["Pracovníci v informačních kancelářích",25,35,-10],
["Specialisté v oblasti ochrany veřejného zdraví",2,10,-8],
["Výrobci a opraváři hudebních nástrojů, ladiči",6,14,-8],
["Specialisté v oblasti tradiční a alternativní medicíny",1,8,-7],
["Soudci a příbuzní pracovníci",13,20,-7],
["Tanečníci a choreografové",27,34,-7],
["Pracovníci evidence dat a archivů",38,45,-7],
["Předváděči zboží",4,11,-7],
["Zpracovatelé kůže, koželuhové a kožišníci",4,11,-7],
["Operátoři velínů na zpracování kovů",18,24,-6],
["Atleti a ostatní profesionální sportovci",17,23,-6],
["Vrtači a příbuzní pracovníci",39,45,-6],
["Poddůstojníci v ozbrojených silách",3,8,-5],
["Chemičtí inženýři a specialisté v příbuzných oborech",38,43,-5],
["Pracovníci v pohřebnictví",16,21,-5],
["Zastavárníci a půjčovatelé peněz",1,4,-3],
["Pracovníci na zpracování plechu",484,487,-3],
["Obsluha zařízení na úpravu rudných a nerudných surovin",3,6,-3],
["Specialisté v oblasti územního a dopravního plánování",3,5,-2],
["Specialisté v oblasti organizace a řízení práce",28,30,-2],
["Pouliční prodavači rychlého občerstvení",26,28,-2],
["Řídící pracovníci v oblasti péče o děti",4,5,-1],
["Operátoři velínů na výrobu a rozvod elektrické energie a tepla",5,6,-1],
["Operátoři velínů pro chemickou výrobu (kromě zpracování ropy a zemního plynu)",3,4,-1],
["Odborní pracovníci v oblasti tradiční a alternativní medicíny",4,5,-1],
["Farmáři samozásobitelé ve smíšeném hospodářství",2,3,-1],
["Mechanici a opraváři informačních a komunikačních technologií",60,61,-1],
["Nejvyšší představitelé politických, zájmových a příbuzných organizací",4,4,0],
["Řídící pracovníci v oblasti péče o seniory",4,4,0],
["Spisovatelé a příbuzní pracovníci",2,2,0],
["Pracovníci veřejné správy vydávající různá povolení",6,6,0],
["Pracovníci informačních služeb jinde neuvedení",33,33,0],
["Kvalifikovaní pracovníci v oblasti akvakultury",5,5,0],
["Obsluha strojů a zařízení na výrobu a zpracování fotografických materiálů",8,8,0],
["Osoby bez pracovního zařazení",1,0,1],
["Řídící pracovníci v rybářství a akvakultuře",1,0,1],
["Řídící pracovníci v oblasti vzdělávání",20,19,1],
["Důlní a hutní inženýři a specialisté v příbuzných oborech",10,9,1],
["Nelékařští praktici",2,1,1],
["Operátoři velínů spaloven, vodárenských a vodohospodářských zařízení",2,1,1],
["Elektrotechnici řídících a navigačních zařízení letového provozu",1,0,1],
["Odborní pracovníci v oblasti komunitní zdravotní péče",2,1,1],
["Odborní pracovníci v církevní oblasti a v příbuzných oborech",5,4,1],
["Inkasisté pohledávek a příbuzní pracovníci",13,12,1],
["Astrologové, jasnovidci a pracovníci v příbuzných oborech",1,0,1],
["Rybáři na moři",1,0,1],
["Kvalifikovaní pracovníci v oblasti myslivosti",1,0,1],
["Hubitelé škůdců",3,2,1],
["Generálové a důstojníci v ozbrojených silách",2,0,2],
["Představitelé samosprávy",4,2,2],
["Řídící pracovníci v průmyslové výrobě",136,134,2],
["Porodní asistentky se specializací",6,4,2],
["Učitelé a vychovatelé pro osoby se speciálními vzdělávacími potřebami",118,116,2],
["Specialisté v oblasti vzdělávání a rozvoje lidských zdrojů",29,27,2],
["Technici pro lékařské záznamy a informace o zdravotním stavu",2,0,2],
["Modelky a manekýni",2,0,2],
["Podomní prodejci",3,1,2],
["Ovocnáři, vinohradníci, chmelaři a ostatní pěstitelé plodů rostoucích na stromech a keřích",45,43,2],
["Operátoři velínů pro zpracování ropy a zemního plynu",3,0,3],
["Řídící letového provozu",3,0,3],
["Odborní pracovníci v oblasti matematiky, statistiky a pojistné matematiky",6,3,3],
["Pracovníci veřejné správy v oblasti daní",7,4,3],
["Pracovníci v dopravě a přepravě",460,457,3],
["Farmáři samozásobitelé v živočišné výrobě",3,0,3],
["Řidiči motocyklů",3,0,3],
["Pomocní pracovníci v rybářství",8,5,3],
["Rybáři ve vnitrozemských a pobřežních vodách",4,0,4],
["Potápěči",4,0,4],
["Představitelé zákonodárné a výkonné moci",5,0,5],
["Řídící pracovníci v těžbě a geologii",7,2,5],
["Specialisté v církevní oblasti a v příbuzných oblastech",5,0,5],
["Lodní technici",6,1,5],
["Odbytoví a přepravní agenti, celní deklaranti",58,53,5],
["Instruktoři a programoví vedoucí v rekreačních zařízeních a fitcentrech",33,28,5],
["Obsluha strojů na výrobu výrobků z cementu, kamene a ostatních nerostů",102,97,5],
["Řídící pracovníci v oblasti reklamy a styku s veřejností",19,13,6],
["Meteorologové",6,0,6],
["Pěstitelé smíšených plodin",18,12,6],
["Rybáři, lovci a sběrači samozásobitelé",7,1,6],
["Mechanici a opraváři leteckých motorů a zařízení",35,29,6],
["Strojvedoucí a řidiči kolejových motorových vozíků",53,47,6],
["Pracovníci provádějící odečet měřidel a výběrčí peněz z prodejních automatů",6,0,6],
["Technici v chemických a fyzikálních vědách (kromě chemického inženýrství)",51,44,7],
["Mechanici a opraváři jízdních kol a příbuzní pracovníci",26,19,7],
["Specialisté v oblasti audiologie a řečové terapie",9,1,8],
["Psychologové",83,75,8],
["Mistři a příbuzní pracovníci v oblasti těžby, hutní výroby a slévárenství",18,10,8],
["Organizátoři konferencí a událostí",26,18,8],
["Operátoři velínů jinde neuvedení",123,114,9],
["Včelaři a chovatelé bource morušového",15,6,9],
["Specialisté v oblasti matematiky, statistiky a pojistné matematiky",20,10,10],
["Pracovníci veřejné správy v oblasti sociálních a jiných dávek",14,4,10],
["Policejní inspektoři, komisaři a radové Policie ČR",10,0,10],
["Korektoři, kódovači a příbuzní pracovníci",16,6,10],
["Farmáři samozásobitelé v rostlinné výrobě",10,0,10],
["Specialisté v oblasti průmyslové ekologie",15,3,12],
["Specialisté zaměření na metody výuky",18,6,12],
["Výkonní umělci a příbuzní specialisté jinde neuvedení",27,15,12],
["Lodní důstojníci a lodivodi",12,0,12],
["Šéfkuchaři a šéfcukráři",124,112,12],
["Technici provozu informačních a komunikačních technologií",196,184,12],
["Kočí",15,3,12],
["Pouliční prodejci (kromě potravin)",16,4,12],
["Řídící pracovníci v oblasti zdravotnictví",48,34,14],
["Specialisté v knihovnách a v příbuzných oblastech",17,3,14],
["Obsluha železničních, zemních a příbuzných strojů a zařízení",599,585,14],
["Podlaháři a obkladači",291,276,15],
["Řídící pracovníci v oblasti finančních a pojišťovacích služeb",61,45,16],
["Pracovníci pouličního poskytování služeb",23,7,16],
["Řídící pracovníci v ostatních službách (cestovní kanceláře, nemovitosti, opravárenské služby, osobní služby a jiné)",75,58,17],
["Technici kartografové, zeměměřiči a pracovníci v příbuzných oborech",34,17,17],
["Instruktoři autoškoly",34,17,17],
["Obsluha parních turbín, kotlů a příbuzných zařízení",74,57,17],
["Řidiči nemotorových vozidel",19,1,18],
["Kartografové a zeměměřiči",37,18,19],
["Odborní administrativní pracovníci v právní oblasti",39,20,19],
["Pekaři, cukráři (kromě šéfcukrářů) a výrobci cukrovinek",1209,1190,19],
["Moderátoři v rozhlasu, televizi a ostatní moderátoři",22,2,20],
["Odhadci, zbožíznalci a likvidátoři",22,2,20],
["Výrobci, mechanici a opraváři přesných přístrojů a zařízení",50,30,20],
["Lektoři a učitelé umění na ostatních školách",25,3,22],
["Pracovníci Celní správy ČR",24,2,22],
["Pracovníci veřejné správy v oblasti státních regulací jinde neuvedení",22,0,22],
["Odborní pracovníci v oblasti zubní techniky, ortotiky a protetiky",115,92,23],
["Zdravotničtí záchranáři",35,12,23],
["Obchodní makléři",45,21,24],
["Specialisté v oblasti personálního řízení",90,65,25],
["Průvodčí a příbuzní pracovníci v osobní dopravě",34,9,25],
["Izolatéři",239,214,25],
["Nejvyšší státní úředníci",28,2,26],
["Řídící pracovníci v zemědělství, lesnictví, myslivosti a v oblasti životního prostředí",38,12,26],
["Signalisti, brzdaři, výhybkáři, posunovači a příbuzní pracovníci",42,16,26],
["Herci",35,8,27],
["Ostatní odborní pracovníci v oblasti umění a kultury",65,38,27],
["Advokáti, státní zástupci a příbuzní pracovníci",73,41,32],
["Odborní pracovníci v oblasti účetnictví, ekonomiky a personalistiky",664,632,32],
["Řídící pracovníci knihoven, muzeí, v oblasti práva a bezpečnosti a v dalších oblastech",52,19,33],
["Pěstitelé a chovatelé ve smíšeném hospodářství",49,16,33],
["Střelmistři",36,3,33],
["Specialisté archiváři, kurátoři a správci památkových objektů",44,9,35],
["Piloti, navigátoři a palubní technici",63,27,36],
["Odborní pracovníci v oblasti zdravotnictví jinde neuvedení",83,47,36],
["Veterinární lékaři",49,12,37],
["Technici v chemickém inženýrství a příbuzných oborech",107,70,37],
["Filozofové, historici a politologové",41,3,38],
["Provozovatelé maloobchodních a velkoobchodních prodejen",99,61,38],
["Mistři a příbuzní pracovníci ve stavebnictví",201,161,40],
["Pracovníci povrchového čištění budov, kominíci",58,18,40],
["Řídící pracovníci v maloobchodě a velkoobchodě",67,26,41],
["Stavební architekti",60,19,41],
["Tradiční zpracovatelé dřeva, proutí a příbuzných materiálů",88,47,41],
["Systémoví administrátoři, správci počítačových sítí",280,236,44],
["Technici v oblasti vysílání a audiovizuálních záznamů",62,18,44],
["Specialisté v oblasti dietetiky a výživy",71,26,45],
["Stevardi a jiní obslužní pracovníci v dopravě",121,75,46],
["Stavební inženýři",229,182,47],
["Farmaceutičtí asistenti",82,35,47],
["Klenotníci, zlatníci a šperkaři",80,33,47],
["Specialisté v oblasti průmyslového inženýrství a v příbuzných oblastech",280,232,48],
["Malíři, rytci a příbuzní pracovníci pro zdobení skla, keramiky, kovu, dřeva a jiných materiálů",99,51,48],
["Elektrotechnici a technici energetici",442,392,50],
["Veterinární technici a asistenti",67,17,50],
["Geologové, geofyzici a příbuzní pracovníci",61,7,54],
["Sklenáři",64,10,54],
["Ostatní pracovníci pro ruční čištění",101,46,55],
["Řídící pracovníci v oblasti kultury, vydavatelství, sportu a zábavy",72,15,57],
["Učitelé na vysokých a vyšších odborných školách",78,20,58],
["Biologové, botanici, zoologové a příbuzní specialisté",81,22,59],
["Příslušníci Hasičského záchranného sboru ČR a hasiči ostatních jednotek požární ochrany",85,25,60],
["Lektoři a učitelé hudby na ostatních školách",74,13,61],
["Řídící pracovníci v oblasti lidských zdrojů",107,44,63],
["Sociologové, antropologové a specialisté v příbuzných oborech",75,11,64],
["Technici v oblasti lesnictví",81,16,65],
["Chovatelé zvířat jinde neuvedení",85,17,68],
["Úředníci v oblasti statistiky, finančnictví a pojišťovnictví",100,31,69],
["Řídící pracovníci v oblasti financí (kromě finančních a pojišťovacích služeb)",194,122,72],
["Hudebníci, zpěváci a skladatelé",104,31,73],
["Pracovníci lodní posádky",74,1,73],
["Řídící pracovníci v oblasti ubytovacích služeb",99,18,81],
["Průmysloví a produktoví designéři, módní návrháři",135,53,82],
["Konzervátoři, restaurátoři a preparátoři a příbuzní pracovníci v galeriích, muzeích a knihovnách",96,13,83],
["Ostatní řemeslníci a kvalifikovaní pracovníci hlavní stavební výroby",1631,1544,87],
["Mechanici a opraváři motorových vozidel",1708,1616,92],
["Technici a laboranti v biologických a příbuzných oborech (kromě zdravotnických)",107,12,95],
["Zahradní a krajinní architekti",100,4,96],
["Odborní laboranti a laboratorní asistenti v oblasti zdravotnictví",177,77,100],
["Řídící pracovníci v oblasti stravovacích služeb",139,37,102],
["Specialisté a odborní pracovníci v oblasti výchovy a vzdělávání jinde neuvedení",463,360,103],
["Pomocní pracovníci v oblasti těžby",111,6,105],
["Řídící pracovníci v dopravě, logistice a příbuzných oborech",209,99,110],
["Pracovníci péče o děti v mimoškolských zařízeních a domácnostech",293,183,110],
["Chemici (kromě chemického inženýrství)",145,34,111],
["Vedoucí pracovních týmů v prodejnách",453,341,112],
["Řídící pracovníci v oblasti výzkumu a vývoje",201,83,118],
["Specialisté v oblasti ochrany životního prostředí (kromě průmyslové ekologie)",128,2,126],
["Učitelé v oblasti předškolní výchovy",409,278,131],
["Chovatelé a ošetřovatelé zvířat v zařízeních určených pro chov a příbuzní pracovníci",227,96,131],
["Pracovníci v oblasti ochrany a ostrahy jinde neuvedení",415,280,135],
["Pomocní pracovníci v zahradnictví",764,628,136],
["Specialisté v oblasti práva a příbuzných oblastech jinde neuvedení",229,89,140],
["Odborní pracovníci v oblasti sociální práce",652,506,146],
["Mzdoví účetní",258,103,155],
["Učitelé na středních školách (kromě odborných předmětů), konzervatořích a na 2. stupni základních škol",505,342,163],
["Ochutnávači, degustátoři a kontroloři kvality potravin a nápojů a příbuzní pracovníci",209,33,176],
["Redaktoři, novináři a příbuzní pracovníci",259,72,187],
["Sekretáři (všeobecní)",307,115,192],
["Barmani",569,377,192],
["Nákupčí",380,181,199],
["Pracovníci cestovního ruchu (kromě průvodců)",417,218,199],
["Sportovní trenéři, instruktoři a úředníci sportovních klubů",352,146,206],
["Specialisté v oblasti zemědělství, lesnictví, rybářství a vodního hospodářství",265,51,214],
["Režiséři, dramaturgové, produkční a příbuzní specialisté",245,31,214],
["Specialisté v oblasti sociální práce",435,220,215],
["Správci objektů",436,216,220],
["Technici počítačových sítí a systémů",330,106,224],
["Řidiči a obsluha zemědělských a lesnických strojů",809,566,243],
["Řídící pracovníci ve stavebnictví a zeměměřictví",490,235,255],
["Knihovníci",267,4,263],
["Finanční analytici a specialisté v peněžnictví a pojišťovnictví",358,91,267],
["Doplňovači zboží",450,183,267],
["Specialisté v oblasti reklamy a marketingu, průzkumu trhu",689,405,284],
["Průvodci, delegáti v cestovním ruchu",387,100,287],
["Zprostředkovatelé služeb jinde neuvedení",951,663,288],
["Technici v oblasti zemědělství, rybářství a vodohospodářství (kromě úpravy a rozvodu vody)",377,87,290],
["Personální referenti",342,51,291],
["Specialisté v oblasti ekonomie",353,58,295],
["Krejčí, kožešníci a kloboučníci",383,80,303],
["Uklízeči a pomocníci v domácnostech (kromě hospodyní)",441,132,309],
["Fotografové",364,26,338],
["Výtvarní umělci",382,29,353],
["Pomocní pracovníci v lesnictví a myslivosti",1122,767,355],
["Vedoucí v oblasti administrativních agend",445,89,356],
["Instalatéři, potrubáři, stavební zámečníci a stavební klempíři",1946,1589,357],
["Kameníci, řezači a brusiči kamene",530,159,371],
["Grafici a výtvarníci v multimédiích",481,105,376],
["Úředníci ve skladech",944,540,404],
["Pracovníci osobní péče ve zdravotní a sociální oblasti jinde neuvedení",1059,639,420],
["Recepční (kromě recepčních v hotelích a dalších ubytovacích zařízeních)",930,505,425],
["Překladatelé, tlumočníci a jazykovědci",537,99,438],
["Aranžéři a příbuzní pracovníci",573,122,451],
["Stavební technici",890,438,452],
["Truhláři (kromě stavebních) a pracovníci v příbuzných oborech",1301,846,455],
["Řídící pracovníci v oblasti obchodu, marketingu a v příbuzných oblastech",920,429,491],
["Recepční v hotelích a dalších ubytovacích zařízeních",1006,512,494],
["Pokladníci a prodavači vstupenek a jízdenek",815,315,500],
["Asistenti pedagogů",716,194,522],
["Pomocní pracovníci údržby budov a souvisejících prostor",960,435,525],
["Odborní pracovníci v administrativě a správě organizace",1409,868,541],
["Pomocníci v kuchyni",2049,1488,561],
["Pokrývači",733,139,594],
["Zadáno na méně míst",1075,443,632],
["Vedoucí provozu stravovacích, ubytovacích a dalších zařízení",1014,328,686],
["Pomocní manipulační pracovníci (kromě výroby)",5664,4969,695],
["Uklízeči veřejných prostranství, čističi kanalizací a příbuzní pracovníci",3686,2926,760],
["Kvalifikovaní pracovníci v lesnictví a příbuzných oblastech",855,78,777],
["Zahradníci a pěstitelé v zahradnických školkách",1193,393,800],
["Ošetřovatelé a pracovníci v sociálních službách v oblasti ambulantních a terénních služeb a domácí péče",1159,351,808],
["Kadeřníci",1320,369,951],
["Úředníci v oblasti účetnictví",1702,749,953],
["Tesaři a stavební truhláři",1831,755,1076],
["Malíři (včetně stavebních lakýrníků a natěračů), tapetáři",1331,205,1126],
["Obchodní zástupci",2943,1595,1348],
["Pomocní a nekvalifikovaní pracovníci ve službách jinde neuvedení",2827,1257,1570],
["Číšníci a servírky",4570,2917,1653],
["Uklízeči a pomocníci v hotelích, administrativních, průmyslových a jiných objektech",13687,12011,1676],
["Pracovníci ostrahy a bezpečnostních agentur",11829,9016,2813],
["Zedníci, kamnáři, dlaždiči a montéři suchých staveb",10146,4637,5509],
["Nezařazení",7454,0,7454],
["Řidiči osobních a malých dodávkových automobilů, taxikáři",9479,1469,8010],
["Ostatní pomocní pracovníci ve výrobě",26194,16346,9848],
["Všeobecní administrativní pracovníci",15915,2986,12929],
["Prodavači v prodejnách",18348,4424,13924]
];
$(document).ready(function() {
$('#tabulka').DataTable( {
responsive: true,
language: {
url: "https://interaktivni.rozhlas.cz/tools/datatables/Czech.json" },
order : [[ 3, "asc"]],
data : dataSet,
columns : [
{title: "profese"},
{title: "uchazeči o zaměstnání"},
{title: "volná místa"},
{title: "kolik uchazečů chybí (-) nebo kolik jich přebývá (+)"}
],
columnDefs : [{
targets : 0,
responsivePriority : 1
},
{
targets : 3,
responsivePriority : 1
}
]
} );
} );
|
var d = require("./Common_Data"),
o = require("./Util"),
i = require("./ComPage"),
n = function() {
function t() {}
return t.setShareOpen = function(t) {
this.shareOpen = t;
}, t.getShareOpen = function() {
return this.shareOpen;
}, t.getCompleteList = function() {
return this.fishCompleteList;
}, t.setCompleteList = function(t) {
console.log("设置完成成就列表"), this.fishCompleteList = t;
}, t.setTempList = function(t) {
this.fishTempList = t;
}, t.getTempList = function() {
return this.fishTempList;
}, t.setGold = function(t) {
this.gold = t;
}, t.addGold = function(t) {
this.gold += t;
}, t.getGold = function() {
return this.gold;
}, t.setCurSkin = function(t) {
this.curSkin = t;
}, t.getCurSkin = function() {
return this.curSkin;
}, t.setHaveSkins = function(t) {
this.haveSkins = t;
}, t.getHaveSkins = function() {
return this.haveSkins;
}, t.getBoxState = function() {
return this.boxState;
}, t.setBoxState = function(t) {
this.boxState = t;
}, t.setProtect = function(t) {
this.protect = t;
}, t.addProtect = function(t) {
this.protect += t;
}, t.getProtect = function() {
return this.protect;
}, t.setSign = function(t) {
this.sign = t;
}, t.getSign = function() {
return console.log("获取服务器签到:" + this.sign), "" == this.sign ? "0-0-0" : this.sign;
}, t.getSignByLocal = function() {
return console.log("获取本地签到:" + this.signLocal), "" == this.signLocal ? "0-0-0" : this.signLocal;
}, t.setSignReward = function(o, e) {
console.log("设置签到礼物"), console.log(o), this.signTip = e, this.signReward = o;
}, t.getSignReward = function() {
return console.log("获取签到礼物"), console.log(this.signReward), this.signReward;
}, t.checkSignValid = function() {
if (0 < this.signReward.length) {
var r = this.getSignByLocal(),
e = this.getSign(),
t = r.substr(0, 3),
o = e.substr(0, 3);
if (console.log("本地截取:" + t), console.log("服务器数据截取:" + o), t == o) {
console.log("签到效验通过,发放奖励"), this.addReward(this.signReward);
var d = e.split("-"),
n = parseInt(d[0]),
a = 0 == n ? 1 : n + 1,
s = (a = 7 < a ? 1 : a) + "-1-" + new Date().getTime().toString();
this.setSign(s), i.ComPage.ShowTip(this.signTip), this.setSignReward([], "");
} else console.log("签到效验不通过");
}
}, t.addReward = function(o) {
if (o)
for (var e = 0; e < o.length; e++) 0 == o[e].type ? (this.addGold(o[e].num),
console.log("奖励:金币+" + o[e].num)) : 1 == o[e].type && (this.addProtect(o[e].num),
console.log("奖励:护盾+" + o[e].num));
else console.log("添加奖励失败:" + o);
}, t.setNickName = function(t) {
console.log("设置昵称:" + t), this.nickName = t;
}, t.getNickName = function() {
return console.log("获取昵称:" + this.nickName), this.nickName;
}, t.setCurScore = function(t) {
this.curScore = t;
}, t.getCurScore = function() {
return this.curScore;
}, t.getServerNewGift = function() {
return console.log("新手礼包服务器状态:" + this.newgift), this.newgift;
}, t.setServerNewGift = function(t) {
console.log("新手礼包设置服务器状态:" + t), this.newgift = t;
}, t.setHeightScore = function(t) {
this.heightScore = t;
}, t.getHeightScore = function() {
return console.log("新手引导:" + this.heightScore), this.heightScore;
}, t.setFristGame = function(t) {
console.log("新手引导设置:" + t), this.fristgame = t;
}, t.getFristGame = function() {
return this.fristgame;
}, t.setOpenGameBoxTimer = function(t) {
console.log("设置打开游戏内宝箱次数" + t), this.openGameBoxTimer += t, 1 == this.openGameBoxTimer && this.setOpenGameBoxtemp();
}, t.setOpenGameBoxtemp = function() {
this.openGameBoxTemp = new Date();
}, t.getOpenGameBoxtemp = function() {
var t = !0;
return t = this.openGameBoxTemp ? o.Util.isToday(this.openGameBoxTemp) : t;
}, t.getOpenGameBoxTimer = function() {
return this.getOpenGameBoxtemp() || (this.openGameBoxTimer = 0), this.openGameBoxTimer;
}, t.userdataArryToStr = function() {
var o = [this.gold, this.curSkin, this.haveSkins, this.protect, this.heightScore, this.newgift, this.fristgame, this.sign, this.openGameBoxTimer, this.openGameBoxTemp, this.fishCompleteList],
e = JSON.stringify(o);
return console.log("数据字符串:" + e), e;
}, t.userdataStrToArry = function(o) {
var e = [];
return o && (e = JSON.parse(o)), console.log("数据数组:"), console.log(e), e;
}, t.updateUserData = function(t) {
t && 10 <= t.length ? (console.log("更新用户数据"), this.gold = t[0], this.curSkin = t[1],
this.haveSkins = t[2], this.protect = t[3], this.heightScore = t[4], this.newgift = t[5],
this.fristgame = t[6], this.sign = t[7], this.openGameBoxTimer = t[8] || 0, this.openGameBoxTemp = t[9] || null,
this.fishCompleteList = t[10] || this.fishCompleteList, console.log("服务器数据:"), console.log("金币:" + this.gold),
console.log("当前使用皮肤:" + this.curSkin), console.log("拥有皮肤:"), console.log(this.haveSkins),
console.log("拥有护盾数:" + this.protect), console.log("最高分数:" + this.heightScore), console.log("是否有新手礼包:" + this.newgift),
console.log("新手引导:" + this.fristgame), console.log("签到:" + this.sign), console.log("开启宝箱次数:" + this.openGameBoxTimer),
console.log("开启宝箱时间戳:" + this.openGameBoxTemp), console.log("成就完成量:"), console.log(this.fishCompleteList)) : (console.log("更新用户数据失败"),
console.log(t));
}, t.saveUserDataToLocal = function() {
console.log("存储数据到本地");
var t = this.userdataArryToStr();
o.Util.SaveDataByKey("UserData", t);
}, t.saveUserDataToServer = function() {
console.log("存储数据到服务器");
var t = this.userdataArryToStr();
console.log(t), d.default.setData(t, function() {
console.log("上传服务器成功");
}, function() {
console.log("上传服务器失败");
});
}, t.initUserDataByServer = function(a) {
console.log("加载服务器数据"), d.default.getData(function(o) {
console.log(o);
try {
if ("" == o.data.data) console.log("服务器不存在数据"), a(!1);
else {
console.log("收到服务器数据" + o.data.data);
var e = this.userdataStrToArry(o.data.data);
this.updateUserData(e), a(!0);
}
} catch (t) {
console.log("服务器数据获取失败 1"), a(!1);
}
}.bind(this), function() {
console.log("服务器数据获取失败 2"), a(!1);
}.bind(this));
}, t.initUserDataByLocal = function() {
console.log("加载本地数据");
try {
var a = o.Util.GetByKey("UserData");
if ("string" == typeof a && "" != a) {
var n = this.userdataStrToArry(a);
this.updateUserData(n), this.signLocal = this.sign;
} else console.log("本地没有数据");
} catch (t) {
console.log("加载本地数据出错"), console.log(t);
}
}, t.gold = 0, t.curSkin = 0, t.haveSkins = [0], t.boxState = 0, t.protect = 0,
t.sign = "", t.signLocal = "", t.curScore = 0, t.heightScore = 0, t.newgift = !0,
t.fristgame = !0, t.openGameBoxTimer = 0, t.openGameBoxTemp = null, t.fishCompleteList = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
t.fishTempList = [], t.nickName = "", t.Init = !1, t.shareOpen = !1, t.signReward = [],
t.signTip = "", t;
}();
exports.Fish_UserData = n;
|
import React from 'react'
import {Link} from 'react-router-dom';
function Partners() {
return (
<React.Fragment>
<h2><Link style={LinkStyle} to="/partner/profile">View My Profile</Link>{' '}</h2>
<h2><Link style={LinkStyle} to="/partner/delete">Delete My Account</Link>{' '}</h2>
<h2><Link style={LinkStyle} to="/partner/update">Update My Profile</Link>{' '}</h2>
<h2><Link style={LinkStyle} to="/partner/view">View All Partners</Link>{' '}</h2>
</React.Fragment>
)
}
export default Partners;
const LinkStyle={
color:'#000'
}
|
'use strict';
var gulp = require('gulp'),
runSequence = require('run-sequence'),
browserSync = require('browser-sync'),
sass = require('gulp-sass'),
rename = require('gulp-rename'),
csso = require('gulp-csso'),
autoprefixer = require('gulp-autoprefixer'),
sourcemaps = require('gulp-sourcemaps'),
imageop = require('gulp-image-optimization'),
imagemin = require('gulp-imagemin'),
pngquant = require('imagemin-pngquant'),
svgo = require('gulp-svgo'),
svgstore = require('gulp-svgstore'),
del = require('del'),
ghPages = require('gulp-gh-pages'),
dateFormat = require('dateformat'),
concat = require('gulp-concat'),
uglify = require('gulp-uglify');
// Setting path to the main files
var projectPath = {
dist: {
html: 'dist/',
css: 'dist/css/',
js: 'dist/js/',
img: 'dist/img/',
icons: 'dist/img/icons/',
fonts: 'dist/fonts/'
},
app: {
html: 'app/*.html',
style: 'app/sass/**/*.scss',
js: 'app/js/**/*.js',
img: 'app/img/**/*.{jpg,jpeg,png,gif,svg}',
icons: 'app/img/icons/*.svg',
fonts: 'app/fonts/**/*.{woff,woff2}'
}
};
// Setting up browserSync
var serverConfig = {
server: 'dist/',
notify: false,
open: true
};
var buildDate = dateFormat(new Date(), 'yyyy-mm-dd H:MM');
gulp.task('deploy', function() {
return gulp.src('./dist/**/*')
.pipe(ghPages({'force': true, 'message': 'Build from ' + buildDate}));
});
gulp.task('serve', ['style'], function () {
browserSync.init(serverConfig);
gulp.watch(projectPath.app.style, ['style']);
gulp.watch(projectPath.app.html, ['html:update']);
});
// Task for compiling style.scss file to the style.css
gulp.task('style', function() {
return gulp.src(projectPath.app.style)
.pipe(sourcemaps.init())
.pipe(sass().on('error', sass.logError))
.pipe(autoprefixer({browsers: ['last 2 versions'], cascade: false}))
.pipe(gulp.dest(projectPath.dist.css))
.pipe(csso())
.pipe(rename({suffix: '.min'}))
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest(projectPath.dist.css))
.pipe(browserSync.reload({stream: true}));
});
// Images optimization and copy in /dist
gulp.task('images', function() {
return gulp.src(projectPath.app.img)
.pipe(svgo())
.pipe(imagemin([
imagemin.gifsicle({interlaced: true}),
imagemin.jpegtran({progressive: true}),
imagemin.optipng({optimizationLevel: 3}),
pngquant({quality: '65-70', speed: 5})
],{
verbose: true
}))
// .pipe(imageop({
// optimizationLevel: 3,
// progressive: true,
// interlaced: true
// }))
.pipe(gulp.dest(projectPath.dist.img));
});
// Making SVG-sprite
gulp.task('symbols', function() {
return gulp.src(projectPath.dist.icons + '*.svg')
.pipe(svgstore({
inlineSvg:true
}))
.pipe(rename('symbols.svg'))
.pipe(gulp.dest(projectPath.dist.img));
});
// Copy *.html in /dist
gulp.task('html:copy', function() {
return gulp.src(projectPath.app.html)
.pipe(gulp.dest(projectPath.dist.html));
});
// Update *.html
gulp.task('html:update', ['html:copy'], function(done) {
browserSync.reload();
done();
});
// Clean build dir
gulp.task('clean', function() {
return del(projectPath.dist.html);
});
// Build project
gulp.task('build', function(fn) {
runSequence('clean', 'copy', 'style', 'images', 'symbols', fn);
});
gulp.task('copy', function() {
return gulp.src([
projectPath.app.html,
projectPath.app.js,
projectPath.app.fonts
], {
base: './app/'
})
.pipe(gulp.dest(projectPath.dist.html));
});
|
import React from 'react';
import { ScrollView, Dimensions } from 'react-native';
import { ListItem, Divider } from 'react-native-elements';
import { Icon } from 'expo';
import { Modal } from '../../../../components/modal';
import { Button } from '../../../../components/button';
import {
CloseTouchable,
TitleText,
RowContainer,
Container,
CancelButtonContainer,
SubtitleText,
ActionButton,
HeaderText
} from './styles';
import { Trip } from '../../../../components/trip';
import { CLIENT_USER_TYPE } from '../../../../utils/constants/users';
import { getClientTrackingStatusText } from '../../../../utils/order-utils';
import { Widget } from '../widget';
export const DetailModal = (props) => {
const {
visible,
onRequestClose,
onPressViewProfile,
onPressCancelOrder,
onPressCall,
onPressChat,
profile,
trackingStatus,
usertype,
origin,
destination,
duration,
distance,
value,
sinceTime,
untilTime,
orderDate,
assistant,
withReturn,
uriIMG
} = props;
const { width } = Dimensions.get('window');
return (
<Modal
visible={visible}
onRequestClose={onRequestClose}
header
headerColor="#2A2E43"
headerRight={
<CloseTouchable onPress={onRequestClose}>
<Icon.Ionicons name="ios-close" color="white" size={26} />
</CloseTouchable>
}
>
<ScrollView
style={{ backgroundColor: '#2A2E43' }}
contentContainerStyle={{ alignItems: 'center' }}
>
<Container>
<HeaderText>Tu pedido</HeaderText>
<ListItem
titleStyle={{ fontSize: 18, fontWeight: '600', color: 'white' }}
title={profile.title}
subtitleStyle={{ fontSize: 14, color: '#959DAD', marginTop: 8 }}
subtitle="Ver perfil"
containerStyle={{
paddingHorizontal: 0,
paddingVertical: 15,
backgroundColor: '#2A2E43'
}}
leftAvatar={{
source:
uriIMG == ''
? require('../../../../assets/images/user_profile.png')
: { uri: uriIMG },
size: 'medium'
}}
rightElement={
<RowContainer>
<ActionButton onPress={onPressChat}>
<Icon.Ionicons name="ios-chatbubbles" color="white" size={20} />
</ActionButton>
{usertype === CLIENT_USER_TYPE && (
<ActionButton onPress={onPressCall}>
<Icon.Ionicons name="ios-call" color="white" size={20} />
</ActionButton>
)}
</RowContainer>
}
onPress={onPressViewProfile}
/>
<Divider style={{ backgroundColor: '#707070', marginBottom: 15, opacity: 0.2 }} />
<TitleText>Estado</TitleText>
<SubtitleText>{getClientTrackingStatusText(trackingStatus)}</SubtitleText>
<RowContainer>
<Widget value={sinceTime + ' hs'} label="A partir de" icon="ios-navigate" />
<Widget value={'$' + value} label="Tarifa a pagar" icon="ios-cash" />
<Widget value={assistant ? 'Si' : 'No'} label="Ayudante" icon="md-person" />
<Widget value={withReturn ? 'Si' : 'No'} label="Retorno" icon="ios-return-left" />
<Widget value={orderDate} label="Fecha a realizar" icon="ios-calendar" />
<Widget
value={untilTime == '' ? 'A elección' : untilTime + ' hs'}
label="Horario limite"
icon="ios-timer"
/>
</RowContainer>
<Divider style={{ backgroundColor: '#707070', marginBottom: 15, opacity: 0.2 }} />
<TitleText>Tu viaje</TitleText>
<Trip origin={origin} destinations={destination} dark />
<RowContainer>
<Widget value={duration} label="Duración" icon="ios-timer" />
<Widget value={distance} label="Recorrido" icon="ios-map" />
</RowContainer>
<CancelButtonContainer>
<Button
width={width - 60}
color="#444F63"
radius
onPress={onPressCancelOrder}
title="CANCELAR PEDIDO"
/>
</CancelButtonContainer>
</Container>
</ScrollView>
</Modal>
);
};
|
$(document).ready(function() {
var camera, scene, renderer;
var pano = document.getElementById('pano');
var target = new THREE.Vector3();
var lon = 90, lat = 0;
var phi = 0, theta = 0;
var touchX, touchY;
var tc_bg_switch = true,switch_fm = true,switch_dengta = true,switch_jiangtai = true,switch_chuan = true,switch_feiji = true,switch_chengshi = true,switch_gaotie = true,switch_huojian = true;
var video_fm = document.getElementById('video_fm');
var mp3_dangzhang_19 = document.getElementById('dangzhang_19_mp3');
var video_dengta = document.getElementById('video_dengta');
var video_jiangtai = document.getElementById('video_jiangtai');
var video_chuan = document.getElementById('video_chuan');
var video_feiji = document.getElementById('video_feiji');
var video_chengshi = document.getElementById('video_chengshi');
var video_gaotie = document.getElementById('video_gaotie');
var video_huojian = document.getElementById('video_huojian');
mp3_dangzhang_19.volume = 1;
video_fm.style["object-position"]= "0px -60px";
video_dengta.style["object-position"]= "0px -60px";
video_jiangtai.style["object-position"]= "0px -60px";
video_chuan.style["object-position"]= "0px -60px";
video_feiji.style["object-position"]= "0px -60px";
video_chengshi.style["object-position"]= "0px -60px";
video_gaotie.style["object-position"]= "0px -60px";
video_huojian.style["object-position"]= "0px -60px";
var shareArr_list = ['我第一次进入人民大会堂,竟是以这样的方式','我已受邀到人民大会堂听报告,想来快点!','从未想到,我以这样的方式看报告'];
var shareArr = Math.floor((Math.random()*shareArr_list.length));
$('.share-title').text(shareArr_list[shareArr]);
//创建一个加载
var loader = new window.PxLoader(),
baseUrl = './';
var fileList = [
'video/fm_video1.mp4',
'music/bg.mp3',
'music/dangzhang_19.mp3',
'images/controlIcon.png',
'images/controlIconae.png',
'images/fenxiang.jpg',
'images/fm_bg.jpg',
'images/fm_bt.png',
'images/fm_start.png',
'images/next.png',
'images/qj_btn_img.png',
'images/panorama.back.jpg',
'images/panorama.top.jpg',
'images/panorama.left.jpg',
'images/panorama.right.jpg',
'images/panorama.front.jpg',
'images/panorama.bottom.jpg',
'images/yuandian.png',
'images/tc_bg.png',
'images/tc_bg_pc.png',
'images/cztd_bg.png',
'images/cztd_btn.png',
'images/cztd_close.png',
'images/cztd_img.png',
'images/dangzhang_move.png'
];
for(var i = 0; i < fileList.length; i++) {
var pxImage = new PxLoaderImage(baseUrl + fileList[i]);
pxImage.imageNumber = i + 1;
loader.add(pxImage);
}
//加载的进度...
loader.addProgressListener(function(e) {
var num = Math.floor((e.completedCount / e.totalCount) * 100);
$('#loading_p').find('p').text(num+'%');
});
//加载完成执行...
loader.addCompletionListener(function() {
setTimeout(function(){
$('#loading').fadeOut(1000);
},1200);
setTimeout(function () {
$('#fm_bt').addClass('animated fadeInUp').show();
},2200);
setTimeout(function () {
$('#fm_start').addClass('animated fadeInUp').show();
$('#fm').bind('touchstart',function () {
$('#fm').fadeOut();
$('#fm_video_box').show();
video_fm.play();
$('.yuandian_move').addClass('animated hinges infinite pulse');
});
$('#fm_cp').addClass('animated fadeInUp').show();
},3000);
});
//开始加载loader...
loader.start();
//封面视频结束
video_fm.addEventListener('timeupdate',function() {
if(this.currentTime > 18 && switch_fm){
$('#qj_btn').show();
switch_fm = false;
}else if(this.currentTime > 45 && switch_dengta){
switch_dengta = false;
}else if(this.currentTime > 76 && switch_jiangtai){
switch_jiangtai = false;
}else if(this.currentTime > 98 && switch_chuan){
switch_chuan = false;
}else if(this.currentTime > 125 && switch_feiji){
switch_feiji = false;
}else if(this.currentTime > 169 && switch_chengshi){
switch_chengshi = false;
}else if(this.currentTime > 215 && switch_gaotie){
switch_gaotie = false;
}
if (this.ended) {
video_fm.load();
$('#fm_video_box').hide();
// video_fm.pause();
$('#tc_bg').show();
setTimeout(function () {
$('#tc_bg').hide();
},3000);
}
// if (this.currentTime > 3) {
// $('#fm_video_box').fadeOut();
// video_fm.pause();
// $('.yuandian_move').addClass('animated hinges infinite pulse');
// // $('#aud2').get(0).play();
// }
});
//点击qj_btn
$('#qj_btn').bind('touchstart',function () {
close_video();
if(tc_bg_switch){
$('#tc_bg').show();
setTimeout(function () {
$('#tc_bg').hide();
},3000);
}
tc_bg_switch = false;
$(this).hide();
video_fm.pause();
$('#fm_video_box').hide();
$('#video_dengta_box').hide();
});
video_dengta.addEventListener("x5videoexitfullscreen", function(){
this.load();
// this.currentTime = 0;
// this.pause();
});
video_jiangtai.addEventListener("x5videoexitfullscreen", function(){
this.load();
// this.currentTime = 0;
// this.pause();
});
video_chuan.addEventListener("x5videoexitfullscreen", function(){
this.load();
// this.currentTime = 0;
// this.pause();
});
video_feiji.addEventListener("x5videoexitfullscreen", function(){
this.load();
// this.currentTime = 0;
// this.pause();
});
video_chengshi.addEventListener("x5videoexitfullscreen", function(){
this.load();
// this.currentTime = 0;
// this.pause();
});
video_gaotie.addEventListener("x5videoexitfullscreen", function(){
this.load();
// this.currentTime = 0;
// this.pause();
});
video_huojian.addEventListener("x5videoexitfullscreen", function(){
this.load();
// this.currentTime = 0;
// this.pause();
});
//点击dengta_yuandian
$('#dengta_yuandian').bind('touchstart',function () {
mp3_dangzhang_19.currentTime = 0;
mp3_dangzhang_19.pause();
$('#aud2').get(0).play();
$('#dengta_yuandian').removeClass('animated hinges infinite pulse');
$('#qj_btn,#video_dengta_box').show();
video_dengta.play();
});
//点击jiangtai_yuandian
$('#jiangtai_yuandian').bind('touchstart',function () {
mp3_dangzhang_19.currentTime = 0;
mp3_dangzhang_19.pause();
$('#aud2').get(0).play();
switch_dengta = false;switch_fm = false;
switch_jiangtai = true;
$('#jiangtai_yuandian').removeClass('animated hinges infinite pulse');
$('#qj_btn,#video_jiangtai_box').show();
video_jiangtai.play();
});
//点击chuan_yuandian
$('#chuan_yuandian').bind('touchstart',function () {
mp3_dangzhang_19.currentTime = 0;
mp3_dangzhang_19.pause();
$('#aud2').get(0).play();
switch_jiangtai = false;switch_dengta = false;switch_fm = false;
switch_chuan = true;
$('#chuan_yuandian').removeClass('animated hinges infinite pulse');
$('#qj_btn,#video_chuan_box').show();
video_chuan.play();
});
//点击feiji_yuandian
$('#feiji_yuandian').bind('touchstart',function () {
mp3_dangzhang_19.currentTime = 0;
mp3_dangzhang_19.pause();
$('#aud2').get(0).play();
switch_chuan = false;switch_jiangtai = false;switch_dengta = false;switch_fm = false;
switch_feiji = true;
$('#feiji_yuandian').removeClass('animated hinges infinite pulse');
$('#qj_btn,#video_feiji_box').show();
video_feiji.play();
});
//点击chengshi_yuandian
$('#chengshi_yuandian').bind('touchstart',function () {
mp3_dangzhang_19.currentTime = 0;
mp3_dangzhang_19.pause();
$('#aud2').get(0).play();
switch_feiji = false;switch_chuan = false;switch_jiangtai = false;switch_dengta = false;switch_fm = false;
switch_chengshi = true;
$('#chengshi_yuandian').removeClass('animated hinges infinite pulse');
$('#qj_btn,#video_chengshi_box').show();
video_chengshi.play();
});
//点击gaotie_yuandian
$('#gaotie_yuandian').bind('touchstart',function () {
mp3_dangzhang_19.currentTime = 0;
mp3_dangzhang_19.pause();
$('#aud2').get(0).play();
switch_chengshi = false;switch_chuan = false;switch_feiji = false;switch_jiangtai =false;switch_dengta =false;switch_fm = false;
switch_gaotie = true;
$('#gaotie_yuandian').removeClass('animated hinges infinite pulse');
$('#qj_btn,#video_gaotie_box').show();
video_gaotie.play();
});
//点击huojian_yuandian
$('#huojian_yuandian').bind('touchstart',function () {
mp3_dangzhang_19.currentTime = 0;
mp3_dangzhang_19.pause();
$('#aud2').get(0).play();
switch_gaotie = false;switch_chengshi =false;switch_chuan =false;switch_feiji =false;switch_jiangtai =false;switch_dengta =false;switch_fm =false;
switch_huojian = true;
$('#huojian_yuandian').removeClass('animated hinges infinite pulse');
$('#qj_btn,#video_huojian_box').show();
video_huojian.play();
});
//点击dangzhang_yuandian
$('#dangzhang_yuandian').bind('touchstart',function () {
$('#dangzhang_move').addClass('animated fadeInUp').show();
$('#dangzhang_yuandian').removeClass('animated hinges infinite pulse');
$('#aud2').get(0).load();
mp3_dangzhang_19.volume = 1;
mp3_dangzhang_19.load();
mp3_dangzhang_19.play();
mp3_dangzhang_19.volume = 1;
});
//dangzhang_19_mp3监听
mp3_dangzhang_19.addEventListener('timeupdate',function () {
if(this.ended){
mp3_dangzhang_19.currentTime = 0;
mp3_dangzhang_19.pause();
$('#aud2').get(0).play();
}
});
//点击创作团队
$('#cztd_btn').bind('touchstart',function () {
$('#cztd').fadeIn();
});
$('#cztd_close').bind('touchstart',function () {
$('#cztd').fadeOut();
});
init();
animate();
function init() {
/**
* 添加相机
* @type {THREE.PerspectiveCamera}
*/
camera = new THREE.PerspectiveCamera(
90, // 相机视角的夹角
window.innerWidth / window.innerHeight, // 相机画幅比
100, // 最近焦距
1000 // 最远焦距
);
/**
* 创建场景
* @type {THREE.Scene}
*/
scene = new THREE.Scene();
/**
*正方体的6个面的资源及相关(坐标、旋转等)设置
*/
var flipAngle = Math.PI, // 180度
rightAngle = flipAngle / 2, // 90度
tileWidth = 636;
var sides = [{
url: "images/panorama.right.jpg", //right
position: [-tileWidth, 0, 0],
rotation: [0, rightAngle, 0]
}, {
url: "images/panorama.left.jpg", //left
position: [tileWidth, 0, 0],
rotation: [0, -rightAngle, 0]
}, {
url: "images/panorama.top.jpg", //top
position: [0, tileWidth, 0],
rotation: [rightAngle, 0, Math.PI]
}, {
url: "images/panorama.bottom.jpg", //bottom
position: [0, -tileWidth, 0],
rotation: [-rightAngle, 0, Math.PI]
}, {
url: "images/panorama.front.jpg", //front
position: [0, 0, tileWidth],
rotation: [0, Math.PI, 0]
}, {
url: "images/panorama.back.jpg", //back
position: [0, 0, -tileWidth],
rotation: [0, 0, 0]
}];
for ( var i = 0; i < sides.length; i ++ ) {
var side = sides[ i ];
var element = document.getElementById("bg_section_"+i);
element.width = 1273;
element.height = 1273; // 2 pixels extra to close the gap.
// 添加一个渲染器
var object = new THREE.CSS3DObject( element );
object.position.fromArray( side.position );
object.rotation.fromArray( side.rotation );
scene.add( object );
}
renderer = new THREE.CSS3DRenderer(); // 定义渲染器
renderer.setSize( window.innerWidth, window.innerHeight ); // 定义尺寸
pano.appendChild( renderer.domElement ); // 将场景到加入页面中
initDevices();
initMouseControl();
}
// 初始化控制器
function initMouseControl() {
document.addEventListener( 'mousedown', onDocumentMouseDown, false );
document.addEventListener( 'wheel', onDocumentMouseWheel, false );
document.addEventListener( 'touchstart', onDocumentTouchStart, false );
document.addEventListener( 'touchmove', onDocumentTouchMove, false );
window.addEventListener( 'resize', onWindowResize, false );
}
var controlsBtn= document.getElementById("controlBtn"); // 控制陀螺仪开关的按钮
var isDeviceing = true; // 陀螺仪状态
controlsBtn.addEventListener("touchend", controlDevice, true);
// isDeviceing == true ? $("#controlBtn").addClass("controlIconae") : $("#controlBtn").addClass("controlIcon");
// 初始化陀螺仪
function initDevices() {
deviceControl = new THREE.DeviceOrientationControls(camera);
}
/* 控制陀螺仪 */
function controlDevice(event) {
if (isDeviceing == true) {
isDeviceing = false;
//关闭陀螺仪
$("#controlBtn").removeClass("controlIcon").addClass("controlIconae");
} else {
isDeviceing = true;
//开启陀螺仪
$("#controlBtn").removeClass("controlIconae").addClass("controlIcon");
}
}
/**
* 窗体大小改变
*/
function onWindowResize() {
camera.aspect = window.innerWidth / window.innerHeight;
camera.updateProjectionMatrix();
renderer.setSize( window.innerWidth, window.innerHeight );
}
/*
相机焦点跟着鼠标或手指的操作移动
*/
function onDocumentMouseDown( event ) {
event.preventDefault();
document.addEventListener( 'mousemove', onDocumentMouseMove, false );
document.addEventListener( 'mouseup', onDocumentMouseUp, false );
}
function onDocumentMouseMove( event ) {
var movementX = event.movementX || event.mozMovementX || event.webkitMovementX || 0;
var movementY = event.movementY || event.mozMovementY || event.webkitMovementY || 0;
lon -= movementX * 0.1;
lat += movementY * 0.1;
}
function onDocumentMouseUp( event ) {
document.removeEventListener( 'mousemove', onDocumentMouseMove );
document.removeEventListener( 'mouseup', onDocumentMouseUp );
}
/**
* 鼠标滚轮改变相机焦距
*/
function onDocumentMouseWheel( event ) {
camera.fov += event.deltaY * 0.05;
camera.updateProjectionMatrix();
}
function onDocumentTouchStart( event ) {
event.preventDefault();
var touch = event.touches[ 0 ];
touchX = touch.screenX;
touchY = touch.screenY;
}
function onDocumentTouchMove( event ) {
event.preventDefault();
var touch = event.touches[ 0 ];
lon -= ( touch.screenX - touchX ) * 0.1;
lat += ( touch.screenY - touchY ) * 0.1;
touchX = touch.screenX;
touchY = touch.screenY;
}
/**
* 实时渲染函数
*/
function animate() {
requestAnimationFrame(animate);
// lon = Math.max(-180, Math.min(180, lon));//限制固定角度内旋转
// lon -= 0.1;//横向自动旋转
// lat += 0.1;//纵向自动旋转
lat = Math.max(-70, Math.min(70, lat)); //限制固定角度内旋转
phi = THREE.Math.degToRad(100 - lat);
theta = THREE.Math.degToRad(lon);
target.x = Math.sin(phi) * Math.cos(theta);
target.y = Math.cos(phi);
target.z = Math.sin(phi) * Math.sin(theta);
camera.lookAt( target );
camera.updateProjectionMatrix();
isDeviceing == false ? initMouseControl() : deviceControl.update();
renderer.render(scene, camera);
}
function close_video() {
$('.video_box').hide();
video_dengta.load();
// video_dengta.currentTime = 0;
// video_dengta.pause();
video_jiangtai.load();
// video_jiangtai.currentTime = 0;
// video_jiangtai.pause();
video_chuan.load();
// video_chuan.currentTime = 0;
// video_chuan.pause();
video_feiji.load();
// video_feiji.currentTime = 0;
// video_feiji.pause();
video_chengshi.load();
// video_chengshi.currentTime = 0;
// video_chengshi.pause();
video_gaotie.load();
// video_gaotie.currentTime = 0;
// video_gaotie.pause();
video_huojian.load();
// video_huojian.currentTime = 0;
// video_huojian.pause();
}
//music
$("#viose").click(function () {
if($("#aud2").get(0).paused == false){
$(this).addClass("no").find("img").attr("src","images/close.png");
$("#aud2").get(0).pause();
}else{
$(this).removeClass("no").find("img").attr("src","images/open.png");
$("#aud2").get(0).play();
}
});
});
|
import BranchState from './BranchState.jsx';
import { connect } from 'react-redux';
import { withRouter } from 'react-router';
import branchStateActions from '../../redux-actions/branchStateActions';
import { getSelectedBranch, getActiveModules, getInactiveModules, getPendingBranchBuilds } from '../../selectors';
const mapStateToProps = (state, ownProps) => {
return {
activeModules: getActiveModules(state),
inactiveModules: getInactiveModules(state),
branchId: parseInt(ownProps.params.branchId, 10),
branchInfo: getSelectedBranch(state),
loadingBranchStatus: state.branchState.get('loading'),
selectedModuleId: state.branchState.get('selectedModuleId'),
pendingBranchBuilds: getPendingBranchBuilds(state),
malformedFiles: state.branchState.get('malformedFiles'),
branchNotFound: state.branchState.get('branchNotFound'),
showBetaFeatureAlert: !state.dismissedBetaNotifications.get('branchStatePage'),
errorMessage: state.branchState.getIn(['error', 'message'])
};
};
export default withRouter(connect(mapStateToProps, branchStateActions)(BranchState));
|
// ==ClosureCompiler==
// @compilation_level ADVANCED_OPTIMIZATIONS
// @externs_url http://closure-compiler.googlecode.com/svn/trunk/contrib/externs/maps/google_maps_api_v3.js
// ==/ClosureCompiler==
/**
* @name CSS3 InfoDiv with tabs for Google Maps API V3
* @version 0.8
* @author Luke Mahe
* @fileoverview
* This library is a CSS Infodiv with tabs. It uses css3 rounded corners and
* drop shadows and animations. It also allows tabs
*/
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* A CSS3 InfoDiv v0.8
* @param {Object.<string, *>=} opt_options Optional properties to set.
* @extends {google.maps.OverlayView}
* @constructor
*/
function InfoDiv(opt_options) {
this.extend(InfoDiv, google.maps.OverlayView);
this.tabs_ = [];
this.activeTab_ = null;
this.baseZIndex_ = 100;
this.isOpen_ = false;
var options = opt_options || {};
this.buildDom_();
this.setValues(options);
}
window['InfoDiv'] = InfoDiv;
/**
* Default arrow size
* @const
* @private
*/
InfoDiv.prototype.ARROW_SIZE_ = 15;
/**
* Default arrow style
* @const
* @private
*/
InfoDiv.prototype.ARROW_STYLE_ = 0;
/**
* Default shadow style
* @const
* @private
*/
InfoDiv.prototype.SHADOW_STYLE_ = 1;
/**
* Default min width
* @const
* @private
*/
InfoDiv.prototype.MIN_WIDTH_ = 50;
/**
* Default arrow position
* @const
* @private
*/
InfoDiv.prototype.ARROW_POSITION_ = 50;
/**
* Default padding
* @const
* @private
*/
InfoDiv.prototype.PADDING_ = 10;
InfoDiv.prototype.DIVTOPLOT_ = 'none';
/**
* Default tab Padding
* @const
* @private
*/
InfoDiv.prototype.TABPADDING_ = 10;
/**
* Default border width
* @const
* @private
*/
InfoDiv.prototype.BORDER_WIDTH_ = 1;
/**
* Default border color
* @const
* @private
*/
InfoDiv.prototype.BORDER_COLOR_ = '#ccc';
/**
* Default border radius
* @const
* @private
*/
InfoDiv.prototype.BORDER_RADIUS_ = 10;
/**
* Default background color
* @const
* @private
*/
InfoDiv.prototype.BACKGROUND_COLOR_ = '#fff';
/**
* Extends a objects prototype by anothers.
*
* @param {Object} obj1 The object to be extended.
* @param {Object} obj2 The object to extend with.
* @return {Object} The new extended object.
* @ignore
*/
InfoDiv.prototype.extend = function(obj1, obj2) {
return (function(object) {
for (var property in object.prototype) {
this.prototype[property] = object.prototype[property];
}
return this;
}).apply(obj1, [obj2]);
};
/**
* Builds the InfoDiv dom
* @private
*/
InfoDiv.prototype.buildDom_ = function() {
var bubble = this.bubble_ = document.createElement('DIV');
bubble.style['border'] = 'solid 1px';
};
/**
* Sets the background class name
*
* @param {string} className The class name to set.
*/
InfoDiv.prototype.setBackgroundClassName = function(className) {
this.set('backgroundClassName', className);
};
InfoDiv.prototype['setBackgroundClassName'] =
InfoDiv.prototype.setBackgroundClassName;
/**
* changed MVC callback
*/
InfoDiv.prototype.backgroundClassName_changed = function() {
this.content_.className = this.get('backgroundClassName');
};
InfoDiv.prototype['backgroundClassName_changed'] =
InfoDiv.prototype.backgroundClassName_changed;
/**
* Sets the class of the tab
*
* @param {string} className the class name to set.
*/
InfoDiv.prototype.setTabClassName = function(className) {
this.set('tabClassName', className);
};
InfoDiv.prototype['setTabClassName'] =
InfoDiv.prototype.setTabClassName;
/**
* Sets the class of the active Tab
*
* @param {string} className the class name to set.
*/
InfoDiv.prototype.setActiveTabClassName = function(activeTabClassName) {
this.set('activeTabClassName', activeTabClassName);
};
InfoDiv.prototype['activeTabClassName'] =
InfoDiv.prototype.setActiveTabClassName;
/**
* tabClassName changed MVC callback
*/
InfoDiv.prototype.tabClassName_changed = function() {
this.updateTabStyles_();
};
InfoDiv.prototype['tabClassName_changed'] =
InfoDiv.prototype.tabClassName_changed;
/**
* Gets the style of the arrow
*
* @private
* @return {number} The style of the arrow.
*/
InfoDiv.prototype.getArrowStyle_ = function() {
return parseInt(this.get('arrowStyle'), 10) || 0;
};
/**
* Sets the style of the arrow
*
* @param {number} style The style of the arrow.
*/
InfoDiv.prototype.setArrowStyle = function(style) {
this.set('arrowStyle', style);
};
InfoDiv.prototype['setArrowStyle'] =
InfoDiv.prototype.setArrowStyle;
/**
* Gets the size of the arrow
*
* @private
* @return {number} The size of the arrow.
*/
InfoDiv.prototype.getArrowSize_ = function() {
return parseInt(this.get('arrowSize'), 10) || 0;
};
/**
* Sets the size of the arrow
*
* @param {number} size The size of the arrow.
*/
InfoDiv.prototype.setArrowSize = function(size) {
this.set('arrowSize', size);
};
InfoDiv.prototype['setArrowSize'] =
InfoDiv.prototype.setArrowSize;
/**
* Set the position of the InfoDiv arrow
*
* @param {number} pos The position to set.
*/
InfoDiv.prototype.setArrowPosition = function(pos) {
this.set('arrowPosition', pos);
};
InfoDiv.prototype['setArrowPosition'] =
// InfoDiv.prototype.setArrowPosition;
/**
* Get the position of the InfoDiv arrow
*
* @private
* @return {number} The position..
*/
InfoDiv.prototype.getArrowPosition_ = function() {
return parseInt(this.get('arrowPosition'), 10) || 0;
};
/**
* Set the zIndex of the InfoDiv
*
* @param {number} zIndex The zIndex to set.
*/
InfoDiv.prototype.setZIndex = function(zIndex) {
this.set('zIndex', zIndex);
};
InfoDiv.prototype['setZIndex'] = InfoDiv.prototype.setZIndex;
/**
* Get the zIndex of the InfoDiv
*
* @return {number} The zIndex to set.
*/
InfoDiv.prototype.getZIndex = function() {
return parseInt(this.get('zIndex'), 10) || this.baseZIndex_;
};
/**
* Set the style of the shadow
*
* @param {number} shadowStyle The style of the shadow.
*/
InfoDiv.prototype.setShadowStyle = function(shadowStyle) {
this.set('shadowStyle', shadowStyle);
};
InfoDiv.prototype['setShadowStyle'] = InfoDiv.prototype.setShadowStyle;
/**
* Get the style of the shadow
*
* @private
* @return {number} The style of the shadow.
*/
InfoDiv.prototype.getShadowStyle_ = function() {
return parseInt(this.get('shadowStyle'), 10) || 0;
};
/**
* Show the close button
*/
InfoDiv.prototype.showCloseButton = function() {
this.set('hideCloseButton', false);
};
InfoDiv.prototype['showCloseButton'] = InfoDiv.prototype.showCloseButton;
/**
* Hide the close button
*/
InfoDiv.prototype.hideCloseButton = function() {
this.set('hideCloseButton', true);
};
InfoDiv.prototype['hideCloseButton'] = InfoDiv.prototype.hideCloseButton;
/**
* Set the background color
*
* @param {string} color The color to set.
*/
InfoDiv.prototype.setBackgroundColor = function(color) {
if (color) {
this.set('backgroundColor', color);
}
};
InfoDiv.prototype['setBackgroundColor'] =
InfoDiv.prototype.setBackgroundColor;
/**
* Set the border color
*
* @param {string} color The border color.
*/
InfoDiv.prototype.setBorderColor = function(color) {
if (color) {
this.set('borderColor', color);
}
};
InfoDiv.prototype['setBorderColor'] = InfoDiv.prototype.setBorderColor;
/**
* borderColor changed MVC callback
*/
InfoDiv.prototype.borderColor_changed = function() {
var borderColor = this.get('borderColor');
};
/**
* Set the radius of the border
*
* @param {number} radius The radius of the border.
*/
InfoDiv.prototype.setBorderRadius = function(radius) {
this.set('borderRadius', radius);
};
InfoDiv.prototype['setBorderRadius'] = InfoDiv.prototype.setBorderRadius;
/**
* Get the radius of the border
*
* @private
* @return {number} The radius of the border.
*/
InfoDiv.prototype.getBorderRadius_ = function() {
return parseInt(this.get('borderRadius'), 10) || 0;
};
/**
* Get the width of the border
*
* @private
* @return {number} width The width of the border.
*/
InfoDiv.prototype.getBorderWidth_ = function() {
return parseInt(this.get('borderWidth'), 10) || 0;
};
/**
* Set the width of the border
*
* @param {number} width The width of the border.
*/
InfoDiv.prototype.setBorderWidth = function(width) {
this.set('borderWidth', width);
};
InfoDiv.prototype['setBorderWidth'] = InfoDiv.prototype.setBorderWidth;
/**
* Update the arrow style
* @private
*/
InfoDiv.prototype.updateArrowStyle_ = function() {
};
/**
* Set the padding of the InfoDiv
*
* @param {number} padding The padding to apply.
*/
InfoDiv.prototype.setPadding = function(padding) {
this.set('padding', padding);
};
InfoDiv.prototype['setPadding'] = InfoDiv.prototype.setPadding;
InfoDiv.prototype.setDivToPlot = function(divToPlot) {
this.set('divToPlot', divToPlot);
};
InfoDiv.prototype['setDivToPlot'] = InfoDiv.prototype.setDivToPlot;
/**
* set the padding of the Tab's
*
* @param {number} padding The padding to apply to the tab
*/
InfoDiv.prototype.settabPadding = function(tabPadding) {
this.set('tabPadding', tabPadding);
};
InfoDiv.prototype['settabPadding'] = InfoDiv.prototype.settabPadding;
/**
* Set the padding of the InfoDiv
*
* @private
* @return {number} padding The padding to apply.
*/
InfoDiv.prototype.getPadding_ = function() {
return parseInt(this.get('padding'), 10) || 0;
};
InfoDiv.prototype.getDivToPlot_ = function() {
return this.get('divToPlot') || 'none';
};
InfoDiv.prototype.gettabPadding_ = function() {
return parseInt(this.get('tabPadding'), 10) || 0;
};
/**
* Add px extention to the number
*
* @param {number} num The number to wrap.
* @return {string|number} A wrapped number.
*/
InfoDiv.prototype.px = function(num) {
if (num) {
// 0 doesn't need to be wrapped
return num + 'px';
}
return num;
};
/**
* Add events to stop propagation
* @private
*/
InfoDiv.prototype.addEvents_ = function() {
// We want to cancel all the events so they do not go to the map
var events = ['mousedown', 'mousemove', 'mouseover', 'mouseout', 'mouseup',
'mousewheel', 'DOMMouseScroll', 'touchstart', 'touchend', 'touchmove',
'dblclick', 'contextmenu', 'click'];
var bubble = this.bubble_;
this.listeners_ = [];
for (var i = 0, event; event = events[i]; i++) {
this.listeners_.push(
google.maps.event.addDomListener(bubble, event, function(e) {
e.cancelBubble = true;
if (e.stopPropagation) {
e.stopPropagation();
}
})
);
}
};
/**
* On Adding the InfoDiv to a map
* Implementing the OverlayView interface
*/
InfoDiv.prototype.onAdd = function() {
if (!this.bubble_) {
this.buildDom_();
}
this.addEvents_();
};
InfoDiv.prototype['onAdd'] = InfoDiv.prototype.onAdd;
/**
* Draw the InfoDiv
* Implementing the OverlayView interface
*/
InfoDiv.prototype.draw = function() {
var projection = this.getProjection();
if (!projection) {
// The map projection is not ready yet so do nothing
return;
}
var latLng = /** @type {google.maps.LatLng} */ (this.get('position'));
if (!latLng) {
this.close();
return;
}
var tabHeight = 0;
if (this.activeTab_) {
tabHeight = this.activeTab_.offsetHeight;
}
var anchorHeight = this.getAnchorHeight_();
var arrowSize = this.getArrowSize_();
var arrowPosition = this.getArrowPosition_();
arrowPosition = arrowPosition / 100;
var pos = projection.fromLatLngToDivPixel(latLng);
var width = this.contentContainer_.offsetWidth;
var height = this.bubble_.offsetHeight;
if (!width) {
return;
}
// Adjust for the height of the info bubble
var top = pos.y - (height + arrowSize);
if (anchorHeight) {
// If there is an anchor then include the height
top -= anchorHeight;
}
var left = pos.x - (width * arrowPosition);
this.bubble_.style['top'] = this.px(top);
this.bubble_.style['left'] = this.px(left);
var shadowStyle = parseInt(this.get('shadowStyle'), 10);
};
InfoDiv.prototype['draw'] = InfoDiv.prototype.draw;
/**
* Removing the InfoDiv from a map
*/
InfoDiv.prototype.onRemove = function() {
if (this.bubble_ && this.bubble_.parentNode) {
this.bubble_.parentNode.removeChild(this.bubble_);
}
for (var i = 0, listener; listener = this.listeners_[i]; i++) {
google.maps.event.removeListener(listener);
}
};
InfoDiv.prototype['onRemove'] = InfoDiv.prototype.onRemove;
/**
* Is the InfoDiv open
*
* @return {boolean} If the InfoDiv is open.
*/
InfoDiv.prototype.isOpen = function() {
return this.isOpen_;
};
InfoDiv.prototype['isOpen'] = InfoDiv.prototype.isOpen;
/**
* Close the InfoDiv
*/
InfoDiv.prototype.close = function() {
if (this.bubble_) {
// Remove the animation so we next time it opens it will animate again
this.bubble_.className =
this.bubble_.className.replace(this.animationName_, '');
}
this.isOpen_ = false;
};
InfoDiv.prototype['close'] = InfoDiv.prototype.close;
/**
* Open the InfoDiv (asynchronous).
*
* @param {google.maps.Map=} opt_map Optional map to open on.
* @param {google.maps.MVCObject=} opt_anchor Optional anchor to position at.
*/
InfoDiv.prototype.open = function(opt_map, opt_anchor) {
var that = this;
window.setTimeout(function() {
that.open_(opt_map, opt_anchor);
}, 0);
};
/**
* Open the InfoDiv
* @private
* @param {google.maps.Map=} opt_map Optional map to open on.
* @param {google.maps.MVCObject=} opt_anchor Optional anchor to position at.
*/
InfoDiv.prototype.open_ = function(opt_map, opt_anchor) {
this.updateContent_();
if (opt_map) {
this.setMap(opt_map);
}
var divToPlot = document.getElementById(this.getDivToPlot_());
while (divToPlot.hasChildNodes()) {
divToPlot.removeChild(divToPlot.lastChild);
}
this.buildDom_();
var content = this.getContent();
content = this.htmlToDocumentFragment_(content);
this.bubble_.appendChild(content);
divToPlot.appendChild(this.bubble_);
};
/**
* Set the position of the InfoDiv
*
* @param {google.maps.LatLng} position The position to set.
*/
InfoDiv.prototype.setPosition = function(position) {
if (position) {
// this.set('position', position);
}
};
InfoDiv.prototype['setPosition'] = InfoDiv.prototype.setPosition;
/**
* Returns the position of the InfoDiv
*
* @return {google.maps.LatLng} the position.
*/
InfoDiv.prototype.getPosition = function() {
return /** @type {google.maps.LatLng} */ (this.get('position'));
};
InfoDiv.prototype['getPosition'] = InfoDiv.prototype.getPosition;
/**
* position changed MVC callback
*/
InfoDiv.prototype.position_changed = function() {
this.draw();
};
InfoDiv.prototype['position_changed'] =
InfoDiv.prototype.position_changed;
/**
* Pan the InfoDiv into view
*/
InfoDiv.prototype.panToView = function() {
var projection = this.getProjection();
if (!projection) {
// The map projection is not ready yet so do nothing
return;
}
if (!this.bubble_) {
// No Bubble yet so do nothing
return;
}
var anchorHeight = this.getAnchorHeight_();
var height = this.bubble_.offsetHeight + anchorHeight;
var map = this.get('map');
var mapDiv = map.getDiv();
var mapHeight = mapDiv.offsetHeight;
var latLng = this.getPosition();
var centerPos = projection.fromLatLngToContainerPixel(map.getCenter());
var pos = projection.fromLatLngToContainerPixel(latLng);
// Find out how much space at the top is free
var spaceTop = centerPos.y - height;
// Fine out how much space at the bottom is free
var spaceBottom = mapHeight - centerPos.y;
var needsTop = spaceTop < 0;
var deltaY = 0;
if (needsTop) {
spaceTop *= -1;
deltaY = (spaceTop + spaceBottom) / 2;
}
pos.y -= deltaY;
latLng = projection.fromContainerPixelToLatLng(pos);
if (map.getCenter() != latLng) {
map.panTo(latLng);
}
};
InfoDiv.prototype['panToView'] = InfoDiv.prototype.panToView;
/**
* Converts a HTML string to a document fragment.
*
* @param {string} htmlString The HTML string to convert.
* @return {Node} A HTML document fragment.
* @private
*/
InfoDiv.prototype.htmlToDocumentFragment_ = function(htmlString) {
htmlString = htmlString.replace(/^\s*([\S\s]*)\b\s*$/, '$1');
var tempDiv = document.createElement('DIV');
tempDiv.innerHTML = htmlString;
if (tempDiv.childNodes.length == 1) {
return /** @type {!Node} */ (tempDiv.removeChild(tempDiv.firstChild));
} else {
var fragment = document.createDocumentFragment();
while (tempDiv.firstChild) {
fragment.appendChild(tempDiv.firstChild);
}
return fragment;
}
};
/**
* Removes all children from the node.
*
* @param {Node} node The node to remove all children from.
* @private
*/
InfoDiv.prototype.removeChildren_ = function(node) {
if (!node) {
return;
}
var child;
while (child = node.firstChild) {
node.removeChild(child);
}
};
/**
* Sets the content of the infodiv.
*
* @param {string|Node} content The content to set.
*/
InfoDiv.prototype.setContent = function(content) {
this.set('content', content);
};
InfoDiv.prototype['setContent'] = InfoDiv.prototype.setContent;
/**
* Get the content of the infodiv.
*
* @return {string|Node} The marker content.
*/
InfoDiv.prototype.getContent = function() {
return /** @type {Node|string} */ (this.get('content'));
};
InfoDiv.prototype['getContent'] = InfoDiv.prototype.getContent;
/**
* Sets the marker content and adds loading events to images
*/
InfoDiv.prototype.updateContent_ = function() {
if (!this.content_) {
// The Content area doesnt exist.
return;
}
this.removeChildren_(this.content_);
var content = this.getContent();
if (content) {
if (typeof content == 'string') {
content = this.htmlToDocumentFragment_(content);
}
this.content_.appendChild(content);
var that = this;
var images = this.content_.getElementsByTagName('IMG');
for (var i = 0, image; image = images[i]; i++) {
// Because we don't know the size of an image till it loads, add a
// listener to the image load so the marker can resize and reposition
// itself to be the correct height.
google.maps.event.addDomListener(image, 'load', function() {
that.imageLoaded_();
});
}
google.maps.event.trigger(this, 'domready');
}
this.redraw_();
};
/**
* Image loaded
* @private
*/
InfoDiv.prototype.imageLoaded_ = function() {
var pan = !this.get('disableAutoPan');
this.redraw_();
if (pan && (this.tabs_.length == 0 || this.activeTab_.index == 0)) {
this.panToView();
}
};
/**
* Updates the styles of the tabs
* @private
*/
InfoDiv.prototype.updateTabStyles_ = function() {
if (this.tabs_ && this.tabs_.length) {
for (var i = 0, tab; tab = this.tabs_[i]; i++) {
this.setTabStyle_(tab.tab);
}
this.activeTab_.style['zIndex'] = this.baseZIndex_;
var borderWidth = this.getBorderWidth_();
var padding = this.gettabPadding_() / 2;
this.activeTab_.style['borderBottomWidth'] = 0;
this.activeTab_.style['paddingBottom'] = this.px(padding + borderWidth);
}
};
/**
* Sets the style of a tab
* @private
* @param {Element} tab The tab to style.
*/
InfoDiv.prototype.setTabStyle_ = function(tab) {
var backgroundColor = this.get('backgroundColor');
var borderColor = this.get('borderColor');
var borderRadius = this.getBorderRadius_();
var borderWidth = this.getBorderWidth_();
var padding = this.gettabPadding_();
var marginRight = this.px(-(Math.max(padding, borderRadius)/2));
console.log(marginRight);
var borderRadiusPx = this.px(borderRadius);
var index = this.baseZIndex_;
if (tab.index) {
index -= tab.index;
}
// The styles for the tab
var styles = {
'cssFloat': 'left',
'position': 'relative',
'cursor': 'pointer',
'backgroundColor': backgroundColor,
'border': this.px(borderWidth) + ' solid ' + borderColor,
'padding': this.px(padding / 2) + ' ' + this.px(padding),
'marginRight': marginRight,
'whiteSpace': 'nowrap',
'borderRadiusTopLeft': borderRadiusPx,
'MozBorderRadiusTopleft': borderRadiusPx,
'webkitBorderTopLeftRadius': borderRadiusPx,
'borderRadiusTopRight': borderRadiusPx,
'MozBorderRadiusTopright': borderRadiusPx,
'webkitBorderTopRightRadius': borderRadiusPx,
'zIndex': index,
'display': 'inline'
};
for (var style in styles) {
tab.style[style] = styles[style];
}
var className = this.get('tabClassName');
if (className != undefined) {
tab.className += ' ' + className;
}
console.log(this);
};
/**
* Add user actions to a tab
* @private
* @param {Object} tab The tab to add the actions to.
*/
InfoDiv.prototype.addTabActions_ = function(tab) {
var that = this;
tab.listener_ = google.maps.event.addDomListener(tab, 'click', function() {
that.setTabActive_(this);
});
};
/**
* Set a tab at a index to be active
*
* @param {number} index The index of the tab.
*/
InfoDiv.prototype.setTabActive = function(index) {
var tab = this.tabs_[index - 1];
if (tab) {
this.setTabActive_(tab.tab);
}
};
InfoDiv.prototype['setTabActive'] = InfoDiv.prototype.setTabActive;
/**
* Set a tab to be active
* @private
* @param {Object} tab The tab to set active.
*/
InfoDiv.prototype.setTabActive_ = function(tab) {
if (!tab) {
this.setContent('');
this.updateContent_();
return;
}
var padding = this.gettabPadding_() / 2;
var borderWidth = this.getBorderWidth_();
if (this.activeTab_) {
var activeTab = this.activeTab_;
activeTab.className = this.tabClassName;
activeTab.style['zIndex'] = this.baseZIndex_ - activeTab.index;
activeTab.style['paddingBottom'] = this.px(padding);
activeTab.style['borderBottomWidth'] = this.px(borderWidth);
}
tab.className = this.activeTabClassName;
tab.style['zIndex'] = this.baseZIndex_;
tab.style['borderBottomWidth'] = 0;
tab.style['marginBottomWidth'] = '-10px';
tab.style['paddingBottom'] = this.px(padding + borderWidth);
this.setContent(this.tabs_[tab.index].content);
this.updateContent_();
this.activeTab_ = tab;
this.redraw_();
};
/**
* Set the max width of the InfoDiv
*
* @param {number} width The max width.
*/
InfoDiv.prototype.setMaxWidth = function(width) {
this.set('maxWidth', width);
};
InfoDiv.prototype['setMaxWidth'] = InfoDiv.prototype.setMaxWidth;
/**
* maxWidth changed MVC callback
*/
InfoDiv.prototype.maxWidth_changed = function() {
this.redraw_();
};
InfoDiv.prototype['maxWidth_changed'] =
InfoDiv.prototype.maxWidth_changed;
/**
* Set the max height of the InfoDiv
*
* @param {number} height The max height.
*/
InfoDiv.prototype.setMaxHeight = function(height) {
this.set('maxHeight', height);
};
InfoDiv.prototype['setMaxHeight'] = InfoDiv.prototype.setMaxHeight;
/**
* maxHeight changed MVC callback
*/
InfoDiv.prototype.maxHeight_changed = function() {
this.redraw_();
};
InfoDiv.prototype['maxHeight_changed'] =
InfoDiv.prototype.maxHeight_changed;
/**
* Set the min width of the InfoDiv
*
* @param {number} width The min width.
*/
InfoDiv.prototype.setMinWidth = function(width) {
this.set('minWidth', width);
};
InfoDiv.prototype['setMinWidth'] = InfoDiv.prototype.setMinWidth;
/**
* minWidth changed MVC callback
*/
InfoDiv.prototype.minWidth_changed = function() {
this.redraw_();
};
InfoDiv.prototype['minWidth_changed'] =
InfoDiv.prototype.minWidth_changed;
/**
* Set the min height of the InfoDiv
*
* @param {number} height The min height.
*/
InfoDiv.prototype.setMinHeight = function(height) {
this.set('minHeight', height);
};
InfoDiv.prototype['setMinHeight'] = InfoDiv.prototype.setMinHeight;
/**
* minHeight changed MVC callback
*/
InfoDiv.prototype.minHeight_changed = function() {
this.redraw_();
};
InfoDiv.prototype['minHeight_changed'] =
InfoDiv.prototype.minHeight_changed;
/**
* Add a tab
*
* @param {string} label The label of the tab.
* @param {string|Element} content The content of the tab.
*/
InfoDiv.prototype.addTab = function(label, content) {
var tab = document.createElement('DIV');
tab.innerHTML = label;
this.setTabStyle_(tab);
this.addTabActions_(tab);
// this.tabsContainer_.appendChild(tab);
this.tabs_.push({
label: label,
content: content,
tab: tab
});
tab.index = this.tabs_.length - 1;
tab.style['zIndex'] = this.baseZIndex_ - tab.index;
if (!this.activeTab_) {
this.setTabActive_(tab);
}
tab.className = tab.className + ' ' + this.animationName_;
this.redraw_();
};
InfoDiv.prototype['addTab'] = InfoDiv.prototype.addTab;
/**
* Update a tab at a speicifc index
*
* @param {number} index The index of the tab.
* @param {?string} opt_label The label to change to.
* @param {?string} opt_content The content to update to.
*/
InfoDiv.prototype.updateTab = function(index, opt_label, opt_content) {
if (!this.tabs_.length || index < 0 || index >= this.tabs_.length) {
return;
}
var tab = this.tabs_[index];
if (opt_label != undefined) {
tab.tab.innerHTML = tab.label = opt_label;
}
if (opt_content != undefined) {
tab.content = opt_content;
}
if (this.activeTab_ == tab.tab) {
this.setContent(tab.content);
this.updateContent_();
}
this.redraw_();
};
InfoDiv.prototype['updateTab'] = InfoDiv.prototype.updateTab;
/**
* Remove a tab at a specific index
*
* @param {number} index The index of the tab to remove.
*/
InfoDiv.prototype.removeTab = function(index) {
if (!this.tabs_.length || index < 0 || index >= this.tabs_.length) {
return;
}
var tab = this.tabs_[index];
tab.tab.parentNode.removeChild(tab.tab);
google.maps.event.removeListener(tab.tab.listener_);
this.tabs_.splice(index, 1);
delete tab;
for (var i = 0, t; t = this.tabs_[i]; i++) {
t.tab.index = i;
}
if (tab.tab == this.activeTab_) {
// Removing the current active tab
if (this.tabs_[index]) {
// Show the tab to the right
this.activeTab_ = this.tabs_[index].tab;
} else if (this.tabs_[index - 1]) {
// Show a tab to the left
this.activeTab_ = this.tabs_[index - 1].tab;
} else {
// No tabs left to sho
this.activeTab_ = undefined;
}
this.setTabActive_(this.activeTab_);
}
this.redraw_();
};
InfoDiv.prototype['removeTab'] = InfoDiv.prototype.removeTab;
/**
* Get the size of an element
* @private
* @param {Node|string} element The element to size.
* @param {number=} opt_maxWidth Optional max width of the element.
* @param {number=} opt_maxHeight Optional max height of the element.
* @return {google.maps.Size} The size of the element.
*/
InfoDiv.prototype.getElementSize_ = function(element, opt_maxWidth,
opt_maxHeight) {
var sizer = document.createElement('DIV');
sizer.style['display'] = 'inline';
sizer.style['position'] = 'absolute';
sizer.style['visibility'] = 'hidden';
if (typeof element == 'string') {
sizer.innerHTML = element;
} else {
sizer.appendChild(element.cloneNode(true));
}
document.body.appendChild(sizer);
var size = new google.maps.Size(sizer.offsetWidth, sizer.offsetHeight);
// If the width is bigger than the max width then set the width and size again
if (opt_maxWidth && size.width > opt_maxWidth) {
sizer.style['width'] = this.px(opt_maxWidth);
size = new google.maps.Size(sizer.offsetWidth, sizer.offsetHeight);
}
// If the height is bigger than the max height then set the height and size
// again
if (opt_maxHeight && size.height > opt_maxHeight) {
sizer.style['height'] = this.px(opt_maxHeight);
size = new google.maps.Size(sizer.offsetWidth, sizer.offsetHeight);
}
document.body.removeChild(sizer);
delete sizer;
return size;
};
/**
* Redraw the InfoDiv
* @private
*/
InfoDiv.prototype.redraw_ = function() {
this.figureOutSize_();
this.positionCloseButton_();
this.draw();
};
/**
* Figure out the optimum size of the InfoDiv
* @private
*/
InfoDiv.prototype.figureOutSize_ = function() {
var map = this.get('map');
if (!map) {
return;
}
var padding = this.getPadding_();
var borderWidth = this.getBorderWidth_();
var borderRadius = this.getBorderRadius_();
var arrowSize = this.getArrowSize_();
var mapDiv = map.getDiv();
var gutter = arrowSize * 2;
var mapWidth = mapDiv.offsetWidth - gutter;
var mapHeight = mapDiv.offsetHeight - gutter - this.getAnchorHeight_();
var tabHeight = 0;
var width = /** @type {number} */ (this.get('minWidth') || 0);
var height = /** @type {number} */ (this.get('minHeight') || 0);
var maxWidth = /** @type {number} */ (this.get('maxWidth') || 0);
var maxHeight = /** @type {number} */ (this.get('maxHeight') || 0);
maxWidth = Math.min(mapWidth, maxWidth);
maxHeight = Math.min(mapHeight, maxHeight);
var tabWidth = 0;
if (this.tabs_.length) {
// If there are tabs then you need to check the size of each tab's content
for (var i = 0, tab; tab = this.tabs_[i]; i++) {
var tabSize = this.getElementSize_(tab.tab, maxWidth, maxHeight);
var contentSize = this.getElementSize_(tab.content, maxWidth, maxHeight);
if (width < tabSize.width) {
width = tabSize.width;
}
// Add up all the tab widths because they might end up being wider than
// the content
tabWidth += tabSize.width;
if (height < tabSize.height) {
height = tabSize.height;
}
if (tabSize.height > tabHeight) {
tabHeight = tabSize.height;
}
if (width < contentSize.width) {
width = contentSize.width;
}
if (height < contentSize.height) {
height = contentSize.height;
}
}
} else {
var content = /** @type {string|Node} */ (this.get('content'));
if (typeof content == 'string') {
content = this.htmlToDocumentFragment_(content);
}
if (content) {
var contentSize = this.getElementSize_(content, maxWidth, maxHeight);
if (width < contentSize.width) {
width = contentSize.width;
}
if (height < contentSize.height) {
height = contentSize.height;
}
}
}
if (maxWidth) {
width = Math.min(width, maxWidth);
}
if (maxHeight) {
height = Math.min(height, maxHeight);
}
width = Math.max(width, tabWidth);
if (width == tabWidth) {
width = width + 2 * padding;
}
arrowSize = arrowSize * 2;
width = Math.max(width, arrowSize);
// Maybe add this as a option so they can go bigger than the map if the user
// wants
if (width > mapWidth) {
width = mapWidth;
}
if (height > mapHeight) {
height = mapHeight - tabHeight;
}
// if (this.tabsContainer_) {
// this.tabHeight_ = tabHeight;
// this.tabsContainer_.style['width'] = this.px(tabWidth);
// }
// this.contentContainer_.style['width'] = this.px(width);
// this.contentContainer_.style['height'] = this.px(height);
};
/**
* Get the height of the anchor
*
* This function is a hack for now and doesn't really work that good, need to
* wait for pixelBounds to be correctly exposed.
* @private
* @return {number} The height of the anchor.
*/
InfoDiv.prototype.getAnchorHeight_ = function() {
var anchor = this.get('anchor');
if (anchor) {
var anchorPoint = /** @type google.maps.Point */(this.get('anchorPoint'));
if (anchorPoint) {
return -1 * anchorPoint.y;
}
}
return 0;
};
InfoDiv.prototype.anchorPoint_changed = function() {
this.draw();
};
InfoDiv.prototype['anchorPoint_changed'] = InfoDiv.prototype.anchorPoint_changed;
/**
* Position the close button in the right spot.
* @private
*/
InfoDiv.prototype.positionCloseButton_ = function() {
};
|
// Get input element
let inputLastName = document.getElementById("lastname");
// Add on input an event listener on blur to display a message
inputLastName.addEventListener("blur", function(){
alert("Merci de votre participation")
})
|
import {
graphql,
GraphQLSchema,
GraphQLString,
GraphQLObjectType
} from 'graphql';
import rootQuery from './queries/root';
export default new GraphQLSchema({
query: rootQuery
});
|
/**
* Copyright (C) 2009 eXo Platform SAS.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
function UIItemSelector() {
this.backupClass;
this.backupItem;
};
/**
* Mouse over event, Set highlight to OverItem
* @param {Object} selectedElement focused element
* @param {boolean} mouseOver
*/
UIItemSelector.prototype.onOver = function(selectedElement, mouseOver) {
if(selectedElement.className == "Item"){
eXo.webui.UIItemSelector.beforeActionHappen(selectedElement);
}
if(mouseOver) {
this.backupClass = selectedElement.className;
selectedElement.className = "OverItem Item";
// minh.js.exo
// this.onChangeItemDetail(selectedElement, true);
} else {
selectedElement.className = this.backupClass;
// this.onChangeItemDetail(selectedElement, false);
}
};
/**
* Mouse click event, highlight selected item and non-highlight other items
* There are 3 types of item: Item, OverItem, SeletedItem
* @param {Object} clickedElement
*/
UIItemSelector.prototype.onClick = function(clickedElement) {
var itemListContainer = clickedElement.parentNode;
var allItems = eXo.core.DOMUtil.findDescendantsByClass(itemListContainer, "div", "Item");
eXo.webui.UIItemSelector.beforeActionHappen(clickedElement);
if(this.allItems.length <= 0) return;
for(var i = 0; i < allItems.length; i++) {
if(allItems[i] != clickedElement) {
allItems[i].className = "Item";
this.onChangeItemDetail(clickedElement, true);
} else {
allItems[i].className = "SelectedItem Item";
this.backupClass = "SelectedItem Item";
this.onChangeItemDetail(clickedElement, false);
}
}
};
/**
* Change UI of new selected item, selected item will be displayed and others will be hidden
* @param {Object} itemSelected selected item
* @param {boolean} mouseOver
*/
UIItemSelector.prototype.onChangeItemDetail = function(itemSelected, mouseOver) {
if(!this.allItems || this.allItems.length <= 0 ) return;
if(mouseOver) {
for(var i = 0; i < this.allItems.length; i++) {
if(this.allItems[i] == itemSelected) {
this.itemDetails[i].style.display = "block";
} else {
this.itemDetails[i].style.display = "none";
}
}
} else {
for(var i = 0; i < this.allItems.length; i++) {
if(this.allItems[i].className == "SelectedItem Item") {
this.itemDetails[i].style.display = "block";
} else {
this.itemDetails[i].style.display = "none";
}
}
}
};
/* Pham Thanh Tung added */
UIItemSelector.prototype.onClickCategory = function(clickedElement, form, component, option) {
eXo.webui.UIItemSelector.onClick(clickedElement);
if (eXo.webui.UIItemSelector.SelectedItem == null) {
eXo.webui.UIItemSelector.SelectedItem = new Object();
}
eXo.webui.UIItemSelector.SelectedItem.component = component;
eXo.webui.UIItemSelector.SelectedItem.option = option;
};
/* Pham Thanh Tung added */
UIItemSelector.prototype.onClickOption = function(clickedElement, form, component, option) {
var itemDetailList = eXo.core.DOMUtil.findAncestorByClass(clickedElement, "ItemDetailList");
var selectedItems = eXo.core.DOMUtil.findDescendantsByClass(itemDetailList, "div", "SelectedItem");
for (var i = 0; i < selectedItems.length; i++) {
selectedItems[i].className = "NormalItem";
}
clickedElement.className = "SelectedItem";
if (eXo.webui.UIItemSelector.SelectedItem == null) {
eXo.webui.UIItemSelector.SelectedItem = new Object();
}
eXo.webui.UIItemSelector.SelectedItem.component = component;
eXo.webui.UIItemSelector.SelectedItem.option = option;
};
/*TODO: Review This Function (Ha's comment)*/
UIItemSelector.prototype.beforeActionHappen = function(selectedItem) {
DOMUtil = eXo.core.DOMUtil;
this.uiItemSelector = DOMUtil.findAncestorByClass(selectedItem, "UIItemSelector");
this.itemList = DOMUtil.findAncestorByClass(selectedItem, "ItemList");
this.itemListContainer = DOMUtil.findAncestorByClass(selectedItem, "ItemListContainer") ;
this.itemListAray = DOMUtil.findDescendantsByClass(this.itemListContainer.parentNode, "div", "ItemList");
if(this.itemListAray.length > 1) {
this.itemDetailLists = DOMUtil.findDescendantsByClass(this.itemListContainer.parentNode, "div", "ItemDetailList");
this.itemDetailList = null;
for(var i = 0; i < this.itemListAray.length; i++) {
if(this.itemListAray[i].style.display == "none") {
this.itemDetailLists[i].style.display = "none" ;
} else {
this.itemDetailList = this.itemDetailLists[i];
this.itemDetailList.style.display = "block";
}
}
} else {
this.itemDetailList = DOMUtil.findFirstDescendantByClass(this.itemListContainer.parentNode, "div", "ItemDetailList");
}
//this.itemDetails = eXo.core.DOMUtil.findChildrenByClass(this.itemDetailList, "div", "ItemDetail");
this.itemDetails = DOMUtil.findDescendantsByClass(this.itemDetailList, "div", "ItemDetail");
var firstItemDescendant = DOMUtil.findFirstDescendantByClass(this.itemList, "div", "Item");
var firstItemParent = firstItemDescendant.parentNode;
this.allItems = DOMUtil.findChildrenByClass(firstItemParent, "div", "Item");
};
UIItemSelector.prototype.showPopupCategory = function(selectedNode) {
var DOMUtil = eXo.core.DOMUtil ;
var itemListContainer = DOMUtil.findAncestorByClass(selectedNode, "ItemListContainer") ;
var uiPopupCategory = DOMUtil.findFirstDescendantByClass(itemListContainer, "div", "UIPopupCategory") ;
itemListContainer.style.position = "relative" ;
if(uiPopupCategory.style.display == "none") {
uiPopupCategory.style.position = "absolute" ;
uiPopupCategory.style.top = "23px" ;
uiPopupCategory.style.left = "0px" ;
uiPopupCategory.style.display = "block" ;
uiPopupCategory.style.width = "100%" ;
} else {
uiPopupCategory.style.display = "none" ;
}
};
UIItemSelector.prototype.selectCategory = function(selectedNode) {
var DOMUtil = eXo.core.DOMUtil ;
var uiPopupCategory = DOMUtil.findAncestorByClass(selectedNode, "UIPopupCategory") ;
var itemListContainer = DOMUtil.findAncestorByClass(selectedNode, "OverflowContainer") ;
var selectedNodeIndex = eXo.webui.UIItemSelector.findIndex(selectedNode) ;
var itemLists = DOMUtil.findDescendantsByClass(itemListContainer, "div", "ItemList") ;
var itemDetailLists = DOMUtil.findDescendantsByClass(itemListContainer, "div", "ItemDetailList");
for(var i = 0; i < itemLists.length; i++) {
if(i != selectedNodeIndex){
itemLists[i].style.display = "none" ;
itemDetailLists[i].style.display = "none" ;
} else{
itemDetailLists[i].style.display = "block" ;
itemLists[i].style.display = "block" ;
}
}
uiPopupCategory.style.display = "none" ;
};
UIItemSelector.prototype.findIndex = function(object) {
var parentNode = object.parentNode ;
var objectElements = eXo.core.DOMUtil.findChildrenByClass(parentNode, "div", object.className) ;
for(var i = 0; i < objectElements.length; i++) {
if(objectElements[i] == object) return i ;
}
};
/**
* @author dang.tung
*
* TODO To change the template layout in page config
Called by UIPageTemplateOptions.java
Review UIDropDownControl.java: set javascrip action
UIDropDownControl.js : set this method to do
*/
UIItemSelector.prototype.selectPageLayout = function(id, selectedIndex) {
var DOMUtil = eXo.core.DOMUtil ;
var uiDropDownControl = document.getElementById(id);
var itemSelectorAncestor = DOMUtil.findAncestorByClass(uiDropDownControl, "ItemSelectorAncestor") ;
var itemList = DOMUtil.findDescendantsByClass(itemSelectorAncestor, "div", "ItemList") ;
var itemSelectorLabel = DOMUtil.findDescendantsByClass(itemSelectorAncestor, "a", "OptionItem") ;
var uiItemSelector = DOMUtil.findAncestorByClass(uiDropDownControl, "UIItemSelector");
var itemDetailList = DOMUtil.findDescendantsByClass(uiItemSelector, "div", "ItemDetailList") ;
if(itemList == null) return;
for(i = 0; i < itemSelectorLabel.length; ++i) {
if(i >= itemList.length) continue;
if(i == selectedIndex) {
itemList[i].style.display = "block";
if(itemDetailList.length < 1) continue;
itemDetailList[i].style.display = "block";
var selectedItem = DOMUtil.findFirstDescendantByClass(itemList[i], "div", "SelectedItem");
if(selectedItem == null) continue;
var setValue = DOMUtil.findDescendantById(selectedItem, "SetValue");
if(setValue == null) continue;
eval(setValue.innerHTML);
} else {
itemList[i].style.display = "none";
if(itemDetailList.length > 0) itemDetailList[i].style.display = "none";
}
}
} ;
eXo.webui.UIItemSelector = new UIItemSelector() ;
|
import { SET_CART_TOTAL, SET_CART_ITEMS, SET_CAR_DATA, SET_EXTRAS_DATA } from '../store/types';
import { store } from '../store/store';
export const setCartData = (items, type) => (dispatch) => {
const currentState = store.getState().cart;
if (type === 'car') {
const total = parseInt(parseInt(currentState.total).toFixed()) + parseInt(parseInt(items.total).toFixed());
dispatch({
type: SET_CAR_DATA,
payload: items
});
dispatch({
type: SET_CART_TOTAL,
payload: total
});
}
if (type === 'extras') {
const total =
parseInt(parseInt(currentState.total).toFixed()) +
parseInt(parseInt(items.price).toFixed()) * parseInt(parseInt(items.quantity));
dispatch({
type: SET_EXTRAS_DATA,
payload: items
});
dispatch({
type: SET_CART_TOTAL,
payload: total
});
}
};
|
'use strict';
var zgodaPierwsza = document.getElementById('zgoda-marketingowa-1');
var zgodaDruga = document.getElementById('zgoda-marketingowa-2');
var obieZgody = document.getElementById('wszystkie-zgody');
var wszystkieCheckboxy = document.querySelectorAll('input[type=checkbox]');
var inputImie = document.getElementById('name');
var inputEmail = document.getElementById('email');
var wyslijBtn = document.getElementById('wyslij');
var wiadomosc = document.getElementById('wiadomosc');
function stanCheckboxa() {
zgodaPierwsza.checked = this.checked;
zgodaDruga.checked = this.checked;
zgodaDruga.disabled = this.checked;
zgodaPierwsza.disabled = this.checked;
console.log(this.checked);
}
obieZgody.onchange = stanCheckboxa;
function walidacjaPol(event) {
event.preventDefault();
wiadomosc.innerHTML('');
if (inputImie.value == '') {
var msgImie = document.createElement('li');
msgImie.innerHTML = 'Wpisz imię!';
wiadomosc.appendChild(msgImie);
event.preventDefault();
} if (inputEmail.value == '') {
var msgEmail = document.createElement('li');
msgEmail.innerHTML = 'Podaj Email!';
wiadomosc.appendChild(msgEmail);
event.preventDefault();
} if (zgodaPierwsza.checked == false) {
var msgMarketing = document.createElement('li');
msgMarketing.innerHTML = 'Kolego, zaznacz zgode na spam';
wiadomosc.appendChild(msgMarketing);
event.preventDefault();
}
}
wyslijBtn.onclick = walidacjaPol;
|
function header(){
var html = (function() {/*
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand brand-title" href="index.html">iloli</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<div class="navbar-right">
<ul class="nav navbar-nav">
<li><a href="index.html#whats"><span class="brand-title">iloli</span>とは</a></li>
</ul>
<a href="https://docs.google.com/forms/d/1jXNnrTf5IUhFlovefWSTonEIExJvdZVld7nfWpY9tI8/viewform" target=”_blank" onclick="ga('send', 'event', 'contact', 'click', 'お問い合わせ');"><button type="button" class="btn btn-default navbar-btn">お問い合わせ</button></a>
</div>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
*/}).toString().match(/\/\*([^]*)\*\//)[1];
document.write(html);
}
function footer(){
var html = (function() {/*
<!-- Footer -->
<footer class="footer container-fluid">
<div class="text-center">
<p>
<!-- Facebook Share -->
<div class="fb-share-button" data-href="http://iloli.co/" data-layout="button_count"></div>
<!-- Twitter Share -->
<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://iloli.co/" data-via="creators_lab_jp" data-hashtags="iloli">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
</p>
</div>
<div class="row text-center footer-nav">
<div class="col-sm-4"><a href="terms.html">利用規約</a></div>
<div class="col-sm-4"><a href="privacy.html">プライバシーポリシー</a></div>
<div class="col-sm-4"><a href="https://docs.google.com/forms/d/1jXNnrTf5IUhFlovefWSTonEIExJvdZVld7nfWpY9tI8/viewform" onclick="ga('send', 'event', 'contact', 'click', 'お問い合わせ');" target=”_blank”>お問い合わせ</a></div>
</div>
<div class="text-center footer-credit">
<p>Produced by <a href="http://creatorslab.jp" target=”_blank”><img src="img/cl_logo.png" alt="Creator \'s Lab. Logo" class="corp-logo" /></a></p>
</div>
</footer>
*/}).toString().match(/\/\*([^]*)\*\//)[1];
document.write(html);
}
|
export const QUOTEINFO = [
{
id:1,
text: 'You cannot alter your fate. However, you can rise to meet it.',
movie: 'Princess Mononoke',
year: 1997
},
{
id:2,
text: 'We each need to find our own inspiration. Sometimes it’s not easy.',
movie: 'Kiki’s Delivery Service',
year: 1989
}
];
|
import React, { useContext } from 'react'
import { ThemeContext } from '../contexts/ThemeContext'
import { BookContext } from '../contexts/BookContext'
const BookList = () => {
// Load context
const context = useContext(ThemeContext)
const { isLightTheme, light, dark } = context
const books = useContext(BookContext)
// Decide theme
const bookListTheme = isLightTheme ? light : dark
const { syntax, ui, bg } = bookListTheme
const bookListStyle = {
color: syntax,
background: bg
}
const singleBookStyle = {
background: ui
}
return (
<div className="book-list" style={bookListStyle}>
<ul>
{books.map(book => (
<li key={book.id} style={singleBookStyle}>
{book.title}
</li>
))}
</ul>
</div>
)
}
export default BookList
|
import React, { useContext } from 'react'
import Styled from 'styled-components'
import { SearchContext } from '../contexts/SearchContext'
// This component to render info for each artist the user selects from the search bar
const SelectedItem = ({ item }) => {
const { search, dispatch } = useContext(SearchContext)
const handleRemoveItem = () => {
console.log('Removing selected item...')
dispatch({
type: 'REMOVE_SELECTION',
...search,
selected: search.selected.filter(selection => selection.name !== item.name)
})
}
return (
<Container>
<ImageContainer>
{/* Check if API provides an image URL */}
{search.searchType[0] === 'artist'
? <img src={item.images.length > 0 ? item.images[0].url : 'https://image.flaticon.com/icons/png/128/122/122320.png'} alt={item.name} />
: <img src={item.album.images.length > 0 ? item.album.images[0].url : 'https://image.flaticon.com/icons/png/128/122/122320.png'} alt={item.name} />
}
</ImageContainer>
<p>{item.name}</p>
<button onClick={handleRemoveItem}><i className="fas fa-times"></i></button>
</Container>
)
}
export default SelectedItem
const Container = Styled.div`
display: flex;
align-items: center;
justify-content: space-between;
height: 3rem;
width: 200px;
margin-right: 10px;
padding: 4px;
border-radius: 30px;
background-color: rgba(234, 241, 247, .3);
box-shadow: 0 2px 4px rgb(40, 40, 40);
p {
color: #eaf1f7;
font-weight: 700;
text-align: center;
}
button {
background: none;
border: none;
color: #eaf1f7;
font-size: 1rem;
font-weight: 700;
cursor: pointer;
padding: 0 8px 0 0;
}
`
const ImageContainer = Styled.div`
max-height: 100%;
img {
height: 3rem;
width: 3rem;
border-radius: 50%;
}
`
|
analytics.factory('agendaService', function ($http, moment) {
// Internal variables used by the service for having a state. These are reset by the method resetState().
var agendaService = {};
var date;
var endTime;
var agenda = [];
var attendees;
var name = "";
var description = "";
var googleId = ""; // The google ID. Used when updating events on google.
var edit = { // This is used to determine if a new event should be created or an existing one be edited.
'isEdit': false,
'id': 0
};
// Resets the state of the service.
agendaService.resetState = function () {
date = moment("08:00", 'HH:mm');
endTime = date.clone();
agenda = [];
attendees = [];
edit.isEdit = false;
edit.id = 0;
linkId = "";
name = "";
description = "";
};
agendaService.setEdit = function(boolean, id) {
edit.isEdit = boolean;
edit.id = id;
};
agendaService.getEdit = function() {
return edit;
};
agendaService.setDate = function(newDate) {
date = newDate;
};
agendaService.getDate = function () {
return date;
};
agendaService.changeDate = function (newDate) {
var duration = agendaService.getTotalTime();
date.year(newDate.get('year')).month(newDate.get('month')).date(newDate.get('date'));
endTime = date.clone();
endTime.add(duration);
};
agendaService.setEndTime = function (newTime) {
endTime = newTime;
};
agendaService.getEndTime = function () {
return endTime;
};
agendaService.setName = function(newName) {
name = newName;
};
agendaService.getName = function () {
return name;
};
agendaService.setDescription = function(newDescription) {
description = newDescription;
};
agendaService.getDescription = function () {
return description;
};
agendaService.getGoogleId = function() {
return googleId;
};
agendaService.setGoogleId = function(newId) {
googleId = newId;
};
agendaService.getAgenda = function () {
return agenda;
};
agendaService.setAgenda = function (newAgenda) {
agenda = newAgenda;
};
agendaService.addToAgenda = function (activity, index) {
if (!idInList(activity.id, agenda)) {
if (index) {
agenda.splice(index, 0, activity);
} else {
agenda.push(activity);
}
} else {
removeFromList(activity.id, agenda);
if (index) {
agenda.splice(index, 0, activity);
} else {
agenda.push(activity);
}
}
};
agendaService.removeFromAgenda = function (id) {
removeFromList(id, agenda);
};
agendaService.addAttendee = function (attendee) {
// Don't add attendee if already in list.
if (!idInList(attendee.id, attendees)) {
attendees.push(attendee);
}
};
agendaService.removeAttendee = function (id) {
removeFromList(id, attendees);
};
agendaService.setAttendees = function(newAttendees) {
attendees = newAttendees;
};
agendaService.getAttendees = function () {
return attendees;
};
agendaService.getAttendeeEmails = function () {
var emailList = [];
for (i = 0; i < attendees.length; i++) {
emailList.push({'email': attendees[i].email});
}
return emailList;
};
agendaService.changeStartTime = function (hour, minute) {
var duration = agendaService.getTotalTime();
date.hour(hour);
date.minute(minute);
endTime = date.clone();
endTime.add(duration);
};
agendaService.getTotalTime = function () {
return moment.duration(moment(endTime).diff(moment(date)));
};
// For example, here you can get all activities for a certain agenda_id or user_id.
// This is put into the parameter and sent as params to the backend.
agendaService.getActivities = function (activityData) {
return $http({
headers: {
"Content-Type": "application/json"
},
url: apiUrl + "/activities",
method: "GET",
params: activityData
});
};
// The many-to-many relational REST call to all agendas for a specific user.
agendaService.getAgendas = function (id) {
return $http({
headers: {
"Content-Type": "application/json"
},
url: apiUrl + "/users/" + id + "/agendas",
method: "GET"
});
};
// The many-to-many relational REST call to all users for a specific agenda.
agendaService.getAgendaUsers = function (id) {
return $http({
headers: {
"Content-Type": "application/json"
},
url: apiUrl + "/agendas/" + id + "/users",
method: "GET"
});
};
agendaService.getFinalData = function(link, googleId) {
var attendeeIds = [];
for (var i = 0; i < attendees.length; i++) {
attendeeIds.push(attendees[i].id);
}
var activityIds = [];
for (var i = 0; i < agenda.length; i++) {
activityIds.push(agenda[i].id);
}
var agendaData = {
'description': description,
'name': name,
'date': date.format("YYYY-MM-DD HH:mm:ss"),
'enddate': endTime.format("YYYY-MM-DD HH:mm:ss"),
'attendees': attendeeIds,
'activities': activityIds,
'link': link,
'google_id': googleId
};
console.log(agendaData);
return agendaData;
};
agendaService.newAgenda = function (link, googleId) {
var agendaData = agendaService.getFinalData(link, googleId);
return $http({
headers: {
"Content-Type": "application/json"
},
url: apiUrl + "/agendas",
method: "POST",
data: agendaData
});
};
agendaService.updateAgenda = function (link, googleId) {
var agendaData = agendaService.getFinalData(link, googleId);
return $http({
headers: {
"Content-Type": "application/json"
},
url: apiUrl + "/agendas/" + edit.id,
method: "PUT",
data: agendaData
});
};
agendaService.getAgendaWithID = function (id) {
return $http.get(apiUrl + '/agendas/' + id);
};
return agendaService;
});
|
var ExamAnswer = React.createClass({
render(){
var answers = this.props.answers.map((answer) => {
return(
<ExamAnswerList answer={answer} />
)
});
return(
<ol>
{answers}
</ol>
)
}
})
|
import { config } from 'dotenv';
import express from 'express';
import countryTrendRouter from './src/routers/country-trends';
import errorHandler from './src/middleware/errorHandler';
config();
const PORT = process.env.PORT || 8080;
const URI = process.env.URI || 'http://127.0.0.1';
const app = express();
app.use(helmet());
app.use(logger('dev'));
app.use(express.json());
app.use(express.urlencoded({ extended: false }));
app.use(cookieParser());
app.listen(PORT, () => {
console.log(`listening on ${URI}:${PORT}`);
});
app.use('/trends/:woeid', countryTrendRouter);
app.use((req, res, next) => {
next(createError.NotFound());
});
app.use(errorHandler);
export default app;
|
export const getPlayers = (state) => {
if (state.firestore.data._users === undefined) {
return undefined;
}
return Object.keys(state.firestore.data._users || [])
.map((userId) => {
const user = state.firestore.data._users[userId];
return {
id: user.id,
name: user.name,
rank: user.score / user.rounds,
online: user.online || false,
};
})
.sort((a, b) => b.rank - a.rank);
};
export const getPlayersBalanced = (state) => {
if (
state.firestore.data._ranks === undefined ||
state.firestore.data._config === undefined ||
state.firestore.data._users === undefined
) {
return undefined;
}
if (state.firestore.data._config.items === undefined) {
return undefined;
}
const ranks = state.firestore.data._ranks;
const rankList = state.firestore.data._config.items.ranks;
const users = state.firestore.data._users;
if (Object.keys(ranks).length < 2) {
return undefined;
}
const lastRank = ranks[rankList[rankList.length - 1]];
const previousRank = ranks[rankList[rankList.length - 2]];
return getMergedData(previousRank, lastRank, users);
};
const getMergedData = (previousRank, lastRank, users) => {
const mapResult = lastRank.users.concat(previousRank.users).reduce((result, item) => {
let newItem = Object.assign({}, item);
newItem.assists = parseInt(newItem.assists, 10);
newItem.deaths = parseInt(newItem.deaths, 10);
newItem.headshots = parseInt(newItem.headshots, 10);
newItem.kills = parseInt(newItem.kills, 10);
newItem.matches = parseInt(newItem.matches, 10);
newItem.rounds = parseInt(newItem.rounds, 10);
newItem.score = parseInt(newItem.score, 10);
if (result[newItem.id]) {
result[newItem.id].assists += newItem.assists;
result[newItem.id].deaths += newItem.deaths;
result[newItem.id].headshots += newItem.headshots;
result[newItem.id].kills += newItem.kills;
result[newItem.id].matches += newItem.matches;
result[newItem.id].rounds += newItem.rounds;
result[newItem.id].score += newItem.score;
} else {
result[newItem.id] = newItem;
}
return result;
}, {});
Object.keys(mapResult).forEach(i => {
mapResult[i].online = users[i].online;
});
return Object.keys(mapResult).map((userId) => {
const user = mapResult[userId];
return {
id: user.id,
name: user.name,
rank: user.score / user.rounds,
online: user.online || false,
};
})
.sort((a, b) => b.rank - a.rank);
};
|
export default function validateCreateLink({ description, url }) {
let errors = {}
// Description Errors
if (!description) {
errors.description = 'Description required'
} else if (description.length < 10) {
errors.description = 'Description must be at least 10 characters'
}
// Url Errors
if (!url) {
errors.url = 'URL required'
} else if (!/^(ftp|http|https):\/\/[^ "]+$/.test(url)) {
errors.url = 'URL must be valid'
}
return errors
}
|
import React from 'react'
import PropTypes from 'prop-types'
import BigNumber from 'bignumber.js'
import { omit } from 'lodash'
import { toBigNumber } from 'Utilities/convert'
import { tag as tagPropType, numberish } from 'Utilities/propTypes'
import Expandable from 'Components/Expandable'
class Units extends React.Component {
render() {
const { tag: Tag, value: propValue, symbol, showSymbol, precision, maxDigits, prefix, suffix, ...props } = this.props
const value = toBigNumber(propValue)
let expanded = value.toFormat()
let shrunk = expanded
if (precision) {
shrunk = value.toDigits(precision, BigNumber.ROUND_DOWN).toFormat()
const digitCount = shrunk.replace(/\D/g, '').length
if (digitCount > maxDigits) {
shrunk = value.toExponential(precision)
}
}
if (symbol) {
expanded = `${expanded} ${symbol}` // Expanded form should always include symbol
if (showSymbol) {
shrunk = `${shrunk} ${symbol}`
}
}
const expandable = (<Expandable tag={Tag} shrunk={shrunk} expanded={expanded} {...props}/>)
if (prefix || suffix) {
return (<Tag>{prefix}{expandable}{suffix}</Tag>)
}
return expandable
}
}
Units.propTypes = {
...omit(Expandable.propTypes, 'tag', 'shrunk', 'expanded'),
tag: tagPropType,
value: numberish.isRequired,
symbol: PropTypes.string,
showSymbol: PropTypes.bool,
precision: PropTypes.number,
maxDigits: PropTypes.number,
prefix: PropTypes.node,
suffix: PropTypes.node,
}
Units.defaultProps = {
...Expandable.defaultProps,
tag: 'span',
symbol: '',
showSymbol: true,
precision: 4,
maxDigits: 10,
prefix: '',
suffix: '',
}
export default Units
|
import React, {Component} from 'react';
import './WeatherTomorrow.css';
const toCelsius = require('../../../utils/toCelsius');
class WeatherTomorrow extends Component {
constructor(props) {
super(props);
}
render() {
if (this.props.tomorrow !== undefined) {
return (<div className="WeatherTomorrow">
<h2>DEPOIS DE AMANHÃ</h2>
<h2>Min: {toCelsius.convert(this.props.tomorrow.low)}°C Max: {toCelsius.convert(this.props.tomorrow.high)}°C</h2>
</div>);
} else {
return (<div className="WeatherTomorrow">
<h2>AMANHÃ</h2>
</div>);
}
}
}
export default WeatherTomorrow;
|
/* Copyright (c) 2020 Red Hat, Inc. */
/// <reference types="cypress" />
import { test_genericPolicyGovernance, test_applyPolicyYAML } from '../common/tests'
describe('RHACM4K-1724 - GRC UI: [P1][Sev1][policy-grc] Pod policy governance', () => {
test_genericPolicyGovernance('Pod_governance/policy-config.yaml', 'Pod_governance/violations-inform.yaml', 'Pod_governance/violations-enforce.yaml')
})
describe('GRC UI: [P1][Sev1][policy-grc] Pod policy governance - clean up', () => {
test_applyPolicyYAML('Pod_governance/Pod_specification_cleanup_policy_raw.yaml')
})
|
const { Tab, Company } = require('../models')
module.exports = app => {
app.get('/tab/:company', (req, res) => {
Tab.find({company: req.params.company})
.populate('company')
.populate('items')
.then(tab => res.json(tab))
.catch(e => console.log(e))
})
app.get('/tab/:_id', (req, res) => {
Tab.findById(req.params._id)
.populate('company')
.populate('items')
.then(tab => res.json(tab))
.catch(e => console.log(e))
})
app.post('/tab', (req, res) => {
Tab.create(req.body)
.then(({ _id, company }) => {
Company.updateOne({ _id: company }, { $push: { tabs: _id } })
.then(res.sendStatus(200))
.catch(e => console.log(e))
})
.catch(e => console.log(e))
})
app.put('/tab/:_id', (req, res) => {
Tab.findByIdAndUpdate({ _id: req.params._id }, { $set: req.body })
.then(res.sendStatus(200))
.catch(e => console.log(e))
})
app.delete('/tab/:_id', (req, res) => {
Tab.findByIdAndDelete(req.params._id)
.then(res.sendStatus(200))
.catch(e => console.log(e))
})
}
|
'user strict'
module.exports = (sequelize, DataTypes) => {
const Trigger = sequelize.define('trigger', {
name: {
type: DataTypes.STRING,
required: true
},
termA: {
type: DataTypes.STRING,
required: true
},
termB: {
type: DataTypes.STRING,
required: true
},
operator: {
type: DataTypes.ENUM,
values: ['lessOrEqual', 'greaterOrEqual', 'equals']
}
}, {
paranoid: true
});
return Trigger
}
|
$(document).ready(function () {
$(".Modern-Slider").slick({
autoplay: true,
autoplaySpeed: 6500,
speed: 500,
slidesToShow: 1,
slidesToScroll: 1,
pauseOnHover: false,
dots: true,
cssEase: "ease-out",
waitForAnimate: false,
fade: true,
draggable: false,
prevArrow: false,
nextArrow: false,
});
});
|
import React from 'react'
import { NavLink } from 'react-router-dom';
import web from "../src/images/img8.png"
import Common from './Common';
const About = () => {
return (
<>
<Common name="Welcomme to About Page of"
imgsrc={web}
visit="/contact"
btname="Contact Now"
p="We are the Shit Developer Ever Known." />
</>
)
}
export default About;
|
const reducer = (state = [], action) => {
switch (action.type) {
case 'SET_USERS':
return action.data;
default:
return state;
}
};
export const setUsers = (users) => {
return async (dispatch) => {
dispatch({
type: 'SET_USERS',
data: users
});
};
};
export default reducer;
|
import axios from 'axios'
import { CATEGORIES } from './__types'
export default () => async dispatch => {
try {
const response = await axios.get('https://turing-ecommerce-challenge.herokuapp.com/api/categories')
// console.log(response)
dispatch({
type: CATEGORIES,
payload: response.data.rows,
status: response.data.status
})
} catch (error) {
return {
error: error.message
}
}
}
|
var express = require("express");
var app = express();
var bodyParser = require("body-parser");
app.use(bodyParser.urlencoded({ extended: false }));
app.use(bodyParser.json());
app.use(express.static(__dirname + "/public"));
var server = app.listen(process.env.PORT || '8080',() => {console.log("App Listening for Connections..")});
var io = require('socket.io')(server);
var football_score = {
"viewers": 0,
"isHalfTime": false,
"isLive": false,
"team1": {
"name": null,
"scores": [/*{ "time": 0, "scorer": null }*/]
},
"team2": {
"name": null,
"scores": [/*{ "time": 0, "scorer": null }*/]
},
"matchWinner" : "not declared",
"commentary": [/*{ "time": "0000", "text": "Comments" }*/]
};
var table_tennis = {
"viewers": 0,
"setNumber": 1,
"isBreak": false,
"isLive": false,
"setHistory": [],
"player1": {
"college": null,
"name": null,
"points": 0,
"setWins": 0
},
"player2": {
"college": null,
"name": null,
"points": 0,
"setWins": 0
},
"matchWinner" : "not declared",
"commentary": [/*{ "time": "00", "text": "Comments" }*/]
};
var badminton = {
"viewers": 0,
"setNumber": 1,
"isBreak": false,
"isLive": false,
"setHistory": [],
"player1": {
"college": null,
"name": null,
"points": 0,
"setWins": 0
},
"player2": {
"college": null,
"name": null,
"points": 0,
"setWins": 0
},
"matchWinner" : "not declared",
"commentary": [/*{ "time": "00", "text": "Comments" }*/]
};
var basketball = {
"viewers": 0,
"quarterNumber": 1,
"isBreak": false,
"isLive": false,
"team1": {
"name": null,
"scores": 0
},
"team2": {
"name": null,
"scores": 0
},
"matchWinner" : "not declared",
"commentary": [/*{ "time": "0000", "text": "Comments" }*/]
};
var volleyBall = {
"viewers": 0,
"setNumber": 1,
"isBreak": false,
"isLive": false,
"setHistory": [],
"team1": {
"name": null,
"points": 0,
"setWins": 0
},
"team2": {
"name": null,
"points": 0,
"setWins": 0
},
"matchWinner" : "not declared",
"commentary": [/*{ "time": "00", "text": "Comments" }*/]
};
var cricket = {
"viewers": 0,
"innings": 1,
"isBreak": false,
"isLive": false,
"runs": 0,
"wickets": 0,
"totalOvers": 20,
"currOver": 1,
"toWin": 1,
"innHistory": [],
"batting": null,
"balling": null,
"matchWinner" : "not declared",
"commentary": [/*{ "time": "00", "text": "Comments" }*/]
};
io.on("connection", function (socket) {
console.log("User connected with socket id : " + socket.id);
//////////////////////////////////////////////////////////////////////
/////////////////// for football /////////////////////////////////////
//////////////////////////////////////////////////////////////////////
socket.on("join-football", function () {
if(socket.roomName) {
socket.leave(socket.roomName);
updateOnGroupLeave(socket.roomName);
}
socket._rooms = [];
socket.join("football"); // the football room
socket.roomName = "football";
if(io.sockets.adapter.rooms['football']) football_score.viewers = io.sockets.adapter.rooms['football'].length;
socket.emit("joined-football", football_score);
io.in("football").emit("football-updated", football_score);
});
socket.on("update-football", function (data) {
football_score = data;
console.log(data);
io.in("football").emit("football-updated", football_score);
});
///////////////////////////////////////////////////////////////////////
///////////////////// for tennis //////////////////////////////////////
///////////////////////////////////////////////////////////////////////
socket.on("join-tennis", function () {
if(socket.roomName) {
socket.leave(socket.roomName);
updateOnGroupLeave(socket.roomName);
}
socket._rooms = [];
socket.join("tennis"); // the badminton room
socket.roomName = "tennis";
if(io.sockets.adapter.rooms['tennis']) table_tennis.viewers = io.sockets.adapter.rooms["tennis"].length;
socket.emit("joined-tennis", table_tennis);
io.in("tennis").emit("tennis-updated", table_tennis);
});
socket.on("update-tennis", function (data) {
table_tennis = data;
console.log(data);
io.in("tennis").emit("tennis-updated", table_tennis);
});
///////////////////////////////////////////////////////////////////////
///////////////////// for badminton //////////////////////////////////////
///////////////////////////////////////////////////////////////////////
socket.on("join-badminton", function () {
if(socket.roomName) {
socket.leave(socket.roomName);
updateOnGroupLeave(socket.roomName);
}
socket._rooms = [];
socket.join("badminton"); // the badminton room
socket.roomName = "badminton";
if(io.sockets.adapter.rooms['badminton']) badminton.viewers = io.sockets.adapter.rooms['badminton'].length;
socket.emit("joined-badminton", badminton);
io.in("badminton").emit("badminton-updated", badminton);
});
socket.on("update-badminton", function (data) {
badminton = data;
console.log(data);
io.in("badminton").emit("badminton-updated", badminton);
});
///////////////////////////////////////////////////////////////////////
///////////////////// for basketball //////////////////////////////////////
///////////////////////////////////////////////////////////////////////
socket.on("join-basketball", function () {
if(socket.roomName) {
socket.leave(socket.roomName);
updateOnGroupLeave(socket.roomName);
}
socket._rooms = [];
socket.join("basketball"); // the basketball room
socket.roomName = "basketball";
if(io.sockets.adapter.rooms['basketball']) basketball.viewers = io.sockets.adapter.rooms['basketball'].length;
socket.emit("joined-basketball", basketball);
io.in("basketball").emit("basketball-updated", basketball);
});
socket.on("update-basketball", function (data) {
basketball = data;
console.log(data);
io.in("basketball").emit("basketball-updated", basketball);
});
socket.on("disconnect", function () {
console.log("user disconnected");
console.log("room name - " + socket.roomName);
//console.log("no. of users - " + io.sockets.adapter.rooms[socket.roomName].length);
if(socket.roomName) updateOnGroupLeave(socket.roomName);
});
///////////////////////////////////////////////////////
///////////for volleyBall/////////////////////////////
///////////////////////////////////////////////////////
socket.on("join-volleyball", function () {
if(socket.roomName) {
socket.leave(socket.roomName);
updateOnGroupLeave(socket.roomName);
}
socket._rooms = [];
socket.join("volleyball"); // the badminton room
socket.roomName = "volleyball";
console.log("Current Volley lenght", io.sockets.adapter.rooms["volleyball"].length);
if(io.sockets.adapter.rooms['volleyball']) volleyBall.viewers = io.sockets.adapter.rooms["volleyball"].length;
console.log("Actual Scoreboard : ", volleyBall.viewers);
socket.emit("joined-volleyball", volleyBall);
io.in("volleyball").emit("volleyball-updated", volleyBall);
});
socket.on("update-volleyball", function (data) {
volleyBall = data;
console.log(data);
io.in("volleyball").emit("volleyball-updated", volleyBall);
});
///////////////////////////////////////////////////////
///////////for cricket/////////////////////////////
///////////////////////////////////////////////////////
socket.on("join-cricket", function () {
if(socket.roomName) {
socket.leave(socket.roomName);
updateOnGroupLeave(socket.roomName);
}
socket._rooms = [];
socket.join("cricket"); // the badminton room
socket.roomName = "cricket";
if(io.sockets.adapter.rooms['cricket']) cricket.viewers = io.sockets.adapter.rooms["cricket"].length;
socket.emit("joined-cricket", cricket);
io.in("cricket").emit("cricket-updated", cricket);
});
socket.on("update-cricket", function (data) {
cricket = data;
console.log(data);
io.in("cricket").emit("cricket-updated", cricket);
});
});
//////////////////////////////////////////////////////
////// function to quit from existing room ///////////
//////////////////////////////////////////////////////
function updateOnGroupLeave(roomname) {
if (roomname) {
switch (roomname) {
case "football": if (io.sockets.adapter.rooms['football']) {
football_score.viewers = io.sockets.adapter.rooms['football'].length;
io.in("football").emit("football-updated", football_score);
}
break;
case "tennis": if (io.sockets.adapter.rooms["tennis"]) {
table_tennis.viewers = io.sockets.adapter.rooms["tennis"].length;
io.in("tennis").emit("tennis-updated", table_tennis);
}
break;
case "badminton": if (io.sockets.adapter.rooms["badminton"]) {
badminton.viewers = io.sockets.adapter.rooms["badminton"].length;
io.in("badminton").emit("badminton-updated", badminton);
}
break;
case "basketball": if (io.sockets.adapter.rooms["basketball"]) {
basketball.viewers = io.sockets.adapter.rooms["basketball"].length;
io.in("basketball").emit("basketball-updated", basketball);
}
break;
case "volleyball": if (io.sockets.adapter.rooms["volleyball"]) {
volleyBall.viewers = io.sockets.adapter.rooms["volleyball"].length;
io.in("volleyball").emit("volleyball-updated", volleyBall);
}
break;
case "cricket": if (io.sockets.adapter.rooms["cricket"]) {
volleyBall.viewers = io.sockets.adapter.rooms["cricket"].length;
io.in("cricket").emit("cricket-updated", cricket);
}
}
}
}
|
import console from 'console'
import sample from './sample.json'
import Delta from 'quill-delta'
import 'react-quill/dist/quill.snow.css';
import 'react-quill/dist/quill.bubble.css';
const ReactQuill = typeof window === 'object' ? require('react-quill') : () => false;
export default class Editor extends React.Component {
constructor(props) {
super(props)
this.quillRef = null; // Quill instance
this.reactQuillRef = null; // ReactQuill component
this.readonly = props["readonly"]?props["readonly"]=="true":false;
this.toolbar = props["toolbar"]?props["toolbar"]=="true":true;
this.theme = props["theme"]?props["theme"]:"snow";
}
componentDidMount() {
this.attachQuillRefs()
}
componentDidUpdate() {
this.attachQuillRefs()
}
attachQuillRefs = () => {
if (typeof this.reactQuillRef.getEditor !== 'function') return;
this.quillRef = this.reactQuillRef.getEditor();
}
insertText = () => {
var range = this.quillRef.getSelection();
let position = range ? range.index : 0;
this.quillRef.disable();
this.quillRef.insertText(position, 'Hello, World! ')
}
getText = () => {
console.log(JSON.stringify(this.quillRef.getContents(), null, 2));
}
setEdit = () => {
console.log("set edit called");
if (this.quillRef) {
console.log("enable editing");
this.quillRef.enable();
}
}
setContents = (c) => {
try {
this.quillRef.setContents(new Delta(JSON.parse(c)));
} catch (e) {
console.log(e);
}
}
getContents = () => {
return this.quillRef.getContents();
}
render() {
return (
<ReactQuill
ref={(el) => { this.reactQuillRef = el }}
modules={{"toolbar": this.toolbar}}
theme={this.theme}
readOnly={this.readonly}
/>
)
}
}
|
import { FaTag } from "react-icons/fa";
export default {
name: "tag",
title: "Tags",
type: "document",
icon: FaTag,
fields: [
{
name: "title",
title: "Title",
type: "string"
},
{
name: "slug",
title: "Slug",
type: "slug",
options: {
source: "title",
maxLength: 96,
isUnique: x => true
},
validation: Rule => Rule.required()
}
],
preview: {
select: {
title: "title"
},
prepare(selection) {
const { title } = selection;
return {
title: title,
media: FaTag,
subtitle: "Tag"
};
}
}
};
|
OC.L10N.register(
"files_external",
{
"Step 2 failed. Exception: %s" : "ຂັ້ນຕອນທີ 2 ລົ້ມເຫລວ. ຂໍ້ຍົກເວັ້ນ: %s",
"Error verifying OAuth2 Code for " : "ຂໍ້ຜິດພາດຢືນຢັນລະຫັດ OAuth2 ສໍາລັບ",
"Personal" : "ສ່ວນບຸກຄົນ"
},
"nplurals=1; plural=0;");
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.