Created
March 23, 2015 11:27
-
-
Save GRA0007/ada97d91fcd0a7385184 to your computer and use it in GitHub Desktop.
Periodic List of Elements
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var UI = require('ui'); | |
var categories = new UI.Menu({ | |
sections: [{ | |
items: [{ | |
title: 'Full list', | |
subtitle: 'All the elements' | |
}, { | |
title: 'By number', | |
subtitle: '1-10, 11-20, etc.' | |
}, { | |
title: 'By element type', | |
subtitle: 'Alkali metals, etc.' | |
}, { | |
title: 'Info' | |
}] | |
}] | |
}); | |
var info = new UI.Card({ | |
title:'Info', | |
scrollable:true, | |
body:'The atomic number represents the number of protons in an atom.\n\nIn this app, when the weight is shown with brackets, it is the weight of that elements\' most stable isotope.\n\nTrans-actinides are manmade atoms that exist for less than a second.\n\nThe first widely recognised periodic table was published in 1869 by Dmitri Mendeleev.' | |
}); | |
var full_list = new UI.Menu({ | |
sections: [{ | |
items: [{ | |
title: 'Hydrogen', | |
subtitle: '1', | |
weight: '1.0079', | |
formula: 'H', | |
type: 'Other non-metals', | |
radioactive: 'No' | |
}, { | |
title: 'Helium', | |
subtitle: '2', | |
weight: '4.0026', | |
formula: 'He', | |
type: 'Inert gases', | |
radioactive: 'No' | |
}, { | |
title: 'Lithium', | |
subtitle: '3', | |
weight: '6.9410', | |
formula: 'Li', | |
type: 'Alkali metals', | |
radioactive: 'No' | |
}, { | |
title: 'Beryllium', | |
subtitle: '4', | |
weight: '9.0122', | |
formula: 'Be', | |
type: 'Alkaline earth metals', | |
radioactive: 'No' | |
}, { | |
title: 'Boron', | |
subtitle: '5', | |
weight: '10.8110', | |
formula: 'B', | |
type: 'Other non-metals', | |
radioactive: 'No' | |
}, { | |
title: 'Carbon', | |
subtitle: '6', | |
weight: '12.0107', | |
formula: 'C', | |
type: 'Other non-metals', | |
radioactive: 'No' | |
}, { | |
title: 'Nitrogen', | |
subtitle: '7', | |
weight: '14.0070', | |
formula: 'N', | |
type: 'Other non-metals', | |
radioactive: 'No' | |
}, { | |
title: 'Oxygen', | |
subtitle: '8', | |
weight: '15.9994', | |
formula: 'O', | |
type: 'Other non-metals', | |
radioactive: 'No' | |
}, { | |
title: 'Fluorine', | |
subtitle: '9', | |
weight: '18.9984', | |
formula: 'F', | |
type: 'Halogens', | |
radioactive: 'No' | |
}, { | |
title: 'Neon', | |
subtitle: '10', | |
weight: '20.1797', | |
formula: 'Ne', | |
type: 'Inert gases', | |
radioactive: 'No' | |
}, { | |
title: 'Sodium', | |
subtitle: '11', | |
weight: '22.9898', | |
formula: 'Na', | |
type: 'Alkali metals', | |
radioactive: 'No' | |
}, { | |
title: 'Magnesium', | |
subtitle: '12', | |
weight: '24.3050', | |
formula: 'Mg', | |
type: 'Alkaline earth metals', | |
radioactive: 'No' | |
}, { | |
title: 'Aluminium', | |
subtitle: '13', | |
weight: '26.9815', | |
formula: 'Al', | |
type: 'Other metals', | |
radioactive: 'No' | |
}, { | |
title: 'Silicon', | |
subtitle: '14', | |
weight: '28.0855', | |
formula: 'Si', | |
type: 'Other non-metals', | |
radioactive: 'No' | |
}, { | |
title: 'Phosphorus', | |
subtitle: '15', | |
weight: '30.9738', | |
formula: 'P', | |
type: 'Other non-metals', | |
radioactive: 'No' | |
}, { | |
title: 'Sulphur', | |
subtitle: '16', | |
weight: '32.0650', | |
formula: 'S', | |
type: 'Other non-metals', | |
radioactive: 'No' | |
}, { | |
title: 'Chlorine', | |
subtitle: '17', | |
weight: '35.4530', | |
formula: 'Cl', | |
type: 'Halogens', | |
radioactive: 'No' | |
}, { | |
title: 'Argon', | |
subtitle: '18', | |
weight: '39.9480', | |
formula: 'Ar', | |
type: 'Inert gases', | |
radioactive: 'No' | |
}, { | |
title: 'Potassium', | |
subtitle: '19', | |
weight: '39.0980', | |
formula: 'K', | |
type: 'Alkali metals', | |
radioactive: 'No' | |
}, { | |
title: 'Calcium', | |
subtitle: '20', | |
weight: '40.0780', | |
formula: 'Ca', | |
type: 'Alkaline earth metals', | |
radioactive: 'No' | |
}, { | |
title: 'Scandium', | |
subtitle: '21', | |
weight: '44.9560', | |
formula: 'Sc', | |
type: 'Transition metals', | |
radioactive: 'No' | |
}, { | |
title: 'Titanium', | |
subtitle: '22', | |
weight: '47.8670', | |
formula: 'Ti', | |
type: 'Transition metals', | |
radioactive: 'No' | |
}, { | |
title: 'Vanadium', | |
subtitle: '23', | |
weight: '50.9420', | |
formula: 'V', | |
type: 'Transition metals', | |
radioactive: 'No' | |
}, { | |
title: 'Chromium', | |
subtitle: '24', | |
weight: '51.9960', | |
formula: 'Cr', | |
type: 'Transition metals', | |
radioactive: 'No' | |
}, { | |
title: 'Manganese', | |
subtitle: '25', | |
weight: '54.9380', | |
formula: 'Mn', | |
type: 'Transition metals', | |
radioactive: 'No' | |
}, { | |
title: 'Iron', | |
subtitle: '26', | |
weight: '55.8450', | |
formula: 'Fe', | |
type: 'Transition metals', | |
radioactive: 'No' | |
}, { | |
title: 'Cobalt', | |
subtitle: '27', | |
weight: '58.9330', | |
formula: 'Co', | |
type: 'Transition metals', | |
radioactive: 'No' | |
}, { | |
title: 'Nickel', | |
subtitle: '28', | |
weight: '58.6930', | |
formula: 'Ni', | |
type: 'Transition metals', | |
radioactive: 'No' | |
}, { | |
title: 'Copper', | |
subtitle: '29', | |
weight: '63.5460', | |
formula: 'Cu', | |
type: 'Transition metals', | |
radioactive: 'No' | |
}, { | |
title: 'Zinc', | |
subtitle: '30', | |
weight: '65.3900', | |
formula: 'Zn', | |
type: 'Transition metals', | |
radioactive: 'No' | |
}, { | |
title: 'Gallium', | |
subtitle: '31', | |
weight: '69.7230', | |
formula: 'Ga', | |
type: 'Other metals', | |
radioactive: 'No' | |
}, { | |
title: 'Germanium', | |
subtitle: '32', | |
weight: '72.6400', | |
formula: 'Ge', | |
type: 'Other metals', | |
radioactive: 'No' | |
}, { | |
title: 'Arsenic', | |
subtitle: '33', | |
weight: '74.9220', | |
formula: 'As', | |
type: 'Other non-metals', | |
radioactive: 'No' | |
}, { | |
title: 'Selenium', | |
subtitle: '34', | |
weight: '78.9600', | |
formula: 'Se', | |
type: 'Other non-metals', | |
radioactive: 'No' | |
}, { | |
title: 'Bromine', | |
subtitle: '35', | |
weight: '79.9040', | |
formula: 'Br', | |
type: 'Halogens', | |
radioactive: 'No' | |
}, { | |
title: 'Krypton', | |
subtitle: '36', | |
weight: '83.8000', | |
formula: 'Kr', | |
type: 'Inert gases', | |
radioactive: 'No' | |
}, { | |
title: 'Rubidium', | |
subtitle: '37', | |
weight: '85.4680', | |
formula: 'Rb', | |
type: 'Alkali metals', | |
radioactive: 'No' | |
}, { | |
title: 'Strontium', | |
subtitle: '38', | |
weight: '87.6200', | |
formula: 'Sr', | |
type: 'Alkaline earth metals', | |
radioactive: 'No' | |
}, { | |
title: 'Yttrium', | |
subtitle: '39', | |
weight: '88.9060', | |
formula: 'Y', | |
type: 'Transition metals', | |
radioactive: 'No' | |
}, { | |
title: 'Zyrconium', | |
subtitle: '40', | |
weight: '91.2240', | |
formula: 'Zr', | |
type: 'Transition metals', | |
radioactive: 'No' | |
}, { | |
title: 'Niobium', | |
subtitle: '41', | |
weight: '92.9060', | |
formula: 'Nb', | |
type: 'Transition metals', | |
radioactive: 'No' | |
}, { | |
title: 'Molybdenum', | |
subtitle: '42', | |
weight: '95.9400', | |
formula: 'Mo', | |
type: 'Transition metals', | |
radioactive: 'No' | |
}, { | |
title: 'Technetium', | |
subtitle: '43', | |
weight: '(98.0000)', | |
formula: 'Tc', | |
type: 'Transition metals', | |
radioactive: 'Yes' | |
}, { | |
title: 'Ruthenium', | |
subtitle: '44', | |
weight: '101.0700', | |
formula: 'Ru', | |
type: 'Transition metals', | |
radioactive: 'No' | |
}, { | |
title: 'Rhodium', | |
subtitle: '45', | |
weight: '102.9100', | |
formula: 'Rh', | |
type: 'Transition metals', | |
radioactive: 'No' | |
}, { | |
title: 'Palladium', | |
subtitle: '46', | |
weight: '106.4200', | |
formula: 'Pd', | |
type: 'Transition metals', | |
radioactive: 'No' | |
}, { | |
title: 'Silver', | |
subtitle: '47', | |
weight: '107.8700', | |
formula: 'Ag', | |
type: 'Transition metals', | |
radioactive: 'No' | |
}, { | |
title: 'Cadmium', | |
subtitle: '48', | |
weight: '112.4100', | |
formula: 'Cd', | |
type: 'Transition metals', | |
radioactive: 'No' | |
}, { | |
title: 'Indium', | |
subtitle: '49', | |
weight: '114.8200', | |
formula: 'In', | |
type: 'Other metals', | |
radioactive: 'No' | |
}, { | |
title: 'Tin', | |
subtitle: '50', | |
weight: '118.7100', | |
formula: 'Sn', | |
type: 'Other metals', | |
radioactive: 'No' | |
}, { | |
title: 'Antimony', | |
subtitle: '51', | |
weight: '121.7600', | |
formula: 'Sb', | |
type: 'Other metals', | |
radioactive: 'No' | |
}, { | |
title: 'Tellurium', | |
subtitle: '52', | |
weight: '127.6000', | |
formula: 'Te', | |
type: 'Other non-metals', | |
radioactive: 'No' | |
}, { | |
title: 'Iodine', | |
subtitle: '53', | |
weight: '126.9000', | |
formula: 'I', | |
type: 'Halogens', | |
radioactive: 'No' | |
}, { | |
title: 'Xenon', | |
subtitle: '54', | |
weight: '131.2900', | |
formula: 'Xe', | |
type: 'Inert gases', | |
radioactive: 'No' | |
}, { | |
title: 'Cesium', | |
subtitle: '55', | |
weight: '132.9100', | |
formula: 'Cs', | |
type: 'Alkali metals', | |
radioactive: 'No' | |
}, { | |
title: 'Barium', | |
subtitle: '56', | |
weight: '137.3300', | |
formula: 'Ba', | |
type: 'Alkaline earth metals', | |
radioactive: 'No' | |
}, { | |
title: 'Lanthanium', | |
subtitle: '57', | |
weight: '138.9100', | |
formula: 'La', | |
type: 'Transition metals', | |
radioactive: 'No' | |
}, { | |
title: 'Cerium', | |
subtitle: '58', | |
weight: '140.1200', | |
formula: 'Ce', | |
type: 'Lanthanides', | |
radioactive: 'No' | |
}, { | |
title: 'Praseodyium', | |
subtitle: '59', | |
weight: '140.9100', | |
formula: 'Pr', | |
type: 'Lanthanides', | |
radioactive: 'No' | |
}, { | |
title: 'Neodymium', | |
subtitle: '60', | |
weight: '144.2400', | |
formula: 'Nd', | |
type: 'Lanthanides', | |
radioactive: 'No' | |
}, { | |
title: 'Promethium', | |
subtitle: '61', | |
weight: '(145.0000)', | |
formula: 'Pm', | |
type: 'Lanthanides', | |
radioactive: 'Yes' | |
}, { | |
title: 'Samarium', | |
subtitle: '62', | |
weight: '150.3600', | |
formula: 'Sm', | |
type: 'Lanthanides', | |
radioactive: 'No' | |
}, { | |
title: 'Europium', | |
subtitle: '63', | |
weight: '151.9600', | |
formula: 'Eu', | |
type: 'Lanthanides', | |
radioactive: 'No' | |
}, { | |
title: 'Gadolinium', | |
subtitle: '64', | |
weight: '157.2500', | |
formula: 'Gd', | |
type: 'Lanthanides', | |
radioactive: 'No' | |
}, { | |
title: 'Terbium', | |
subtitle: '65', | |
weight: '158.9300', | |
formula: 'Tb', | |
type: 'Lanthanides', | |
radioactive: 'No' | |
}, { | |
title: 'Dysprosium', | |
subtitle: '66', | |
weight: '162.5000', | |
formula: 'Dy', | |
type: 'Lanthanides', | |
radioactive: 'No' | |
}, { | |
title: 'Holmium', | |
subtitle: '67', | |
weight: '164.9300', | |
formula: 'Ho', | |
type: 'Lanthanides', | |
radioactive: 'No' | |
}, { | |
title: 'Erbium', | |
subtitle: '68', | |
weight: '167.2600', | |
formula: 'Er', | |
type: 'Lanthanides', | |
radioactive: 'No' | |
}, { | |
title: 'Thulium', | |
subtitle: '69', | |
weight: '168.9300', | |
formula: 'Tm', | |
type: 'Lanthanides', | |
radioactive: 'No' | |
}, { | |
title: 'Ytterbium', | |
subtitle: '70', | |
weight: '173.0400', | |
formula: 'Yb', | |
type: 'Lanthanides', | |
radioactive: 'No' | |
}, { | |
title: 'Lutetium', | |
subtitle: '71', | |
weight: '174.9700', | |
formula: 'Lu', | |
type: 'Lanthanides', | |
radioactive: 'No' | |
}, { | |
title: 'Hafnium', | |
subtitle: '72', | |
weight: '178.4900', | |
formula: 'Hf', | |
type: 'Transition metals', | |
radioactive: 'No' | |
}, { | |
title: 'Tantalum', | |
subtitle: '73', | |
weight: '180.9500', | |
formula: 'Ta', | |
type: 'Transition metals', | |
radioactive: 'No' | |
}, { | |
title: 'Tungsten', | |
subtitle: '74', | |
weight: '183.8400', | |
formula: 'W', | |
type: 'Transition metals', | |
radioactive: 'No' | |
}, { | |
title: 'Rhenium', | |
subtitle: '75', | |
weight: '186.2100', | |
formula: 'Re', | |
type: 'Transition metals', | |
radioactive: 'No' | |
}, { | |
title: 'Osmium', | |
subtitle: '76', | |
weight: '190.2300', | |
formula: 'Os', | |
type: 'Transition metals', | |
radioactive: 'No' | |
}, { | |
title: 'Iridium', | |
subtitle: '77', | |
weight: '192.2200', | |
formula: 'Ir', | |
type: 'Transition metals', | |
radioactive: 'No' | |
}, { | |
title: 'Platinum', | |
subtitle: '78', | |
weight: '195.0800', | |
formula: 'Pt', | |
type: 'Transition metals', | |
radioactive: 'No' | |
}, { | |
title: 'Gold', | |
subtitle: '79', | |
weight: '196.9700', | |
formula: 'Au', | |
type: 'Transition metals', | |
radioactive: 'No' | |
}, { | |
title: 'Mercury', | |
subtitle: '80', | |
weight: '200.5900', | |
formula: 'Hg', | |
type: 'Transition metals', | |
radioactive: 'No' | |
}, { | |
title: 'Thallium', | |
subtitle: '81', | |
weight: '204.3800', | |
formula: 'Tl', | |
type: 'Other metals', | |
radioactive: 'No' | |
}, { | |
title: 'Lead', | |
subtitle: '82', | |
weight: '207.2000', | |
formula: 'Pb', | |
type: 'Other metals', | |
radioactive: 'No' | |
}, { | |
title: 'Bismuth', | |
subtitle: '83', | |
weight: '208.9800', | |
formula: 'Bi', | |
type: 'Other metals', | |
radioactive: 'No' | |
}, { | |
title: 'Polonium', | |
subtitle: '84', | |
weight: '(209.0000)', | |
formula: 'Po', | |
type: 'Other metals', | |
radioactive: 'Yes' | |
}, { | |
title: 'Astatine', | |
subtitle: '85', | |
weight: '(210.0000)', | |
formula: 'At', | |
type: 'Halogens', | |
radioactive: 'Yes' | |
}, { | |
title: 'Radon', | |
subtitle: '86', | |
weight: '222.0000', | |
formula: 'Rn', | |
type: 'Inert gases', | |
radioactive: 'Yes' | |
}, { | |
title: 'Francium', | |
subtitle: '87', | |
weight: '(223.0000)', | |
formula: 'Fr', | |
type: 'Alkali metals', | |
radioactive: 'Yes' | |
}, { | |
title: 'Radium', | |
subtitle: '88', | |
weight: '226.0300', | |
formula: 'Ra', | |
type: 'Alkaline earth metals', | |
radioactive: 'Yes' | |
}, { | |
title: 'Actinium', | |
subtitle: '89', | |
weight: '(227.0000)', | |
formula: 'Ac', | |
type: 'Transition metals', | |
radioactive: 'Yes' | |
}, { | |
title: 'Thorium', | |
subtitle: '90', | |
weight: '232.0381', | |
formula: 'Th', | |
type: 'Actinides', | |
radioactive: 'Yes' | |
}, { | |
title: 'Protactinium', | |
subtitle: '91', | |
weight: '231.0359', | |
formula: 'Pa', | |
type: 'Actinides', | |
radioactive: 'Yes' | |
}, { | |
title: 'Uranium', | |
subtitle: '92', | |
weight: '238.0300', | |
formula: 'U', | |
type: 'Actinides', | |
radioactive: 'Yes' | |
}, { | |
title: 'Neptunium', | |
subtitle: '93', | |
weight: '237.0500', | |
formula: 'Np', | |
type: 'Actinides', | |
radioactive: 'Yes' | |
}, { | |
title: 'Plutonium', | |
subtitle: '94', | |
weight: '(244.0000)', | |
formula: 'Pu', | |
type: 'Actinides', | |
radioactive: 'Yes' | |
}, { | |
title: 'Americium', | |
subtitle: '95', | |
weight: '(243.0000)', | |
formula: 'Am', | |
type: 'Actinides', | |
radioactive: 'Yes' | |
}, { | |
title: 'Curium', | |
subtitle: '96', | |
weight: '(247.0000)', | |
formula: 'Cm', | |
type: 'Actinides', | |
radioactive: 'Yes' | |
}, { | |
title: 'Berkelium', | |
subtitle: '97', | |
weight: '(247.0000)', | |
formula: 'Bk', | |
type: 'Actinides', | |
radioactive: 'Yes' | |
}, { | |
title: 'Californium', | |
subtitle: '98', | |
weight: '(251.0000)', | |
formula: 'Cf', | |
type: 'Actinides', | |
radioactive: 'Yes' | |
}, { | |
title: 'Einsteinium', | |
subtitle: '99', | |
weight: '(252.0000)', | |
formula: 'Ef', | |
type: 'Actinides', | |
radioactive: 'Yes' | |
}, { | |
title: 'Fermium', | |
subtitle: '100', | |
weight: '(257.0000)', | |
formula: 'Fm', | |
type: 'Actinides', | |
radioactive: 'Yes' | |
}, { | |
title: 'Mendelevium', | |
subtitle: '101', | |
weight: '(258.0000)', | |
formula: 'Md', | |
type: 'Actinides', | |
radioactive: 'Yes' | |
}, { | |
title: 'Nobelium', | |
subtitle: '102', | |
weight: '(259.0000)', | |
formula: 'No', | |
type: 'Actinides', | |
radioactive: 'Yes' | |
}, { | |
title: 'Lawrencium', | |
subtitle: '103', | |
weight: '(262.0000)', | |
formula: 'Lr', | |
type: 'Actinides', | |
radioactive: 'Yes' | |
}, { | |
title: 'Rutherfordium', | |
subtitle: '104', | |
weight: '261.1100', | |
formula: 'Rf', | |
type: 'Trans-actinides', | |
radioactive: 'Yes' | |
}, { | |
title: 'Dubnium', | |
subtitle: '105', | |
weight: '262.1100', | |
formula: 'Db', | |
type: 'Trans-actinides', | |
radioactive: 'Yes' | |
}, { | |
title: 'Seaborgium', | |
subtitle: '106', | |
weight: '226.0300', | |
formula: 'Sg', | |
type: 'Trans-actinides', | |
radioactive: 'Yes' | |
}, { | |
title: 'Bohrium', | |
subtitle: '107', | |
weight: '262.1200', | |
formula: 'Bh', | |
type: 'Trans-actinides', | |
radioactive: 'Yes' | |
}, { | |
title: 'Hassium', | |
subtitle: '108', | |
weight: '264.1300', | |
formula: 'Hs', | |
type: 'Trans-actinides', | |
radioactive: 'Yes' | |
}, { | |
title: 'Meitnerium', | |
subtitle: '109', | |
weight: '166.1400', | |
formula: 'Mt', | |
type: 'Trans-actinides', | |
radioactive: 'Yes' | |
}, { | |
title: 'Darmstadium', | |
subtitle: '110', | |
weight: '(281.0000)', | |
formula: 'Ds', | |
type: 'Trans-actinides', | |
radioactive: 'Yes' | |
}, { | |
title: 'Roentgenium', | |
subtitle: '111', | |
weight: '(280.0000)', | |
formula: 'Rg', | |
type: 'Trans-actinides', | |
radioactive: 'Yes' | |
}, { | |
title: 'Copernicium', | |
subtitle: '112', | |
weight: '(285.0000)', | |
formula: 'Cn', | |
type: 'Trans-actinides', | |
radioactive: 'Yes' | |
}, { | |
title: 'Ununtrium', | |
subtitle: '113', | |
weight: '(284.0000)', | |
formula: 'Uut', | |
type: 'Trans-actinides', | |
radioactive: 'Yes' | |
}, { | |
title: 'Flerovium', | |
subtitle: '114', | |
weight: '(289.0000)', | |
formula: 'Fl', | |
type: 'Trans-actinides', | |
radioactive: 'Yes' | |
}, { | |
title: 'Unumpentium', | |
subtitle: '115', | |
weight: '(288.0000)', | |
formula: 'Uup', | |
type: 'Trans-actinides', | |
radioactive: 'Yes' | |
}, { | |
title: 'Livermorium', | |
subtitle: '116', | |
weight: '(293.0000)', | |
formula: 'Lv', | |
type: 'Trans-actinides', | |
radioactive: 'Yes' | |
}, { | |
title: 'Ununseptium', | |
subtitle: '117', | |
weight: '(294.0000)', | |
formula: 'Uus', | |
type: 'Trans-actinides', | |
radioactive: 'Yes' | |
}, { | |
title: 'Ununoctium', | |
subtitle: '118', | |
weight: '(294.0000)', | |
formula: 'Uuo', | |
type: 'Trans-actinides', | |
radioactive: 'Yes' | |
}] | |
}] | |
}); | |
var number_categories = new UI.Menu({ | |
sections: [{ | |
items: [{ | |
title: '1-10' | |
}, { | |
title: '11-20' | |
}, { | |
title: '21-30' | |
}, { | |
title: '31-40' | |
}, { | |
title: '41-50' | |
}, { | |
title: '51-60' | |
}, { | |
title: '61-70' | |
}, { | |
title: '71-80' | |
}, { | |
title: '81-90' | |
}, { | |
title: '91-100' | |
}, { | |
title: '101-110' | |
}, { | |
title: '111-118' | |
}] | |
}] | |
}); | |
var number_1_10 = new UI.Menu({ | |
sections: [{ | |
title: '1-10', | |
items: full_list.sections[0].items.slice(0,10) | |
}] | |
}); | |
number_1_10.on('select', function(e) { | |
console.log('Selected item #' + e.itemIndex + ' of section #' + e.sectionIndex); | |
var info = new UI.Card({ | |
title:e.item.title + ' (' + e.item.formula + ')', | |
scrollable:true, | |
body:'Atomic Number:\n' + e.item.subtitle + '\n\nAtomic Weight:\n' + e.item.weight + '\n\nType:\n' + e.item.type + '\n\nRadioactive:\n' + e.item.radioactive | |
}); | |
info.show(); | |
}); | |
var number_11_20 = new UI.Menu({ | |
sections: [{ | |
title: '11-20', | |
items: full_list.sections[0].items.slice(10,20) | |
}] | |
}); | |
number_11_20.on('select', function(e) { | |
console.log('Selected item #' + e.itemIndex + ' of section #' + e.sectionIndex); | |
var info = new UI.Card({ | |
title:e.item.title + ' (' + e.item.formula + ')', | |
scrollable:true, | |
body:'Atomic Number:\n' + e.item.subtitle + '\n\nAtomic Weight:\n' + e.item.weight + '\n\nType:\n' + e.item.type + '\n\nRadioactive:\n' + e.item.radioactive | |
}); | |
info.show(); | |
}); | |
var number_21_30 = new UI.Menu({ | |
sections: [{ | |
title: '21-30', | |
items: full_list.sections[0].items.slice(20,30) | |
}] | |
}); | |
number_21_30.on('select', function(e) { | |
console.log('Selected item #' + e.itemIndex + ' of section #' + e.sectionIndex); | |
var info = new UI.Card({ | |
title:e.item.title + ' (' + e.item.formula + ')', | |
scrollable:true, | |
body:'Atomic Number:\n' + e.item.subtitle + '\n\nAtomic Weight:\n' + e.item.weight + '\n\nType:\n' + e.item.type + '\n\nRadioactive:\n' + e.item.radioactive | |
}); | |
info.show(); | |
}); | |
var number_31_40 = new UI.Menu({ | |
sections: [{ | |
title: '31-40', | |
items: full_list.sections[0].items.slice(30,40) | |
}] | |
}); | |
number_31_40.on('select', function(e) { | |
console.log('Selected item #' + e.itemIndex + ' of section #' + e.sectionIndex); | |
var info = new UI.Card({ | |
title:e.item.title + ' (' + e.item.formula + ')', | |
scrollable:true, | |
body:'Atomic Number:\n' + e.item.subtitle + '\n\nAtomic Weight:\n' + e.item.weight + '\n\nType:\n' + e.item.type + '\n\nRadioactive:\n' + e.item.radioactive | |
}); | |
info.show(); | |
}); | |
var number_41_50 = new UI.Menu({ | |
sections: [{ | |
title: '41-50', | |
items: full_list.sections[0].items.slice(40,50) | |
}] | |
}); | |
number_41_50.on('select', function(e) { | |
console.log('Selected item #' + e.itemIndex + ' of section #' + e.sectionIndex); | |
var info = new UI.Card({ | |
title:e.item.title + ' (' + e.item.formula + ')', | |
scrollable:true, | |
body:'Atomic Number:\n' + e.item.subtitle + '\n\nAtomic Weight:\n' + e.item.weight + '\n\nType:\n' + e.item.type + '\n\nRadioactive:\n' + e.item.radioactive | |
}); | |
info.show(); | |
}); | |
var number_51_60 = new UI.Menu({ | |
sections: [{ | |
title: '51-60', | |
items: full_list.sections[0].items.slice(50,60) | |
}] | |
}); | |
number_51_60.on('select', function(e) { | |
console.log('Selected item #' + e.itemIndex + ' of section #' + e.sectionIndex); | |
var info = new UI.Card({ | |
title:e.item.title + ' (' + e.item.formula + ')', | |
scrollable:true, | |
body:'Atomic Number:\n' + e.item.subtitle + '\n\nAtomic Weight:\n' + e.item.weight + '\n\nType:\n' + e.item.type + '\n\nRadioactive:\n' + e.item.radioactive | |
}); | |
info.show(); | |
}); | |
var number_61_70 = new UI.Menu({ | |
sections: [{ | |
title: '61-70', | |
items: full_list.sections[0].items.slice(60,70) | |
}] | |
}); | |
number_61_70.on('select', function(e) { | |
console.log('Selected item #' + e.itemIndex + ' of section #' + e.sectionIndex); | |
var info = new UI.Card({ | |
title:e.item.title + ' (' + e.item.formula + ')', | |
scrollable:true, | |
body:'Atomic Number:\n' + e.item.subtitle + '\n\nAtomic Weight:\n' + e.item.weight + '\n\nType:\n' + e.item.type + '\n\nRadioactive:\n' + e.item.radioactive | |
}); | |
info.show(); | |
}); | |
var number_71_80 = new UI.Menu({ | |
sections: [{ | |
title: '71-80', | |
items: full_list.sections[0].items.slice(70,80) | |
}] | |
}); | |
number_71_80.on('select', function(e) { | |
console.log('Selected item #' + e.itemIndex + ' of section #' + e.sectionIndex); | |
var info = new UI.Card({ | |
title:e.item.title + ' (' + e.item.formula + ')', | |
scrollable:true, | |
body:'Atomic Number:\n' + e.item.subtitle + '\n\nAtomic Weight:\n' + e.item.weight + '\n\nType:\n' + e.item.type + '\n\nRadioactive:\n' + e.item.radioactive | |
}); | |
info.show(); | |
}); | |
var number_81_90 = new UI.Menu({ | |
sections: [{ | |
title: '81-90', | |
items: full_list.sections[0].items.slice(80,90) | |
}] | |
}); | |
number_81_90.on('select', function(e) { | |
console.log('Selected item #' + e.itemIndex + ' of section #' + e.sectionIndex); | |
var info = new UI.Card({ | |
title:e.item.title + ' (' + e.item.formula + ')', | |
scrollable:true, | |
body:'Atomic Number:\n' + e.item.subtitle + '\n\nAtomic Weight:\n' + e.item.weight + '\n\nType:\n' + e.item.type + '\n\nRadioactive:\n' + e.item.radioactive | |
}); | |
info.show(); | |
}); | |
var number_91_100 = new UI.Menu({ | |
sections: [{ | |
title: '91-100', | |
items: full_list.sections[0].items.slice(90,100) | |
}] | |
}); | |
number_91_100.on('select', function(e) { | |
console.log('Selected item #' + e.itemIndex + ' of section #' + e.sectionIndex); | |
var info = new UI.Card({ | |
title:e.item.title + ' (' + e.item.formula + ')', | |
scrollable:true, | |
body:'Atomic Number:\n' + e.item.subtitle + '\n\nAtomic Weight:\n' + e.item.weight + '\n\nType:\n' + e.item.type + '\n\nRadioactive:\n' + e.item.radioactive | |
}); | |
info.show(); | |
}); | |
var number_101_110 = new UI.Menu({ | |
sections: [{ | |
title: '101-110', | |
items: full_list.sections[0].items.slice(100,110) | |
}] | |
}); | |
number_101_110.on('select', function(e) { | |
console.log('Selected item #' + e.itemIndex + ' of section #' + e.sectionIndex); | |
var info = new UI.Card({ | |
title:e.item.title + ' (' + e.item.formula + ')', | |
scrollable:true, | |
body:'Atomic Number:\n' + e.item.subtitle + '\n\nAtomic Weight:\n' + e.item.weight + '\n\nType:\n' + e.item.type + '\n\nRadioactive:\n' + e.item.radioactive | |
}); | |
info.show(); | |
}); | |
var number_111_118 = new UI.Menu({ | |
sections: [{ | |
title: '111-118', | |
items: full_list.sections[0].items.slice(110,118) | |
}] | |
}); | |
number_111_118.on('select', function(e) { | |
console.log('Selected item #' + e.itemIndex + ' of section #' + e.sectionIndex); | |
var info = new UI.Card({ | |
title:e.item.title + ' (' + e.item.formula + ')', | |
scrollable:true, | |
body:'Atomic Number:\n' + e.item.subtitle + '\n\nAtomic Weight:\n' + e.item.weight + '\n\nType:\n' + e.item.type + '\n\nRadioactive:\n' + e.item.radioactive | |
}); | |
info.show(); | |
}); | |
var type_categories = new UI.Menu({ | |
sections: [{ | |
items: [{ | |
title: 'Alkali metals' | |
}, { | |
title: 'Alkaline earth metals' | |
}, { | |
title: 'Transition metals' | |
}, { | |
title: 'Other metals' | |
}, { | |
title: 'Other non-metals' | |
}, { | |
title: 'Halogens' | |
}, { | |
title: 'Inert gases' | |
}, { | |
title: 'Lanthanides' | |
}, { | |
title: 'Actinides' | |
}, { | |
title: 'Trans-actinides' | |
}] | |
}] | |
}); | |
var type_0 = new UI.Menu({ | |
sections: [{ | |
title: 'Alkali metals', | |
items: [ | |
full_list.sections[0].items[2], | |
full_list.sections[0].items[10], | |
full_list.sections[0].items[18], | |
full_list.sections[0].items[36], | |
full_list.sections[0].items[54], | |
full_list.sections[0].items[87] | |
] | |
}] | |
}); | |
type_0.on('select', function(e) { | |
console.log('Selected item #' + e.itemIndex + ' of section #' + e.sectionIndex); | |
var info = new UI.Card({ | |
title:e.item.title + ' (' + e.item.formula + ')', | |
scrollable:true, | |
body:'Atomic Number:\n' + e.item.subtitle + '\n\nAtomic Weight:\n' + e.item.weight + '\n\nType:\n' + e.item.type + '\n\nRadioactive:\n' + e.item.radioactive | |
}); | |
info.show(); | |
}); | |
var type_1 = new UI.Menu({ | |
sections: [{ | |
title: 'Alkaline earth metals', | |
items: [ | |
full_list.sections[0].items[3], | |
full_list.sections[0].items[11], | |
full_list.sections[0].items[19], | |
full_list.sections[0].items[37], | |
full_list.sections[0].items[55], | |
full_list.sections[0].items[87] | |
] | |
}] | |
}); | |
type_1.on('select', function(e) { | |
console.log('Selected item #' + e.itemIndex + ' of section #' + e.sectionIndex); | |
var info = new UI.Card({ | |
title:e.item.title + ' (' + e.item.formula + ')', | |
scrollable:true, | |
body:'Atomic Number:\n' + e.item.subtitle + '\n\nAtomic Weight:\n' + e.item.weight + '\n\nType:\n' + e.item.type + '\n\nRadioactive:\n' + e.item.radioactive | |
}); | |
info.show(); | |
}); | |
var type_2 = new UI.Menu({ | |
sections: [{ | |
title: 'Transition metals', | |
items: [ | |
full_list.sections[0].items[20], | |
full_list.sections[0].items[21], | |
full_list.sections[0].items[22], | |
full_list.sections[0].items[23], | |
full_list.sections[0].items[24], | |
full_list.sections[0].items[25], | |
full_list.sections[0].items[26], | |
full_list.sections[0].items[27], | |
full_list.sections[0].items[28], | |
full_list.sections[0].items[29], | |
full_list.sections[0].items[38], | |
full_list.sections[0].items[39], | |
full_list.sections[0].items[40], | |
full_list.sections[0].items[41], | |
full_list.sections[0].items[42], | |
full_list.sections[0].items[43], | |
full_list.sections[0].items[44], | |
full_list.sections[0].items[45], | |
full_list.sections[0].items[46], | |
full_list.sections[0].items[47], | |
full_list.sections[0].items[56], | |
full_list.sections[0].items[71], | |
full_list.sections[0].items[72], | |
full_list.sections[0].items[73], | |
full_list.sections[0].items[74], | |
full_list.sections[0].items[75], | |
full_list.sections[0].items[76], | |
full_list.sections[0].items[77], | |
full_list.sections[0].items[78], | |
full_list.sections[0].items[79], | |
full_list.sections[0].items[87] | |
] | |
}] | |
}); | |
type_2.on('select', function(e) { | |
console.log('Selected item #' + e.itemIndex + ' of section #' + e.sectionIndex); | |
var info = new UI.Card({ | |
title:e.item.title + ' (' + e.item.formula + ')', | |
scrollable:true, | |
body:'Atomic Number:\n' + e.item.subtitle + '\n\nAtomic Weight:\n' + e.item.weight + '\n\nType:\n' + e.item.type + '\n\nRadioactive:\n' + e.item.radioactive | |
}); | |
info.show(); | |
}); | |
var type_3 = new UI.Menu({ | |
sections: [{ | |
title: 'Other metals', | |
items: [ | |
full_list.sections[0].items[12], | |
full_list.sections[0].items[30], | |
full_list.sections[0].items[31], | |
full_list.sections[0].items[48], | |
full_list.sections[0].items[49], | |
full_list.sections[0].items[50], | |
full_list.sections[0].items[80], | |
full_list.sections[0].items[81], | |
full_list.sections[0].items[82], | |
full_list.sections[0].items[83] | |
] | |
}] | |
}); | |
type_3.on('select', function(e) { | |
console.log('Selected item #' + e.itemIndex + ' of section #' + e.sectionIndex); | |
var info = new UI.Card({ | |
title:e.item.title + ' (' + e.item.formula + ')', | |
scrollable:true, | |
body:'Atomic Number:\n' + e.item.subtitle + '\n\nAtomic Weight:\n' + e.item.weight + '\n\nType:\n' + e.item.type + '\n\nRadioactive:\n' + e.item.radioactive | |
}); | |
info.show(); | |
}); | |
var type_4 = new UI.Menu({ | |
sections: [{ | |
title: 'Other non-metals', | |
items: [ | |
full_list.sections[0].items[0], | |
full_list.sections[0].items[4], | |
full_list.sections[0].items[5], | |
full_list.sections[0].items[6], | |
full_list.sections[0].items[7], | |
full_list.sections[0].items[13], | |
full_list.sections[0].items[14], | |
full_list.sections[0].items[15], | |
full_list.sections[0].items[32], | |
full_list.sections[0].items[33], | |
full_list.sections[0].items[51] | |
] | |
}] | |
}); | |
type_4.on('select', function(e) { | |
console.log('Selected item #' + e.itemIndex + ' of section #' + e.sectionIndex); | |
var info = new UI.Card({ | |
title:e.item.title + ' (' + e.item.formula + ')', | |
scrollable:true, | |
body:'Atomic Number:\n' + e.item.subtitle + '\n\nAtomic Weight:\n' + e.item.weight + '\n\nType:\n' + e.item.type + '\n\nRadioactive:\n' + e.item.radioactive | |
}); | |
info.show(); | |
}); | |
var type_5 = new UI.Menu({ | |
sections: [{ | |
title: 'Halogens', | |
items: [ | |
full_list.sections[0].items[8], | |
full_list.sections[0].items[16], | |
full_list.sections[0].items[34], | |
full_list.sections[0].items[52], | |
full_list.sections[0].items[84] | |
] | |
}] | |
}); | |
type_5.on('select', function(e) { | |
console.log('Selected item #' + e.itemIndex + ' of section #' + e.sectionIndex); | |
var info = new UI.Card({ | |
title:e.item.title + ' (' + e.item.formula + ')', | |
scrollable:true, | |
body:'Atomic Number:\n' + e.item.subtitle + '\n\nAtomic Weight:\n' + e.item.weight + '\n\nType:\n' + e.item.type + '\n\nRadioactive:\n' + e.item.radioactive | |
}); | |
info.show(); | |
}); | |
var type_6 = new UI.Menu({ | |
sections: [{ | |
title: 'Inert gases', | |
items: [ | |
full_list.sections[0].items[1], | |
full_list.sections[0].items[9], | |
full_list.sections[0].items[17], | |
full_list.sections[0].items[35], | |
full_list.sections[0].items[53], | |
full_list.sections[0].items[85] | |
] | |
}] | |
}); | |
type_6.on('select', function(e) { | |
console.log('Selected item #' + e.itemIndex + ' of section #' + e.sectionIndex); | |
var info = new UI.Card({ | |
title:e.item.title + ' (' + e.item.formula + ')', | |
scrollable:true, | |
body:'Atomic Number:\n' + e.item.subtitle + '\n\nAtomic Weight:\n' + e.item.weight + '\n\nType:\n' + e.item.type + '\n\nRadioactive:\n' + e.item.radioactive | |
}); | |
info.show(); | |
}); | |
var type_7 = new UI.Menu({ | |
sections: [{ | |
title: 'Lanthanides', | |
items: [ | |
full_list.sections[0].items[57], | |
full_list.sections[0].items[58], | |
full_list.sections[0].items[59], | |
full_list.sections[0].items[60], | |
full_list.sections[0].items[61], | |
full_list.sections[0].items[62], | |
full_list.sections[0].items[63], | |
full_list.sections[0].items[64], | |
full_list.sections[0].items[65], | |
full_list.sections[0].items[66], | |
full_list.sections[0].items[67], | |
full_list.sections[0].items[68], | |
full_list.sections[0].items[69], | |
full_list.sections[0].items[70] | |
] | |
}] | |
}); | |
type_7.on('select', function(e) { | |
console.log('Selected item #' + e.itemIndex + ' of section #' + e.sectionIndex); | |
var info = new UI.Card({ | |
title:e.item.title + ' (' + e.item.formula + ')', | |
scrollable:true, | |
body:'Atomic Number:\n' + e.item.subtitle + '\n\nAtomic Weight:\n' + e.item.weight + '\n\nType:\n' + e.item.type + '\n\nRadioactive:\n' + e.item.radioactive | |
}); | |
info.show(); | |
}); | |
var type_8 = new UI.Menu({ | |
sections: [{ | |
title: 'Actinides', | |
items: [ | |
full_list.sections[0].items[81], | |
full_list.sections[0].items[90], | |
full_list.sections[0].items[91], | |
full_list.sections[0].items[92], | |
full_list.sections[0].items[93], | |
full_list.sections[0].items[94], | |
full_list.sections[0].items[95], | |
full_list.sections[0].items[96], | |
full_list.sections[0].items[97], | |
full_list.sections[0].items[98], | |
full_list.sections[0].items[99], | |
full_list.sections[0].items[100], | |
full_list.sections[0].items[101], | |
full_list.sections[0].items[102] | |
] | |
}] | |
}); | |
type_8.on('select', function(e) { | |
console.log('Selected item #' + e.itemIndex + ' of section #' + e.sectionIndex); | |
var info = new UI.Card({ | |
title:e.item.title + ' (' + e.item.formula + ')', | |
scrollable:true, | |
body:'Atomic Number:\n' + e.item.subtitle + '\n\nAtomic Weight:\n' + e.item.weight + '\n\nType:\n' + e.item.type + '\n\nRadioactive:\n' + e.item.radioactive | |
}); | |
info.show(); | |
}); | |
var type_9 = new UI.Menu({ | |
sections: [{ | |
title: 'Trans-actinides', | |
items: [ | |
full_list.sections[0].items[103], | |
full_list.sections[0].items[104], | |
full_list.sections[0].items[105], | |
full_list.sections[0].items[106], | |
full_list.sections[0].items[107], | |
full_list.sections[0].items[108], | |
full_list.sections[0].items[109], | |
full_list.sections[0].items[110], | |
full_list.sections[0].items[111], | |
full_list.sections[0].items[112], | |
full_list.sections[0].items[113], | |
full_list.sections[0].items[114], | |
full_list.sections[0].items[115], | |
full_list.sections[0].items[116], | |
full_list.sections[0].items[117] | |
] | |
}] | |
}); | |
type_9.on('select', function(e) { | |
console.log('Selected item #' + e.itemIndex + ' of section #' + e.sectionIndex); | |
var info = new UI.Card({ | |
title:e.item.title + ' (' + e.item.formula + ')', | |
scrollable:true, | |
body:'Atomic Number:\n' + e.item.subtitle + '\n\nAtomic Weight:\n' + e.item.weight + '\n\nType:\n' + e.item.type + '\n\nRadioactive:\n' + e.item.radioactive | |
}); | |
info.show(); | |
}); | |
categories.on('select', function(e) { | |
if (e.itemIndex === 0) { | |
full_list.show(); | |
} else if (e.itemIndex == 1) { | |
number_categories.show(); | |
} else if (e.itemIndex == 2) { | |
type_categories.show(); | |
} else if (e.itemIndex == 3) { | |
info.show(); | |
} | |
}); | |
number_categories.on('select', function(e) { | |
if (e.itemIndex === 0) { | |
number_1_10.show(); | |
} else if (e.itemIndex == 1) { | |
number_11_20.show(); | |
} else if (e.itemIndex == 2) { | |
number_21_30.show(); | |
} else if (e.itemIndex == 3) { | |
number_31_40.show(); | |
} else if (e.itemIndex == 4) { | |
number_41_50.show(); | |
} else if (e.itemIndex == 5) { | |
number_51_60.show(); | |
} else if (e.itemIndex == 6) { | |
number_61_70.show(); | |
} else if (e.itemIndex == 7) { | |
number_71_80.show(); | |
} else if (e.itemIndex == 8) { | |
number_81_90.show(); | |
} else if (e.itemIndex == 9) { | |
number_91_100.show(); | |
} else if (e.itemIndex == 10) { | |
number_101_110.show(); | |
} else if (e.itemIndex == 11) { | |
number_111_118.show(); | |
} | |
}); | |
type_categories.on('select', function(e) { | |
if (e.itemIndex === 0) { | |
type_0.show(); | |
} else if (e.itemIndex == 1) { | |
type_1.show(); | |
} else if (e.itemIndex == 2) { | |
type_2.show(); | |
} else if (e.itemIndex == 3) { | |
type_3.show(); | |
} else if (e.itemIndex == 4) { | |
type_4.show(); | |
} else if (e.itemIndex == 5) { | |
type_5.show(); | |
} else if (e.itemIndex == 6) { | |
type_6.show(); | |
} else if (e.itemIndex == 7) { | |
type_7.show(); | |
} else if (e.itemIndex == 8) { | |
type_8.show(); | |
} else if (e.itemIndex == 9) { | |
type_9.show(); | |
} | |
}); | |
full_list.on('select', function(e) { | |
console.log('Selected item #' + e.itemIndex + ' of section #' + e.sectionIndex); | |
var info = new UI.Card({ | |
title:e.item.title + ' (' + e.item.formula + ')', | |
scrollable:true, | |
body:'Atomic Number:\n' + e.item.subtitle + '\n\nAtomic Weight:\n' + e.item.weight + '\n\nType:\n' + e.item.type + '\n\nRadioactive:\n' + e.item.radioactive | |
}); | |
info.show(); | |
}); | |
categories.show(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment