text
stringlengths
3
1.04M
<?php /* * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * This software consists of voluntary contributions made by many individuals * and is licensed under the MIT license. For more information, see * <http://www.doctrine-project.org>. */ namespace Doctrine\DBAL\Types; use Doctrine\DBAL\Platforms\AbstractPlatform; /** * Array Type which can be used to generate json arrays. * * @since 2.3 * @author Johannes M. Schmitt <[email protected]> */ class JsonArrayType extends Type { /** * {@inheritdoc} */ public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) { return $platform->getJsonTypeDeclarationSQL($fieldDeclaration); } /** * {@inheritdoc} */ public function convertToDatabaseValue($value, AbstractPlatform $platform) { if (null === $value) { return null; } return json_encode($value); } /** * {@inheritdoc} */ public function convertToPHPValue($value, AbstractPlatform $platform) { if ($value === null) { return array(); } $value = ( is_resource($value) ) ? stream_get_contents($value) : $value; return json_decode($value, true); } /** * {@inheritdoc} */ public function getName() { return Type::JSON_ARRAY; } /** * {@inheritdoc} */ public function requiresSQLCommentHint(AbstractPlatform $platform) { return !$platform->hasNativeJsonType(); } }
'use strict'; /*! * V4Fire Client Core * https://github.com/V4Fire/Client * * Released under the MIT license * https://github.com/V4Fire/Client/blob/master/LICENSE */ const $C = require('collection.js'); const {getThemes} = include('build/ds'), {getThemedPathChunks, checkDeprecated} = include('build/stylus/ds/helpers'); /** * Returns a function to register Stylus plugins by the specified options * * @param {DesignSystem} ds - design system object prepared to use with Stylus * @param {!Object} cssVariables - dictionary of CSS variables * @param {boolean=} [useCSSVarsInRuntime] - true, if the design system object values provided * to style files as css-variables * * @param {string=} [theme] - current theme value * @param {(Array<string>|boolean)=} [includeThemes] - list of themes to include or * `true` (will include all available themes) * * @param {Object=} [stylus] - link to a Stylus package instance * @returns {!Function} */ module.exports = function getPlugins({ ds, cssVariables, useCSSVarsInRuntime, theme, includeThemes, stylus = require('stylus') }) { const isBuildHasTheme = Object.isString(theme), themedFields = $C(ds).get('meta.themedFields') || undefined; let buildThemes = includeThemes; if (!buildThemes) { buildThemes = isBuildHasTheme ? [theme] : []; } const themesList = getThemes(ds.raw, buildThemes), isThemesIncluded = themesList != null && themesList.length > 0, isOneTheme = Object.isArray(themesList) && themesList.length === 1 && themesList[0] === theme; if (!isThemesIncluded) { if (Object.isString(theme)) { console.log(`[stylus] Warning: the design system package has no theme "${theme}"`); } if (includeThemes != null) { console.log( `[stylus] Warning: the design system package has no themes for the provided "includeThemes" value: "${includeThemes}"` ); } } const isFieldThemed = (name) => Object.isArray(themedFields) ? themedFields.includes(name) : true; return function addPlugins(api) { /** * Injects additional options to component mixin options ($p) * * @param {string} string - component name * @returns {!Object} * * @example * ```stylus * injector('bButton') * * // If `useCSSVarsInRuntime` is enabled * // * // { * // values: { * // mods: { * // size: { * // s: { * // offset: { * // top: 'var(--bButton-mods-size-s-offset-top)' * // } * // } * // } * // } * // } * * // Otherwise * // * // { * // values: { * // mods: { * // size: { * // s: { * // offset: { * // top: 5px * // } * // } * // } * // } * // } * ``` */ api.define('injector', ({string}) => { const values = $C(useCSSVarsInRuntime || isThemesIncluded ? cssVariables : ds).get(`components.${string}`); if (values) { const __diffVars__ = $C(cssVariables).get(`diff.components.${string}`); return stylus.utils.coerce({ values, __diffVars__ }, true); } return {}; }); /** * Returns design system CSS variables with their values * * @param {string} [theme] * @returns {!Object} * * @example * ```stylus * getDSVariables() * * // { * // '--colors-primary': #0F9 * // } * ``` */ api.define('getDSVariables', ({string: theme} = {}) => { const obj = {}, iterator = Object.isString(theme) ? cssVariables.map[theme] : cssVariables.map; Object.forEach(iterator, (val) => { const [key, value] = val; obj[key] = value; }); return stylus.utils.coerce(obj, true); }); /** * Returns a value from the design system by the specified group and path. * If passed only the first argument, the function returns parameters for the whole group, * but not just the one value. If no arguments are passed, it returns the whole design system object. * * @param {string} [group] - first level field name (colors, rounding, etc.) * @param {!Object} [path] - dot-delimited path to the value * @returns {!Object} * * @example * ```stylus * getDSValue(colors "green.0") // rgba(0, 255, 0, 1) * ``` */ api.define('getDSValue', ({string: group} = {}, {string: path} = {}) => { if (group === undefined) { return ds; } checkDeprecated(ds, group); const getCSSVar = () => $C(cssVariables).get([].concat([group], path || []).join('.')); if (isOneTheme || !isBuildHasTheme) { return useCSSVarsInRuntime ? stylus.utils.coerce(getCSSVar()) : $C(ds).get([].concat(getThemedPathChunks(group, theme, isFieldThemed(group)), path || []).join('.')); } return stylus.utils.coerce(getCSSVar()); }); /** * Returns an object with text styles for the specified style name * * @param {string} name * @returns {!Object} * * @example * ```stylus * getDSTextStyles(Small) * * // Notice, all values are Stylus types * // * // { * // fontFamily: 'Roboto', * // fontWeight: 400, * // fontSize: '14px', * // lineHeight: '16px' * // } * ``` */ api.define('getDSTextStyles', ({string: name}) => { const head = 'text', isThemed = isFieldThemed(head), path = [...getThemedPathChunks(head, theme, isThemed), name]; checkDeprecated(ds, path); if (!isOneTheme && isThemesIncluded && isThemed) { const initial = $C(ds).get(path); if (!Object.isDictionary(initial)) { throw new Error(`getDSTextStyles: the design system has no "${theme}" styles for the specified name: ${name}`); } const res = {}; Object.forEach(initial, (value, key) => { res[key] = $C(cssVariables).get([head, name, key]); }); return stylus.utils.coerce(res, true); } const from = useCSSVarsInRuntime ? cssVariables : ds; return stylus.utils.coerce($C(from).get(path), true); }); /** * Returns color(s) from the design system by the specified name and identifier (optional) * * @param {!Object} name * @param {!Object} [id] * @returns {(!Object|!Array)} * * @example * ```stylus * getDSColor("blue", 1) // rgba(0, 0, 255, 1) * ``` */ api.define('getDSColor', (name, id) => { name = name.string || name.name; if (!name) { return; } const path = isOneTheme ? getThemedPathChunks('colors', theme, isFieldThemed('colors')) : ['colors']; if (id) { id = id.string || id.val; if (Object.isNumber(id)) { id -= 1; } } path.push(name); if (id !== undefined) { path.push(String(id)); } checkDeprecated(ds, path); return isThemesIncluded || useCSSVarsInRuntime ? stylus.utils.coerce($C(cssVariables).get(path)) : $C(ds).get(path); }); /** * Returns the current theme value * @returns {!string} */ api.define('defaultTheme', () => theme); /** * Returns a list of available themes * @returns {!Array<string>} */ api.define('availableThemes', () => themesList); }; };
// Copyright 2008, 2009, 2011 The Apache Software Foundation // // 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. package org.apache.tapestry5; import java.util.concurrent.atomic.AtomicBoolean; /** * Base implementation of * {@link org.apache.tapestry5.OptimizedSessionPersistedObject}. Subclasses * should invoke {@link #markDirty()} after the internal state of the object changes. * <p> * Due to the concurrent nature of session attributes it's important that markDirty occurs <strong>after</strong> * the object has been changed. If the change occurs before the object has been mutated it's possible that another * thread may re-store the object before the changes are actually made! * <p> * @since 5.1.1.0 */ public abstract class BaseOptimizedSessionPersistedObject implements OptimizedSessionPersistedObject { private transient AtomicBoolean dirty = new AtomicBoolean(false); public final boolean checkAndResetDirtyMarker() { return dirty.getAndSet(false); } /** * Invoked by the subclass after internal state of the object changes. */ protected final void markDirty() { dirty.set(true); } }
# Be sure to restart your server when you modify this file. # Your secret key is used for verifying the integrity of signed cookies. # If you change this key, all old signed cookies will become invalid! # Make sure the secret is at least 30 characters and all random, # no regular words or you'll be exposed to dictionary attacks. # You can use `rake secret` to generate a secure secret key. # Make sure your secret_key_base is kept private # if you're sharing your code publicly. Dummy::Application.config.secret_key_base = '7ee232cf1b4fa1d752e3c16f0990c6009f47b0fc1c92803245d5231b587d9cb0a8e4d992e3b82fedabd0733106d07213c2ee908ed59154ebb464b0cb8be9756e'
HVAC Maintenance and Repair in Phoenix. Whether your air conditioner breaks down on the warmest day of the year or you’re searching for someone to take care of your routine HVAC maintenance, Dial One Mears Air Conditioning & Heating Inc in Phoenix has you covered. We have a variety of services to check that your heating and cooling systems are working efficiently for you. Learn more below. Schedule your appointment today. Simply use our online scheduler or call 602-832-7808. In Central Arizona, HVAC maintenance is the key to the efficient and long-lasting performance of your HVAC systems. We recommend at least one service visit per year, per unit. With Dial One Mears Air Conditioning & Heating Inc service agreements, we'll help keep your systems operating smoothly through every season. A home energy audit will let you know how efficiently your systems are performing. We'll also talk with you about opportunities to improve your energy efficiency. If you're using energy efficient products in Phoenix, you may qualify for utility rebates. Our staff will let you know which rebates are available for your home. So you've noted the efficiency ratings we have attached to our different products, but you're still wondering how that translates to dollars. Well, no matter if you're searching for a solar solution or you're curious about general energy efficiency, our calculators can give you an idea of what to expect when you pick a specific efficiency level. Dial One Mears Air Conditioning & Heating Inc specializes in commercial air conditioning & heating service and maintenance. Dial One Mears is committed to delivering professional service to our commercial clients and the restaurant industry 24-hours a day. Dial One Mears will solve all of your problems with HVAC, Refrigeration, Food Service Equipment, Exhaust Systems. Dial One Mears Air Conditioning has put together leasing programs that will eliminate repair bills for the term of your lease and lower electrical bills.
/** --| ADAPTIVE RUNTIME PLATFORM |---------------------------------------------------------------------------------------- (C) Copyright 2013-2015 Carlos Lozano Diez t/a Adaptive.me <http://adaptive.me>. 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 appli- -cable 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. Original author: * Carlos Lozano Diez <http://github.com/carloslozano> <http://twitter.com/adaptivecoder> <mailto:[email protected]> Contributors: * Ferran Vila Conesa <http://github.com/fnva> <http://twitter.com/ferran_vila> <mailto:[email protected]> * See source code files for contributors. Release: * @version v2.2.15 -------------------------------------------| aut inveniam viam aut faciam |-------------------------------------------- */ package me.adaptive.arp.api; import java.io.Serializable; /** Structure representing the data elements of a contact. @author Francisco Javier Martin Bueno @since v2.0 @version 1.0 */ public class Contact extends ContactUid implements Serializable { /** Java serialization support. @since 2.2.13 */ private static final long serialVersionUID = 100263473L; /** The adresses from the contact */ private ContactAddress[] contactAddresses; /** The emails from the contact */ private ContactEmail[] contactEmails; /** The phones from the contact */ private ContactPhone[] contactPhones; /** The social network info from the contact */ private ContactSocial[] contactSocials; /** The aditional tags from the contact */ private ContactTag[] contactTags; /** The websites from the contact */ private ContactWebsite[] contactWebsites; /** The personal info from the contact */ private ContactPersonalInfo personalInfo; /** The professional info from the contact */ private ContactProfessionalInfo professionalInfo; /** Default Constructor @since v2.0 */ public Contact() { } /** Constructor used by implementation to set the Contact. @param contactId of the Contact @since v2.0 */ public Contact(String contactId) { super(contactId); } /** Returns all the addresses of the Contact @return ContactAddress[] @since v2.0 */ public ContactAddress[] getContactAddresses() { return this.contactAddresses; } /** Set the addresses of the Contact @param contactAddresses Addresses of the contact @since v2.0 */ public void setContactAddresses(ContactAddress[] contactAddresses) { this.contactAddresses = contactAddresses; } /** Returns all the emails of the Contact @return ContactEmail[] @since v2.0 */ public ContactEmail[] getContactEmails() { return this.contactEmails; } /** Set the emails of the Contact @param contactEmails Emails of the contact @since v2.0 */ public void setContactEmails(ContactEmail[] contactEmails) { this.contactEmails = contactEmails; } /** Returns all the phones of the Contact @return ContactPhone[] @since v2.0 */ public ContactPhone[] getContactPhones() { return this.contactPhones; } /** Set the phones of the Contact @param contactPhones Phones of the contact @since v2.0 */ public void setContactPhones(ContactPhone[] contactPhones) { this.contactPhones = contactPhones; } /** Returns all the social network info of the Contact @return ContactSocial[] @since v2.0 */ public ContactSocial[] getContactSocials() { return this.contactSocials; } /** Set the social network info of the Contact @param contactSocials Social Networks of the contact @since v2.0 */ public void setContactSocials(ContactSocial[] contactSocials) { this.contactSocials = contactSocials; } /** Returns the additional tags of the Contact @return ContactTag[] @since v2.0 */ public ContactTag[] getContactTags() { return this.contactTags; } /** Set the additional tags of the Contact @param contactTags Tags of the contact @since v2.0 */ public void setContactTags(ContactTag[] contactTags) { this.contactTags = contactTags; } /** Returns all the websites of the Contact @return ContactWebsite[] @since v2.0 */ public ContactWebsite[] getContactWebsites() { return this.contactWebsites; } /** Set the websites of the Contact @param contactWebsites Websites of the contact @since v2.0 */ public void setContactWebsites(ContactWebsite[] contactWebsites) { this.contactWebsites = contactWebsites; } /** Returns the personal info of the Contact @return ContactPersonalInfo of the Contact @since v2.0 */ public ContactPersonalInfo getPersonalInfo() { return this.personalInfo; } /** Set the personal info of the Contact @param personalInfo Personal Information @since v2.0 */ public void setPersonalInfo(ContactPersonalInfo personalInfo) { this.personalInfo = personalInfo; } /** Returns the professional info of the Contact @return Array of personal info @since v2.0 */ public ContactProfessionalInfo getProfessionalInfo() { return this.professionalInfo; } /** Set the professional info of the Contact @param professionalInfo Professional Information @since v2.0 */ public void setProfessionalInfo(ContactProfessionalInfo professionalInfo) { this.professionalInfo = professionalInfo; } } /** ------------------------------------| Engineered with ♥ in Barcelona, Catalonia |-------------------------------------- */
Address: 1580 Disneyland Dr, Anaheim, CA 92802. Downtown Disney is the hub for shopping, dining, and entertainment. It’s a great opportunity to relax and enjoy live music, hop on the monorail back into the Disneyland park and much more. We often use it as a great meeting place or cut through the Grand Californian as a shortcut to California Adventure. Shopping in Downtown Disney is highly recommended- especially in comparison to shopping inside the parks. Our favorite shops include the World of Disney, the LEGO store, and Little Miss Matched. The prices are similar to inside the park, but it’s easier to shop at the end of the day and the shops seem easier to navigate. Dining is, at times, easier in Downtown Disney than in the parks. We like to eat lunch or dinner downtown when the crowds get intense. When we eat downtown, we usually eat a big lunch or dinner so we don’t spend all our time and money eating in the parks. Some of our favorite restaurants are The Jazz Kitchen, The Jazz Kitchen Express, Earl of Sandwich, and sometimes even Rainforest Cafe. Downtown Disney offers free parking for up to three hours or up to five hours with validation from participating locations in Downtown Disney. Lastly, Downtown Disney offers great entertainment from live bands to stores that catch the eye of everyone (from the toddler to the oldest adult). It’s also a convenient place to watch the fireworks from Disneyland when they are having their show. Here are some of our photos over the years. We’ve made it a fun tradition to take a photo next to the safe storefront.
64 Questions and Answers The 70-652 vce dumps, also known as "TS: Windows Server Virtualization, Configuring", is a Microsoft certification exam. Last Updated Apr 15,2019 Pass your tests with the always up-to-date 70-652 vce dumps. The perfect Microsoft 70-652 dumps from Certleader are conducted to make well preparation for your exam and get the desired result. Certleader 70-652 dump updated on Apr 20, 2019 contains actual Microsoft 70-652 exam questions and study guide, which simulates the real Microsoft 70-652 exam, to ensure you pass Microsoft exam successfully. Free Download 70-652 dumps Demo available before purchase, you can download 70-652 dumps Demo free and try it. The whole 70-652 braindumps are available for downloading if you purchase them. You can enjoy one year free updates from the date of buying. Get it Now! Microsoft 70-652 exam questions in pdf format from certleader are prepared by our expert, our 70-652 pdf is the most reliable guide for Microsoft TS exams. 70-652 pdf guide is printable. the only PDF version that lets you read, search, print and share. The 70-652 pdf, would prove to be the most essential preparation source for your certification at the best price in town. Free Download 70-652 pdf Demo available before purchase, Microsoft 70-652 pdf dumps can help you pass Microsoft TS exam certification in first attempt, Try Now! Have you ever prepared for a certification exam using PDFs or braindumps? Our Microsoft TS 70-652 pdf can be converted to 70-652 VCE easily. Files with VCE extension can be opened with the Visual CertExam Suite. Free Download 70-652 vce file Demo, to ensure you pass Microsoft exam successfully with Microsoft 70-652 VCE. My mom promised me a trip to Canada, if I cleared the 70-652 exam. I searched the internet, but I was shocked by the difficulty of the exam. I couldn't find any solution to help me learn more easily. My friend told me about the certleader.com website. I was desperate, so I search for it and bought the 70-652 braindumps! Guess what, now I am in Canada and I warmly recommend this website! I owe you guys my life! I recently passed the 70-652 ® exam. I was told today by my boss that I was getting a raise. Not only did I get a 10% pay increase, but I also got the promotion I was waiting for. Thank you certleader.com.
Our skilled in-house manufacturing team is comprised of top-notch canvas repair experts who have years of experience. No job is too big or too small - just give us a call! Send us a message to discover how we can help.
Three year old ground floor flat located within a new harbour development, private parking, landscaped area: Kirkcaldy (pop.50k), Fife (east coast). Claim to fame: birthplace of Adam Smith (famous economist) and Gordon Brown (prime minister). Numerous fine restaurants nearby. Lovely parks/golf courses and historical sites locally. Two minutes walk from shopping centre. Within 10 minutes from Bus and Train stations. St. Andrews 20 miles, Edinburgh 26 miles (25 minutes by hovercraft, in operation 08). Rosyth/Zeebrugge ferry port 20 minutes, Glasgow, Perth, 1hour, Dundee 45minutes. Zeebrugge/Rosyth ferry 20 minutes.
Rose Gold 0.25 Carat Round Cut Ruby Nature Inspired Antique Engagement Ring - A bevy of precious metal-molded violets fill out a thick, tapering band for the ultimate design in fashionable engagement rings. Sure, a classic style is pretty, but in a sea of single diamonds on gold or white gold bands, this original style won’t cause ring fatigue after wearing it every day. A large, centrally-staged stone is the focal jewel, while the band is abound with endless surrounding beauty from smaller twinkling stones and shimmering flowers.
Marlon FS Hard and FS Hard X are two of the most well known hard coated sheets in the UK Plastics market. Produced by Brett Martin, they are a high end (and a high cost) protected plastic sheet. As with all hard coated sheets, these are coated with a tougher surface than normal Polycarbonate to help provide abrasion resistance against marks and scratches – making them ideal for glazing in a number of different environments due to their advantages over glass. In the same manner as our own PolyGuard Hard Coated Sheet, the hard coating provides protection against regular cleaning from a wide range of cleaning agents and solvents. The properties of Marlon FS Hard enable a variety of applications and some of the most noted include; safety glazing, guardrails, machine guards, riot shields, bus shelters and train windows. For more information on Marlon FS Hard or PolyGuard Polycarbonate sheet from Peerless, call us on 0845 519 9079 or email [email protected]. For more information on Marlon FS Hard or PolyGuard Polycabonate Sheet, please call us on 0845 519 9079 or email [email protected].
We found this Grammostola species on our way back from “Los Cardones” NP to Salta Airport. The altitude was about 1500 meters above sea level. Pato discovered an adult female Grammostola chalcothrix of the street while driving the car. He immediatly stopped and we took pictures of the specimen. After we finished photographing, we drove further. Just another few hundreds meter away, an adult male crossed the road. Another photosession started. It was pure luck to find this species, but it came in handy. The adult female had about 5cm bodylenght, the male was a bit smaller. All in all it is a very nice species with a nice contrast in colors and a docile character. Adult female and adult male of the species were found walking on the road, during the day.
import { Component } from '@angular/core'; @Component({ selector: 'formly-demo-home', template: ` <div class="container markdown github"> <div [innerHtml]="contnent"></div> </div> `, }) export class HomeComponent { contnent = require('!!raw-loader!!highlight-loader!markdown-loader!./../../../README.md'); }
Yes, exactly. We should not turn a blind eye. Yes!! Thank you for the quote, Tom! We live with 2 dogs 2! Very funny. Except it’s not funny at all. It’s tragic. For the US and the whole world. Yes, Denzil, it is very tragic. America has taken a very wrong direction and the whole world — except for maybe Putin and the Nazis — perceives it and is going to suffer because of it.
You are at:Home»Categories»Commentary»Why Does the Average Turk Love Erdoğan? EXECUTIVE SUMMARY: A quick glance at Turkey’s facts and figures helps to explain why the Turks love their leader, Recep Tayyip Erdoğan. There are striking parallels between the political sociology of the average Turkish voter and Erdoğan’s Islamist worldview. In a way, Erdoğan is what the average Turk sees when he looks in the mirror. Since his Justice and Development Party (AKP) came to power in 2002, Turkish President Recep Tayyip Erdoğan has never lost an election, be it parliamentary, municipal, presidential, or a referendum. Countless theories, academic and otherwise, have tried to explain why he has remained unchallenged. Erdoğan’s opponents, Turkish and not, blame Erdoğan and his one-man rule for the visible Islamization of the once secular country. In their view, Erdoğan has taken a nation of 80 million souls hostage. A quick glance at Turkey’s facts and figures should explain why. There are remarkable parallels between the political sociology of the average Turkish voter and Erdoğan’s Islamist worldview. It can be argued that Erdoğan is, in a way, what the average Turk sees when he looks in the mirror. It is true that Erdoğan has won millions of votes through his impressive “mega projects,” including a huge mosque on an Istanbul hill; a third airport (one of the world’s biggest) for the city; roads, highways, and bridges elsewhere on Anatolian land; a third bridge over the Bosphorus; generous social transfers; and persistent economic growth (though Turkey looks more like a consumption-construction economy). But one must also consider the sociological profile of the voters. The number of families receiving free coal from Erdoğan’s governments rose from 1.1 million in 2003 to 2.15 million in 2014. Is this good news or bad? The rapid rise in the number of poor families means poverty was spreading, which suggests that millions should be unhappy about Erdoğan’s governance. Apparently it works the other way around: Turks are happy because they receive free coal to heat their homes. Turks seem to care more about free coal and other social transfers than about the embarrassing democratic credentials of their country. Turkey ranks 155thout of 180 countries surveyed on the Global Press Freedom Index. Nearly 200 journalists are in jail and more than 120 on the run abroad – but 60% of Turks say they believe media censorship can be legitimate. They do not much care about domestic tranquility, either. Turkey ranks 146thon the Global Peace Index. There are an average of 5.6 murders per day in the country, and that number excludes terror attacks. There are an average of 18 physical attacks on individuals per day. According to a 2014 survey, 11.3% of Turks do not view ISIS as a terrorist organization. But in the past couple of years alone, ISIS has killed 304 people in 14 major attacks inside Turkey. Of course, death does not always come via machine guns or bombs. In the 10 years leading up to 2016, more than 43,000 Turks lost their lives in fatal road accidents. The Turks have been living under emergency rule since July 2016, when a group of military officers staged an unsuccessful coup d’état against Erdoğan’s government. More than 50,000 people have been imprisoned since then, and 150,000 public employees have been removed from their positions. In the aftermath of the Sept. 12, 1980 military coup, the purge within Turkish academia was limited to 120 scholars – but more than 5,000 scholars were purged following the failed putsch of 2016. A top judge recently revealed that a total of 6.9 million Turks, or nearly 9% of the entire population, are under some kind of legal investigation. Let’s consider education. In Turkey, the average schooling period is a mere 6.51 years. In the age group 18-24, only 26.6% of male Turks and 18.9% of female Turks attend a school. The August 2017 OECD Regional Well-Being Index showed that Turkey came dead last out of 362 in the education area, and only 16% of Turks over the age of 18 are university graduates. The number of Turkish students studying to become imams, however, rose from a mere 60,000 in 2002 to 1.2 million in 2014. But who is your average Turk, sociologically speaking? Seventy-four percent of Turks identify themselves as people who perform “all duties” of Islam. Ninety-four percent say they have never had holidays abroad, and 70% say they have never participated in any cultural or arts events. Seventy-four percent identify as either conservative or religiously conservative – which, among other reasons, explains Erdoğan’s popularity, especially among conservative Turks. It makes mathematical sense that Erdoğan, who does not hide his hatred of alcohol consumption for religious reasons, is popular in a country where 79% say they never consume alcohol (per capita alcohol consumption in Turkey is as low as 1.5 liters, compared, for example, to 12 liters in Austria). And Turks are poor. Boasting barely $10,000 per capita income, the country has 92% of its population living on incomes between $180 and $1,280 per month – with 56% earning between $180 and $510 per month. But despite the country’s failings, happiness seems to be a Turkish word. In a 2015 survey, 56.6% of Turks said they were happy. In 2016, after thousands of terror victims, a near civil war, arbitrary rule by decree, poverty, tens of thousands of new prisoners, murder, attacks, and thousands of deaths by road accident, that number rose to 61.3%. The Turks believe they have a wonderful leader who makes their country great again. Don’t disturb their conservative peace.
class AddCommitAccessPermission < ActiveRecord::Migration def self.up Role.all.select { |r| not r.builtin? }.each do |r| r.add_permission!(:commit_access) end end def self.down Role.all.select { |r| not r.builtin? }.each do |r| r.remove_permission!(:commit_access) end end end
In what obviously showcases the Nigerian government as an object of global ridicule based on the revelational identity of the current Aso Rock occupant, impersonating late Muhammadu Buhari as Nigeria's President, it is politically and morally justifiable that Nigerians massively hit major roads and streets in protest. It is becoming evidently clear on every passing day that Jubril Aminu Al-Sudani in criminal connivance with Fulani cabals, have since January 2017, hoodwinked unsuspecting Nigerian populace into accepting that the man they voted for in 2015, was yet in charge of the country's affairs till date as their President. They should in the light of the foregoing, stage protest demands that the personality in Aso Rock, proves beyond every imaginable doubt that he is their President originally known as Muhammadu Buhari, or immediately vacate the position for Vice President Yemi Osinbajo to take over control as constitutionally stipulated. What the global community is presently awaiting, is to see the reactionary consciousness of Nigerians whose affairs the Sudanese impostor is presiding over. There should henceforth, commence voracious gale of protests across the country, culminating into a revolution, clearly demanding wholistic and convincing identity of the Buhari double. Nigeria is presently being stigmatized by virtually the entire global community because of this leprous/criminal identity of a usurper. The Indigenous People of Biafra (IPOB) worldwide, ably led by Mazi Nnamdi Kanu, has intelligently and courageously done the needful through well articulated exposition of irrefutable facts in this whole mess, to both the the international community and Nigerians. The revelations have so far proven that President Muhammadu Buhari died on 27th January 2017 and was covertly replaced with a Sudanese impostor known as Jubril Aminu Al-Sudani via the subtle, criminal instrumentality of the Nigeria Fulani oligarchy. This was orchestrated to scuttle perceived drift of political power from them like what happened when ex-President Dr. Goodluck Ebele Azikiwe Jonathan assumed leadership as Nigerian President after the death of Alhaji Umaru Musa Yar'Adua. Nigerians should boldly take their destiny into their hands and stem this evil tide or cowardly maintain sealed lips and allow this impostor to continue to preside over the affairs of the country, to their eternal detriment and shame. THE FULANI SATANIC DRIVING BRITISH EXPERIMENT IS OVER.A TIME TO DO EVIL,A TIME TO UNDO THE EVIL.A TIME TO LIE AND A TIME TO TELL THE TRUTH. A TIME TO COVER UPS AND A TIME TO OPEN UPS. A TIME TO ENTHRONE EVIL AND A TIME TO DETHRONE EVIL.A TIME TO BE OPPRESSED AND A TIME TO REVOLT. IT IS BE A REVOLUTION REVOLUTION REVOLUTION TIME!!! THUS SAYS THE BIAFRAN RABBI.
Linia demarkacyjna miedzy dzialem badania i neuronauka jest dosc nieostra, dlatego na wszelki wypadek wrzucam ten watek do Badan. Czy swedzenie zaczyna sie w skorze, czy w mozgu? Researchers are only just beginning to scratch the surface of the brain with functional MRI. Now, a study of perception in both allergen- and histamine-induced itch has revealed how different parts of the brain are activated in response to stimulation from each type. Allergens, such as pollen and dust, and histamine released by allergy cells as a result of activation by foods, drugs, or infection often lead to a vicious itch-scratch cycle as any allergy sufferer will tell you. However, researchers at Oxford University have demonstrated that the brain responds differently to itchiness caused by allergens and histamine. Siri Leknes, Susanna Bantick, Richard Wise, and Irene Tracey at Oxford have worked with Carolyn Willis and John Wilkinson of the Department of Dermatology, at Amersham Hospital to try to understand the nature of itch-cycle with a view to improving outcomes for allergy sufferers and people with certain chronic skin conditions. The team enlisted sixteen males and females who were either allergy sufferers or not atopic or non-atopic individuals. A standard whole-brain MRI was carried out using a gradient echo-planar imaging sequence to obtain the functional scans. The volunteers received a skin "challenge" to the toe area in the form of a skinprick with allergen, histamine, or saline as a control. They volunteers rated the resulting itchiness on a scale of 0 to 5. In a parallel experiment, the team enlisted twenty eight female volunteers fourteen of whom tested positive for type I allergens, such as grass pollen and house dust mite. The other fourteen were non-atopic. The researchers then "challenged" the volunteers with either their specific allergen or histamine, and a control group with just saline solution applied via a skin prick to the forearm. The volunteers were asked to rate the itchiness produced on a scale of 0 to 10 and blood flow was determined using a laser Doppler effect. Analysis of the results from both experiments revealed that there is much in common between allergen- and histamine-induced itch. In particular, there is extensive involvement of the brain's motivation circuitry in response to both types of itches. However, there were numerous significant differences. For instance, allergen-induced itch intensity ratings were higher compared to histamine, perception of itch and changes in blood flow were significantly greater in allergen-induced itch. The perception of itchiness and the changes in blood flow were found to occur significantly later in response to allergen but to exist for much longer. The team also found that itch caused by allergens triggered activity in different parts of the brain. It is the revelation of differences in the orbifrontal regions of the brain linked to compulsion that have the biggest implications for eczema sufferers, for instance. The compulsion to scratch is very strong in the allergen group, a feeling with which sufferers will be very familiar. This, the researchers say, might help to explain why eczema sufferers scratch to the point of harm because they are compelled to do so and cannot help themselves. In other words, there's no point in telling sufferers to "stop scratching!", they simply cannot. W porozumieniu z Miko�ajem przenios�em ten wpis z "Bada�", poniewa� �ci�le rzecz bior�c nie spe�nia� �adnego z dw�ch kryteri�w znalezienia si� w dziale "Badania" (nie jest to ani 1. tekst w�asny, ani 2. tekst cudzy z w�asnym dog�ebnym om�wieniem). Tak na marginesie - oczywi�cie w niczym nie ujmuje ani temu tekstowi, ani zagadnieniu, kt�re jest ciekawe - podobnie zreszt� jak temat szyszynki i rytmu dobowego. Istnieje niewiele modeli zachowan kompulsywnych, ktore mozna by badac w scisle kontrolowanych warunkach. Reakcja na swedzenie jest jednym z takich modeli i zasluguje na szczegolna uwage poniewaz pozwala przesledzic jak prosty impuls sensoryczny wywoluje reakcje, ktora jest bardzo trudna do zahamowania. Pytanie jest co zyskujemy odpowiadajac na taki bodziec?
This entry was posted on Tuesday, July 6th, 2010 at 5:40 pm and is filed under Competitions / Contests, Fun Stuff. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
<div class="container" ng-controller="SystemCtrl"> <div class="container-fluid mt-4"> <div class="row justify-content-center"> <div class="col-auto mb-2"> <div class="card border-primary text-center" style="width: 20rem;"> <div class="card-header"><h2><i class="fas fa-clock"></i></h2></div> <div class="card-body text-primary"> <p class="card-text"><h5>{{time}}</h5></p> </div> </div> </div> <div class="col-auto mb-2"> <div class="card border-primary text-center" style="width: 40rem;"> <div class="card-header"><h2><i class="fas fa-list"></i></h2></div> <div class="card-body text-primary"> <p class="card-text"><h6> <textarea rows="15" class="form-control" readonly>{{tasks}}</textarea> </h6></p> </div> </div> </div> </div> </div> </div>
Love Bunny Gift Set - special price! Perfect gift set for somebunny special, anniversary or a birthday. Special price whilst stocks last! A gorgeous love heart and bunny ears teatowel, somebunny special sign & somebunny special keyring.
Fall Road Trip in Your Plans? As alluring as the scenery can be, the weather can be unpredictable this time of year as well, and leaves falling on the roadway can make for hazardous driving. A few precautions can make your fall road trip a success. Before you take to the road, you'll want to remember the following tips to make your road trip a success. By the time autumn foliage is at its most spectacular, temperatures can dip far enough overnight to bring a chance of frost. When frost settles on the roadway, it causes slick road conditions particularly on overpasses and bridges. Stay alert and exercise caution when driving on frosty roads. Fallen leaves that become wet create a slippery road surface, making steering, braking, stopping and even accelerating dangerous tasks. The solution: Stay alert for patches of leaves and slow down and brake slowly. Tires: Examine all tires as well as your spare for any defects, and make sure that tire pressure is correct for winter weather and tread depth is adequate. Brakes: Have your auto tech check all brakes for wear and tear and replace if necessary. Windshield wipers: If your wiper blades have not been changed within the previous few months, it’s best to change them to be ready to handle rain and snow on the road. Lights: Check all exterior lights on your vehicle. Test turn signals as well. You’ll also want to check the aim of your headlights to maximize your visibility on the road. If you are planning a road trip, be sure to include a call to your insurance agent on your planning checklist. You’ll want to be sure that you have all the coverage you’ll need on your auto insurance policy so that you are not surprised to find that coverage is not sufficient if an accident occurs. You’ll also want to be sure to have your insurance information and complete contact information for your insurance agent along with you on the road just in case it is needed.
Pyrrhos, the King of the Molossans, founded Antigonea in the year 295 BC. The Molossans were one of the three tribes of Epiros (in today’s southern Albania and northern Greece), which grew to a strong state in this period. Antigonea developed as an important economic, social, cultural and political center, and at the end of the 3rd century and in the beginning of the 2nd century BC took shape as a polis (city-state) and one of most important settlements of antiquity. Pyrrhos called the city Antigonea after his first wife, the daughter of the Macedonian nobles Berenice and Philip. Later Berenice married Ptolemy, the King of Egypt and successor of Alexander the Great, in the court of whom Pyrrhos got acquainted with Antigone. Besides his wife, Pyrrhos honored also his mother-in-law Berenice by naming after her a city in Epiros. When Pyrrhos was 17 years old, according to the ancient historian Plutarch, an uprising overthrew him as king. He was placed under the custody of King Demeter of Macedonia and later was sent to the court of Ptolemy. “Since Pyrrhos was artful to absorb powerful people and to hate cowards, while being kind and gentle in life”, as Plutarch wrote, he was selected among other young princes to marry Antigone. This marriage further appraised the figure and good name of Pyrrhos. Due also to the aid of his prudent wife, Pyrrhos managed to collect money and an army, and start off towards Epiros to reclaim the throne. Antigonea, the second city of the ancient Epiran province of Kaonia after Phoinike (Finiqi), both in size and importance, controlled the famous Via Egnatia connecting Dyrrachium (Durres), Apollonia and Oricum with the highlands of Ioannina and Southern Epiros. Due to its important geographic position at a dominant point on the hill of Jerma, in the middle of the Drinos Valley, Antigonea has been recognized as representing the climax of an unprecedented development. The Drinos Valley, both because of its fertility and its strategic importance, was an early population center, witnessed by about 20 ancient cities and fortifications, monumental barrows and tombs, ancient temples and theaters. Without doubt, Antigonea has been the main center of the valley between Selo of Upper Dropull near the Greek border in the south to Hadrianopolis and Melan and up to Lekël at the northern end of the valley. The ancient city of Antigonea is situated in a spectacular location on the top of a ridge in the form of a dolphin, overlooking the entire Drinos Valley, surmounted by two peaks connected with each other by a narrow pass. The urban surface of the city within and outside the fortified walls is estimated to have been about 60 hectare. Solid walls surrounded the city about 4,000 meters in length, protecting the city from all sides, especially in the southern and western parts where the danger was greater because of the nature of the terrain. The fortifying walls and those of most of the houses discovered until now are made of large and medium size blocks of limestone extracted from quarries on Lunxhëria Mountain. Nowhere else can the establishment of fortified cities on the mountaintops, so typical for the ancient cities of present-day Albania, be studied in a more exemplary wayAntigonea is distinguished from other ancient cities through its quadrangular and regular urban plan, similar to many Hellenistic cities of Greece. For the first time in the ancient cities of Europe, urban and architectural elements have been revealed that provide an idea of city planning, indicating that Antigonea had indeed been created upon decree, and not developed over time. Some small rural settlements identified outside the surrounding walls, and agricultural tools discovered in the excavations such as millstones and pithoi, show that the city had a well-developed agricultural territory, something that the region is still famous for till this day.In the year 198 BC, Roman legions vanquished the army of Philip V, the King of Macedonia near Antigonea. As geographer Strabo reports, in 167 BC Antigonea and 70 other cities of Epiros were ruined by the legions of Aemilius Paullus who took revenge for the damages inflicted on Italy by the Pyrrhic War. The further development of the city is witnessed only by remnants of a church, on the floor of which there is a mosaic of Saint Christopher and a Greek emblem, testifying to the city’s existence in the palaeo-Christian period. This church was the last building constructed in ancient Antigonea. It was destroyed during Slav assaults in the 6th century AD. Antigonea, the city that was built by an order of Pyrrhos in honor of his wife Antigonea as a sign of love, was burned in one night on the order of the Roman general Aemilius Paullus out of revenge and as sign of hatred, having flourished not even two centuries. In the commune of Antigonea you can get in touch with all historic periods of mankind from prehistory to modern times. While the caves of Spile and Ladovishtë indicate that the area has been populated from the earliest times, the greatness of antiquity is represented by Antigonea. Three basilicas in the neighboring villages testify to the outset of Christianity, and the monastery of Erem in Spile, with Saint Nicola Church, is evidence of the era of Byzantium. The Ottoman period has left its traces through the architecture of 17th - 18th century houses in Tranoshishtë, and the trends of the communist period can be seen in the agricultural cooperative villages named after partisans Arshi Lengo and Asim Zeneli. 1. Remnants of the Fortified Wall (beginning of the 3rd cent. BC) can be seen stretching up the hill on the top of a steep slope. Its view is particularly good from the Acropolis. 2. Ancient Nymphaeum of the Acropolis (beginning of the 3rd cent. BC). A nymphaeum was a spring and the sacred dwelling place of its female spirit (nymph). It was rimmed and used to provide water. 3. Church of Shen Mëhill (Saint Michael) (6th - 9th cent. AD). Measuring 8 m x 7.3 m and composed of two sections, it was discovered in 1973 at the highest point on the hill of the Acropolis. Construction materials have been taken from the Acropolis’ defensive walls. 4. Defensive Fortification of the Acropolis (beginning of the 3rd cent. BC). The fortification is formed by three defensive belts of walls narrowing up to the peak of the hill. The exterior wall belt has been formed by defensive walls and seven reinforced towers. 5. Dwelling (Leather Workshop) (second half of 3rd cent. BC). Discovered during archaeological excavations in 1968, it is a dwelling with an irregular floor plan consisting of a corridor and five sections of various functions. Discoveries made here include ceramics, such as pithoi, kitchen dishes, bricks, bronze dishes and iron work tools which are thought to have been used for treating leather. 6. Fragments of the Surrounding Fortified Walls (beginning of 3rd cent. BC). Remnants of the northern gate with two towers. 7. Dwelling (Carriage Driver’s House) (second half of the 3rd cent. BC). Discoveries made here include a wagon wheel, coins, etc. 8. Dwelling (second half of the 3rd cent. BC). Residential house with an L-shaped floor plan, consisting of an atrium and five alcoves. The discoveries made here in 1968 have been meaningful and in large numbers: bronze dishes, work tools, bronze and silver coins, clay stamps, a mini-statuette of Poseidon (god of the ocean), voting identification cards and 14 bronze tablets with the name of the city on them. It is at this house that the mysterious bronze figurine of a harpy was found which has become the symbol of Antigonea. In Greek mythology, a harpy ("snatcher") was one of the winged spirits best known for constantly stealing all food from the prophet Phineas. They were usually seen as personifications of the sapping nature of wind. 9. Dwelling with peristyle and floor covered with a mosaic (beginning of 3rd cent. BC). In Greek and Roman architecture, a peristyle is an open colonnade surrounding a court or garden inside a building. Discoveries: ceramics, bronze objects and coins. 11. Monumental tomb (3rd - 2nd cent. BC). Ancient grave of the Macedonian type consisting of two settings that are connected to each other. The walls had been plastered, the ceiling is a vault structure created with an arch. Discovered during the excavations in 2005. Discoveries made include ceramics and bronze objects. 12. Main Gate, or Great Gate, of the Ancient City with two fortified towers (3rd - 2nd cent. BC). Discoveries: Traces of the installation of two moving wings of the Great Gate. 13. Stoa with beautiful multi-cornered wall (beginning of the 3rd cent. BC). Located approximately 250 m away from the main defensive wall of the city to the South. Discoveries include ceramics and coins. There used to be a nymphaeum in the vicinity. 14. Palaeo-Christian Basilica (a triconch church) with a unique, multi-colored mosaic (5th – 6th cent. AD). The layout of the building is a triconch (having three apses on the sides of the central square area of the church), measuring 13.8 m in length and 4.6 m in width. The basilica is composed of two parts: the main hall and the altar section, which the three apses. It was discovered during the excavations of 1974. 15. The Southern Fortification System (3rd – 2nd cent. BC) is a linear structure of 800 meters, with five defensive towers and the small Southern Gate. It was the most significant defensive section of the city’s fortification system and dates back to the beginning of the 3rd century BC. The style used in its construction is “isodomic” (regular, almost quadratic stone blocks in horizontal lines). The five towers were comprised of two metallic constructions reinforced through crossbeams. They were built in the shape of rectangles more than 6 m high and wide, in a distance of 60 m from each other. 16. The Agora (market place) and Main Stoa (roofed promenade) (2nd - 3rd cent. BC) has a rectangular plan of 59.6 m by 8.6 m and had been decorated with columns in Doric style. A unique drainage channel crosses it. In1987 bronze figurines of Poseidon and a Mollos Dog, and bronze fragments of a monumental statue of an unknown horseman (Horse helmet, Horse Mane and Horseman’s Hand with a ring on its finger) have been found here. 17. Dwelling and public building (3rd - 2nd cent. BC). A dwelling of peristyle form was discovered next to the medieval church during the excavations of 1986, measuring 18 m by 8.5 m. Based on its location in the center of the town, its architecture and the lack of objects for daily use, this building is assumed to be a public building or a villa. 18. Christian church from the Byzantine Period, built between the 7th - 9th cent. AD with stones and columns from ancient houses. The medieval church of the IX-XI centuries has a single nave measuring 11 m by 3.5 m. Thirteen tombs were discovered in the cemetery next to the church, with partial inventories. 19. Large block of peristyle houses in various models. This part of the town, with its houses and channels, displays almost in full the urban development of the city. The objects in this block (all of them from the first half of the 3rd cent. AD) are an Artisan’s House, a Weaver’s House, the Measuring Stone and an above-ground drainage system. Ceramic dishes for daily use, ceramic roof tiles, artisan work tools, counterweights for loom threads, bronze coins, bronze decorative items and agricultural work tools have been found here. Dwellings with a rectangle peristyle, surrounded by spaces for living and economic activity. Dwellings with a courtyard and a gate placed on either one or both sides of the courtyard. A dwelling with a narrow hall in the middle and spaces positioned on either side. Dwellings which have their courtyard located at one corner of the house. The craftsman’s house, measuring 35 m x 15 m, with a surface of 335 m2, dates back to the second half of the 3rd century BC. Discoveries here include bronze dishes, iron tools such a an axe, cleaver, scythe, rusted bronze and iron, numerous coins, the bronze handle of a dish in the shape of a sphinx figurine, ceramics, etc. Because of the rusted metals and other discoveries this house was judged to be the house of a craftsman. 20. A natural cave is situated in the rocky eastern hill which in antiquity served as a natural defense, partly reinforced by a polygonal wall. According to ancient writers, the cave was used as a shelter by residents during attacks from invaders and today is considered a historical site.
Multi-material thinking is about putting the right material in the right spot. Here are some points to consider when joining aluminium with steel. There is large interest and a lot of questions about multi-material concepts in the automotive industry. The same is true in the transportation segment, where weight-saving can be directly translated to savings. What they are mainly talking about is steel and aluminium, and how to best join these materials. Joining steel and aluminium is important and it is difficult. There are many joining methods out there. You have standard methods, joining with fasteners. Adhesives are a good alternative. Rivets or other fasteners combined with adhesives are even better. We see spot welding combined with adhesives and cold metal transfer brazing making entry to dissimilar material combinations, such as steel and aluminium. Welding aided by explosion-welded bimetallic strips works in the transport and marine segments, but it is expensive, cumbersome and challenging design-wise. What do you need to consider when joining dissimilar materials? Galvanic corrosion. This is a key generic point for all kinds of joining techniques. Melting points. Metals have different melting points, which can make welding difficult. Friction stir welding (FSW) overcomes melt-related problematics, such as porosity and cracking. FSW is a solid-state process. This not only eliminates melt-type issues but also significantly decreases the temperature in the weld zone. This in turn limits formation of intermetallic phases. Although it is not yet fully commercialized, FSW appears as an attractive method to weld aluminium and steel. If you would like to learn more about joining similar and dissimilar materials, please contact Hydro and we will put you in touch with the right expert in Sapa.
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2015-2019 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program 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 General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. import os import subprocess from unittest import mock import fixtures from testtools.matchers import Equals from snapcraft.internal import sources from tests import unit # LP: #1733584 class TestBazaar(unit.sources.SourceTestCase): # type: ignore def setUp(self): super().setUp() # Mock _get_source_details() since not all tests have a # full repo checkout patcher = mock.patch("snapcraft.sources.Bazaar._get_source_details") self.mock_get_source_details = patcher.start() self.mock_get_source_details.return_value = "" self.addCleanup(patcher.stop) def test_pull(self): bzr = sources.Bazaar("lp:my-source", "source_dir") bzr.pull() self.mock_rmdir.assert_called_once_with("source_dir") self.mock_run.assert_called_once_with( ["bzr", "branch", "lp:my-source", "source_dir"] ) def test_pull_tag(self): bzr = sources.Bazaar("lp:my-source", "source_dir", source_tag="tag") bzr.pull() self.mock_run.assert_called_once_with( ["bzr", "branch", "-r", "tag:tag", "lp:my-source", "source_dir"] ) def test_pull_existing_with_tag(self): self.mock_path_exists.return_value = True bzr = sources.Bazaar("lp:my-source", "source_dir", source_tag="tag") bzr.pull() self.mock_run.assert_called_once_with( ["bzr", "pull", "-r", "tag:tag", "lp:my-source", "-d", "source_dir"] ) def test_pull_commit(self): bzr = sources.Bazaar("lp:my-source", "source_dir", source_commit="2") bzr.pull() self.mock_run.assert_called_once_with( ["bzr", "branch", "-r", "2", "lp:my-source", "source_dir"] ) def test_pull_existing_with_commit(self): self.mock_path_exists.return_value = True bzr = sources.Bazaar("lp:my-source", "source_dir", source_commit="2") bzr.pull() self.mock_run.assert_called_once_with( ["bzr", "pull", "-r", "2", "lp:my-source", "-d", "source_dir"] ) def test_init_with_source_branch_raises_exception(self): raised = self.assertRaises( sources.errors.SnapcraftSourceInvalidOptionError, sources.Bazaar, "lp:mysource", "source_dir", source_branch="branch", ) self.assertThat(raised.source_type, Equals("bzr")) self.assertThat(raised.option, Equals("source-branch")) def test_init_with_source_depth_raises_exception(self): raised = self.assertRaises( sources.errors.SnapcraftSourceInvalidOptionError, sources.Bazaar, "lp://mysource", "source_dir", source_depth=2, ) self.assertThat(raised.source_type, Equals("bzr")) self.assertThat(raised.option, Equals("source-depth")) def test_init_with_source_tag_and_commit_raises_exception(self): raised = self.assertRaises( sources.errors.SnapcraftSourceIncompatibleOptionsError, sources.Bazaar, "lp://mysource", "source_dir", source_tag="tag", source_commit="2", ) self.assertThat(raised.source_type, Equals("bzr")) self.assertThat(raised.options, Equals(["source-tag", "source-commit"])) def test_source_checksum_raises_exception(self): raised = self.assertRaises( sources.errors.SnapcraftSourceInvalidOptionError, sources.Bazaar, "lp://mysource", "source_dir", source_checksum="md5/d9210476aac5f367b14e513bdefdee08", ) self.assertThat(raised.source_type, Equals("bzr")) self.assertThat(raised.option, Equals("source-checksum")) def test_has_source_handler_entry(self): self.assertTrue(sources._source_handler["bzr"] is sources.Bazaar) def test_pull_failure(self): self.mock_run.side_effect = subprocess.CalledProcessError(1, []) bzr = sources.Bazaar("lp:my-source", "source_dir") raised = self.assertRaises(sources.errors.SnapcraftPullError, bzr.pull) self.assertThat(raised.command, Equals("bzr branch lp:my-source source_dir")) self.assertThat(raised.exit_code, Equals(1)) def get_side_effect(original_call): def side_effect(cmd, *args, **kwargs): if len(cmd) > 1 and cmd[1] == "revno": return "mock-commit".encode() elif cmd[0] == "bzr": return return original_call(cmd, *args, **kwargs) return side_effect class BazaarDetailsTestCase(unit.TestCase): def setUp(self): super().setUp() self.working_tree = "bzr-working-tree" self.source_dir = "bzr-source-dir" os.mkdir(self.source_dir) # Simulate that we have already branched code out. os.mkdir(os.path.join(self.source_dir, ".bzr")) self.fake_check_output = self.useFixture( fixtures.MockPatch( "subprocess.check_output", side_effect=get_side_effect(subprocess.check_output), ) ) self.fake_check_call = self.useFixture( fixtures.MockPatch( "subprocess.check_call", side_effect=get_side_effect(subprocess.check_call), ) ) def test_bzr_details_commit(self): bzr = sources.Bazaar(self.working_tree, self.source_dir, silent=True) bzr.pull() source_details = bzr._get_source_details() self.assertThat(source_details["source-commit"], Equals("mock-commit")) self.fake_check_output.mock.assert_has_calls( [ mock.call(["bzr", "revno", self.source_dir]), mock.call(["bzr", "revno", self.source_dir]), ] ) self.fake_check_call.mock.assert_called_once_with( ["bzr", "pull", self.working_tree, "-d", self.source_dir], stderr=-3, stdout=-3, ) def test_bzr_details_tag(self): bzr = sources.Bazaar( self.working_tree, self.source_dir, source_tag="mock-tag", silent=True ) bzr.pull() source_details = bzr._get_source_details() self.assertThat(source_details["source-tag"], Equals("mock-tag")) self.fake_check_output.mock.assert_not_called() self.fake_check_call.mock.assert_called_once_with( [ "bzr", "pull", "-r", "tag:mock-tag", self.working_tree, "-d", self.source_dir, ], stderr=-3, stdout=-3, )
Well, everyone else seems to be talking about it, so for my column this month, I’m going to discuss Brexit. Don’t worry, however, this is not an opinion piece, but rather, an update to our communities as to all of the work that is ongoing to prepare for March 29. You may have previously read comments from former Edinburgh Divisional Commander, ACC Mark Williams, where he outlined that 360 officers will be on stand-by to deal with any incidents specifically relating to the impact of the UK leaving the European Union. This is purely a contingency and it is important to stress that there’s no specific information relating to any issues due to arise because of Brexit. I also want to make it clear that our reserve of officers will not be inactive, should there not be any Brexit-related issues, and will be utilised to deal with local policing matters across the city. As the Capital city, it won’t surprise any of you to learn that many of those 360 officers will be on stand by within Edinburgh. While I do not want to give specific numbers, our communities can rest assured that we will have suitable resources in place to deal with the challenges that this very divisive topic brings. We are already aware of a number of protests and demonstrations due to take place in various areas throughout the city in March. Each of these events will be policed proportionately to maintain the safety of all those in attendance, and the general public, while at the same time, miminimising disruption to the rest of the city. Whatever your personal opinion is in relation to Brexit, please be mindful that criminal activity aimed at those with an opposing point of view will not be tolerated. Incidents such as threatening or abusive behaviour, vandalism and other disorder offences will be investigated with the utmost seriousness and anyone found to be involved can expect to be robustly dealt with.
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE190_Integer_Overflow__int64_t_max_postinc_67a.c Label Definition File: CWE190_Integer_Overflow.label.xml Template File: sources-sinks-67a.tmpl.c */ /* * @description * CWE: 190 Integer Overflow * BadSource: max Set data to the max value for int64_t * GoodSource: Set data to a small, non-zero number (two) * Sinks: increment * GoodSink: Ensure there will not be an overflow before incrementing data * BadSink : Increment data, which can cause an overflow * Flow Variant: 67 Data flow: data passed in a struct from one function to another in different source files * * */ #include "std_testcase.h" typedef struct _CWE190_Integer_Overflow__int64_t_max_postinc_67_structType { int64_t structFirst; } CWE190_Integer_Overflow__int64_t_max_postinc_67_structType; #ifndef OMITBAD /* bad function declaration */ void CWE190_Integer_Overflow__int64_t_max_postinc_67b_badSink(CWE190_Integer_Overflow__int64_t_max_postinc_67_structType myStruct); void CWE190_Integer_Overflow__int64_t_max_postinc_67_bad() { int64_t data; CWE190_Integer_Overflow__int64_t_max_postinc_67_structType myStruct; data = 0LL; /* POTENTIAL FLAW: Use the maximum size of the data type */ data = LLONG_MAX; myStruct.structFirst = data; CWE190_Integer_Overflow__int64_t_max_postinc_67b_badSink(myStruct); } #endif /* OMITBAD */ #ifndef OMITGOOD /* goodG2B uses the GoodSource with the BadSink */ void CWE190_Integer_Overflow__int64_t_max_postinc_67b_goodG2BSink(CWE190_Integer_Overflow__int64_t_max_postinc_67_structType myStruct); static void goodG2B() { int64_t data; CWE190_Integer_Overflow__int64_t_max_postinc_67_structType myStruct; data = 0LL; /* FIX: Use a small, non-zero value that will not cause an overflow in the sinks */ data = 2; myStruct.structFirst = data; CWE190_Integer_Overflow__int64_t_max_postinc_67b_goodG2BSink(myStruct); } /* goodB2G uses the BadSource with the GoodSink */ void CWE190_Integer_Overflow__int64_t_max_postinc_67b_goodB2GSink(CWE190_Integer_Overflow__int64_t_max_postinc_67_structType myStruct); static void goodB2G() { int64_t data; CWE190_Integer_Overflow__int64_t_max_postinc_67_structType myStruct; data = 0LL; /* POTENTIAL FLAW: Use the maximum size of the data type */ data = LLONG_MAX; myStruct.structFirst = data; CWE190_Integer_Overflow__int64_t_max_postinc_67b_goodB2GSink(myStruct); } void CWE190_Integer_Overflow__int64_t_max_postinc_67_good() { goodG2B(); goodB2G(); } #endif /* OMITGOOD */ /* Below is the main(). It is only used when building this testcase on its own for testing or for building a binary to use in testing binary analysis tools. It is not used when compiling all the testcases as one application, which is how source code analysis tools are tested. */ #ifdef INCLUDEMAIN int main(int argc, char * argv[]) { /* seed randomness */ srand( (unsigned)time(NULL) ); #ifndef OMITGOOD printLine("Calling good()..."); CWE190_Integer_Overflow__int64_t_max_postinc_67_good(); printLine("Finished good()"); #endif /* OMITGOOD */ #ifndef OMITBAD printLine("Calling bad()..."); CWE190_Integer_Overflow__int64_t_max_postinc_67_bad(); printLine("Finished bad()"); #endif /* OMITBAD */ return 0; } #endif
<div *ngIf="customer"> <h2 *ngIf="!embedded" >Customer Details</h2> <md-card> <form (ngSubmit)="save()" autocomplete="off" #theForm="ngForm"> <md-input type="text" placeholder="First Name" [(ngModel)]="customer.firstName" ngControl="firstName" #name="ngForm"></md-input> <md-input type="text" placeholder="Last Name" [(ngModel)]="customer.lastName" ngControl="lastName" #name="ngForm"></md-input> <ul> <button (click)="addCustomerOrder()" type="button">Add Customer Order</button> <li *ngFor=" let customerOrder of customer.customerOrder; let i = index"> <customerOrder-edit [embedded]="true" [customerOrder]="customerOrder"></customerOrder-edit> <button (click)="addCustomerOrder()" type="button">Add Customer Order</button> <button (click)="removeCustomerOrder(i)" type="button">Remove</button> </li> </ul> <ul> <button (click)="addCustomerReview()" type="button">Add Customer Review</button> <li *ngFor=" let customerReview of customer.customerReview; let i = index"> <customerReview-edit [embedded]="true" [customerReview]="customerReview"></customerReview-edit> <button (click)="addCustomerReview()" type="button">Add Customer Review</button> <button (click)="removeCustomerReview(i)" type="button">Remove</button> </li> </ul> <button type="submit" class="btn btn-default" [disabled]="!theForm.form.valid" *ngIf="!embedded">Submit</button> <button (click)="goBack()"> Cancel </button> </form> </md-card> </div>
/* // =========================================================================== mcp23017: Driver for the MCP23017 port expander. Copyright 2015 Darren Faulke <[email protected]> Based on the following guides and codes: MCP23017 data sheet. - see http://ww1.microchip.com/downloads/en/DeviceDoc/21952b.pdf. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. This program 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. // =========================================================================== For a shared library, compile with: gcc -c -Wall -fpic mcp23017.c gcc -shared -o libmcp23017.so mcp23017.o For Raspberry Pi optimisation use the following flags: -march=armv6 -mtune=arm1176jzf-s -mfloat-abi=hard -mfpu=vfp -ffast-math -pipe -O3 // --------------------------------------------------------------------------- Authors: D.Faulke 23/12/2015. Contributors: Changelog: v0.1 Original version. // --------------------------------------------------------------------------- */ #include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <fcntl.h> #include <errno.h> #include <stdbool.h> #include <sys/ioctl.h> #include <linux/i2c-dev.h> #include "mcp23017.h" // Data structures. ---------------------------------------------------------- uint8_t mcp23017Register[MCP23017_REGISTERS][MCP23017_BANKS] = /* Register address can be reference with enumerated type { BANK0, BANK1 } */ {{ BANK0_IODIRA, BANK1_IODIRA }, { BANK0_IODIRB, BANK1_IODIRB }, { BANK0_IPOLA, BANK1_IPOLA }, { BANK0_IPOLB, BANK1_IPOLB }, { BANK0_GPINTENA, BANK1_GPINTENA }, { BANK0_GPINTENB, BANK1_GPINTENB }, { BANK0_DEFVALA, BANK1_DEFVALA }, { BANK0_DEFVALB, BANK1_DEFVALB }, { BANK0_INTCONA, BANK1_INTCONA }, { BANK0_INTCONB, BANK1_INTCONB }, { BANK0_IOCONA, BANK1_IOCONA }, { BANK0_IOCONB, BANK1_IOCONB }, { BANK0_GPPUA, BANK1_GPPUA }, { BANK0_GPPUB, BANK1_GPPUB }, { BANK0_INTFA, BANK1_INTFA }, { BANK0_INTFB, BANK1_INTFB }, { BANK0_INTCAPA, BANK1_INTCAPA }, { BANK0_INTCAPB, BANK1_INTCAPB }, { BANK0_GPIOA, BANK1_GPIOA }, { BANK0_GPIOB, BANK1_GPIOB }, { BANK0_OLATA, BANK1_OLATA }, { BANK0_OLATB, BANK1_OLATB }}; // MCP23017 functions. ------------------------------------------------------- // --------------------------------------------------------------------------- // Writes byte to register of MCP23017. // --------------------------------------------------------------------------- int8_t mcp23017WriteByte( struct mcp23017 *mcp23017, uint8_t reg, uint8_t data ) { // Should work with IOCON.BANK = 0 or IOCON.BANK = 1 for PORT A and B. uint8_t handle = mcp23017->id; uint8_t bank = mcp23017->bank; // Get register address for BANK mode. uint8_t addr = mcp23017Register[reg][bank]; // Write byte into register. return i2c_smbus_write_byte_data( handle, addr, data ); } // --------------------------------------------------------------------------- // Writes word to register of MCP23017. // --------------------------------------------------------------------------- int8_t mcp23017WriteWord( struct mcp23017 *mcp23017, uint8_t reg, uint16_t data ) /* Currently undefined if IOCON.BANK = 1 and PORT = B. Need to be able to check PORT - lookup table? */ { uint8_t handle = mcp23017->id; uint8_t bank = mcp23017->bank; // Get register address for BANK mode. uint8_t addr = mcp23017Register[reg][bank]; // Write word into register. return i2c_smbus_write_word_data( handle, addr, data ); } // --------------------------------------------------------------------------- // Reads byte from register of MCP23017. // --------------------------------------------------------------------------- int8_t mcp23017ReadByte( struct mcp23017 *mcp23017, uint8_t reg ) { // Should work with IOCON.BANK = 0 or IOCON.BANK = 1 for PORT A and B. uint8_t handle = mcp23017->id; uint8_t bank = mcp23017->bank; // Get register address for BANK mode. uint8_t addr = mcp23017Register[reg][bank]; // Return register value. return i2c_smbus_read_byte_data( handle, addr ); } // --------------------------------------------------------------------------- // Reads word from register of MCP23017. // --------------------------------------------------------------------------- int16_t mcp23017ReadWord( struct mcp23017 *mcp23017, uint8_t reg ) { /* Currently undefined if IOCON.BANK = 1 and PORT = B. Need to be able to check PORT - lookup table? */ uint8_t handle = mcp23017->id; uint8_t bank = mcp23017->bank; // Get register address for BANK mode. uint8_t addr = mcp23017Register[reg][bank]; // Return register value. Undefined if read PORT B and IOCON.BANK = 1. return i2c_smbus_read_word_data( handle, addr ); } // --------------------------------------------------------------------------- // Checks byte bits of MCP23017 register. // --------------------------------------------------------------------------- bool mcp23017CheckBitsByte( struct mcp23017 *mcp23017, uint8_t reg, uint8_t data ) { // Should work with IOCON.BANK = 0 or IOCON.BANK = 1 for PORT A and B. uint8_t handle = mcp23017->id; uint8_t bank = mcp23017->bank; // Get register address for BANK mode. uint8_t addr = mcp23017Register[reg][bank]; // Read register. uint8_t read = i2c_smbus_read_byte_data( handle, addr ); // Compare and return result. return (( data == read )? true : false ); }; // --------------------------------------------------------------------------- // Checks word bits of MCP23017 register. // --------------------------------------------------------------------------- bool mcp23017CheckBitsWord( struct mcp23017 *mcp23017, uint8_t reg, uint16_t data ) /* Currently undefined if IOCON.BANK = 1 and PORT = B. Need to be able to check PORT - lookup table? */ { uint8_t handle = mcp23017->id; uint8_t bank = mcp23017->bank; // Get register address for BANK mode. uint8_t addr = mcp23017Register[reg][bank]; // Read register. uint16_t read = i2c_smbus_read_byte_data( handle, addr ); // Compare and return result. Undefined for PORT B and IOCON.BANK = 1. return ( data && read ); }; // --------------------------------------------------------------------------- // Toggles byte bits of MCP23017 register. // --------------------------------------------------------------------------- int8_t mcp23017ToggleBitsByte( struct mcp23017 *mcp23017, uint8_t reg, uint8_t data ) { // Should work with IOCON.BANK = 0 or IOCON.BANK = 1 for PORT A and B uint8_t handle = mcp23017->id; uint8_t bank = mcp23017->bank; // Get register address for BANK mode. uint8_t addr = mcp23017Register[reg][bank]; // Read register. uint8_t read = i2c_smbus_read_byte_data( handle, addr ); // Write toggled bits back to register. return i2c_smbus_write_byte_data( handle, addr, data ^ read ); }; // --------------------------------------------------------------------------- // Toggles word bits of MCP23017 register. // --------------------------------------------------------------------------- int8_t mcp23017ToggleBitsWord( struct mcp23017 *mcp23017, uint8_t reg, uint16_t data ) /* Currently undefined if IOCON.BANK = 1 and PORT = B. Need to be able to check PORT - lookup table? */ { uint8_t handle = mcp23017->id; uint8_t bank = mcp23017->bank; // Get register address for BANK mode. uint8_t addr = mcp23017Register[reg][bank]; // Read register. uint16_t read = i2c_smbus_read_byte_data( handle, addr ); // Write toggled bits back to register. return i2c_smbus_write_word_data( handle, addr, data ^ read ); }; // --------------------------------------------------------------------------- // Sets byte bits of MCP23017 register. // --------------------------------------------------------------------------- int8_t mcp23017SetBitsByte( struct mcp23017 *mcp23017, uint8_t reg, uint8_t data ) { // Should work with IOCON.BANK = 0 or IOCON.BANK = 1 for PORT A and B uint8_t handle = mcp23017->id; uint8_t bank = mcp23017->bank; // Get register address for BANK mode. uint8_t addr = mcp23017Register[reg][bank]; // Read register. uint8_t read = i2c_smbus_read_byte_data( handle, addr ); // Write toggled bits back to register. return i2c_smbus_write_byte_data( handle, addr, data | read ); }; // --------------------------------------------------------------------------- // Sets word bits of MCP23017 register. // --------------------------------------------------------------------------- int8_t mcp23017SetBitsWord( struct mcp23017 *mcp23017, uint8_t reg, uint16_t data ) /* Currently undefined if IOCON.BANK = 1 and PORT = B. Need to be able to check PORT - lookup table? */ { uint8_t handle = mcp23017->id; uint8_t bank = mcp23017->bank; // Get register address for BANK mode. uint8_t addr = mcp23017Register[reg][bank]; // Read register. uint16_t read = i2c_smbus_read_byte_data( handle, addr ); // Write toggled bits back to register. return i2c_smbus_write_word_data( handle, addr, data | read ); }; // --------------------------------------------------------------------------- // Clears byte bits of MCP23017 register. // --------------------------------------------------------------------------- int8_t mcp23017ClearBitsByte( struct mcp23017 *mcp23017, uint8_t reg, uint8_t data ) { // Should work with IOCON.BANK = 0 or IOCON.BANK = 1 for PORT A and B. uint8_t handle = mcp23017->id; uint8_t bank = mcp23017->bank; // Get register address for BANK mode. uint8_t addr = mcp23017Register[reg][bank]; // Read register. uint8_t read = i2c_smbus_read_byte_data( handle, addr ); // Write data with cleared bits back to register. return i2c_smbus_write_byte_data( handle, addr, ( data & read ) ^ read ); }; // --------------------------------------------------------------------------- // Clears word bits of MCP23017 register. // --------------------------------------------------------------------------- int8_t mcp23017ClearBitsWord( struct mcp23017 *mcp23017, uint8_t reg, uint16_t data ) /* Currently undefined if IOCON.BANK = 1 and PORT = B. Need to be able to check PORT - lookup table? */ { uint8_t handle = mcp23017->id; uint8_t bank = mcp23017->bank; // Get register address for BANK mode. uint8_t addr = mcp23017Register[reg][bank]; // Read register. uint16_t read = i2c_smbus_read_byte_data( handle, addr ); // Write data with cleared bits back to register. return i2c_smbus_write_byte_data( handle, addr, ( data & read ) ^ read ); }; // --------------------------------------------------------------------------- // Initialises MCP23017. Call for each MCP23017. // --------------------------------------------------------------------------- int8_t mcp23017Init( uint8_t addr ) { struct mcp23017 *mcp23017this; // MCP23017 instance. static bool init = false; // 1st call. static uint8_t index = 0; int8_t id = -1; uint8_t i; // Set all intances of mcp23017 to NULL on first call. if ( !init ) for ( i = 0; i < MCP23017_MAX; i++ ) mcp23017[i] = NULL; // Address must be 0x20 to 0x27. if (( addr < 0x20 ) || ( addr > 0x27 )) return -1; // Get next available ID. for ( i = 0; i < MCP23017_MAX; i++ ) { if ( mcp23017[i] == NULL ) // If not already init. { id = i; // Next available id. i = MCP23017_MAX; // Break. } } if ( id < 0 ) return -1; // Return if not init. // Allocate memory for MCP23017 data structure. mcp23017this = malloc( sizeof ( struct mcp23017 )); // Return if unable to allocate memory. if ( mcp23017this == NULL ) return -1; /* Note: I2C file system path for revision 1 is "/dev/i2c-0". */ static const char *i2cDevice = "/dev/i2c-1"; // Path to I2C file system. if (!init) { // I2C communication is via device file (/dev/i2c-1). if (( id = open( i2cDevice, O_RDWR )) < 0 ) { printf( "Couldn't open I2C device %s.\n", i2cDevice ); printf( "Error code = %d.\n", errno ); return -1; } init = true; } // Create an instance of this device. mcp23017this->id = id; // I2C handle. mcp23017this->addr = addr; // Address of MCP23017. mcp23017this->bank = 0; // BANK mode 0 (default). mcp23017[index] = mcp23017this; // Copy into instance. index++; // Increment index for next MCP23017. // Set slave address for this device. if ( ioctl( mcp23017this->id, I2C_SLAVE, mcp23017this->addr ) < 0 ) { printf( "Couldn't set slave address 0x%02x.\n", mcp23017this->addr ); printf( "Error code = %d.\n", errno ); return -1; } /* Should probably set all registers to zero in case reset pin is kept high. */ return id; };
// --------------------------------------------------------------------------- // // This file is part of the <kortex> library suite // // Copyright (C) 2013 Engin Tola // // See LICENSE file for license information. // // author: Engin Tola // e-mail: [email protected] // web : http://www.engintola.com // // --------------------------------------------------------------------------- #ifndef KORTEX_MEM_UNIT_H #define KORTEX_MEM_UNIT_H #include <kortex/types.h> using std::ofstream; using std::ifstream; namespace kortex { class MemUnit { public: MemUnit(); MemUnit( const size_t& init_cap ); ~MemUnit(); MemUnit( const MemUnit& m ); MemUnit& operator=( const MemUnit& mem ); void copy( const MemUnit& m ); /// content can be destroyed - if you want to keep the content unchanged /// use expand void resize( const size_t& new_cap ); /// expands the size of the capacity of the memunit. copies the old /// content if relocation occurs. void expand( const size_t& new_cap ); void deallocate(); size_t capacity () const { return m_cap; } size_t is_owner () const { return m_owner; } const uchar* get_buffer() const { return m_buffer; } uchar* get_buffer() { return m_buffer; } void swap ( MemUnit* unit ); /// makes an alias of unit. sets owner=false void borrow( MemUnit* unit ); void save( ofstream& fout ) const; void load( ifstream& fin ); private: void init_(); void set_buffer(uchar* new_buff, const size_t& new_cap, const bool& new_own_buff); uchar* m_buffer; size_t m_cap; bool m_owner; }; } #endif
import React from "react"; import { loadFromServer, saveToServer } from "./backend"; import GreetingMaster from "./GreetingMaster"; import GreetingDetail from "./GreetingDetail"; import Chart from "./Chart"; import { aggregateGreetings } from "./util"; const MODE_MASTER = "MODE_MASTER"; const MODE_DETAIL = "MODE_DETAIL"; export default class GreetingController extends React.Component { render() { const { mode, greetings, filter } = this.state; const aggregatedGreetings = aggregateGreetings(greetings); const filtered = filter ? greetings.filter(greeting => greeting.name === filter) : greetings; return ( <div className="Main"> <div className="Left"> {mode === MODE_MASTER ? ( <GreetingMaster greetings={filtered} onAdd={() => this.setState({ mode: MODE_DETAIL })} /> ) : ( <GreetingDetail onSave={greeting => this.saveGreeting(greeting)} /> )} </div> <div className="Right"> <Chart data={aggregatedGreetings} onSegmentSelected={filter => { if (this.state.filter === filter) { // reset filter when clicking again this.setState({ filter: null }); } else { this.setState({ filter }); } }} /> </div> </div> ); } constructor(props) { super(props); this.state = { greetings: [], mode: MODE_MASTER, filter: null }; } componentDidMount() { this.loadGreetings(); } loadGreetings() { loadFromServer(greetings => this.setState({ greetings }), err => console.error("LOADING GREETINGS FAILED:", err)); } saveGreeting(greetingToBeAdded) { const _addNewGreeting = serverResponse => { // the server responded with the id of the new Greeting const newGreetingId = serverResponse.id; // create a new Greeting object that contains the received id // (create a new object for immutability) const newGreeting = { ...greetingToBeAdded, id: newGreetingId }; // add the new greetings to the list of all greetings // (create a new array for immutability) const newGreetings = [...this.state.greetings, newGreeting]; // set the new list of greetings as our new state // also set 'MODE_MASTER' to make sure the master-View is // displayed now this.setState({ greetings: newGreetings, mode: MODE_MASTER }); return newGreeting; }; const _reportError = err => console.error("COULD NOT SAVE GREETING: ", err); saveToServer(greetingToBeAdded, _addNewGreeting, _reportError); } }
<?php return array ( 'id' => 'apple_iphone_ver4_1_sub8b117', 'fallback' => 'apple_iphone_ver4_1', 'capabilities' => array ( ), );
/************************************************************\ * Copyright 2014 Lawrence Livermore National Security, LLC * (c.f. AUTHORS, NOTICE.LLNS, COPYING) * * This file is part of the Flux resource manager framework. * For details, see https://github.com/flux-framework. * * SPDX-License-Identifier: LGPL-3.0 \************************************************************/ #if HAVE_CONFIG_H #include "config.h" #endif #include <errno.h> #include <flux/core.h> #include "src/common/libutil/xzmalloc.h" #include "src/common/libtap/tap.h" #include "src/common/libtestutil/util.h" /* Fake handle flags for testing flux_flags_get/set/unset */ enum { FAKE_FLAG1 = 0x10000000, FAKE_FLAG2 = 0x20000000, FAKE_FLAG3 = 0x30000000, }; /* Destructor for malloc'ed string. * Set flag so we no this was called when aux was destroyed. */ static bool aux_destroyed = false; static void aux_free (void *arg) { free (arg); aux_destroyed = true; } /* First time this is called, don't BAIL_OUT, just set fatal_tested so * we can verify that flux_fatal_set() sets the hook. * After that, abort the test if the handle suffers a fatality. */ static bool fatal_tested = false; static void fatal_err (const char *message, void *arg) { if (fatal_tested) BAIL_OUT ("fatal error: %s", message); else fatal_tested = true; } void test_handle_invalid_args (void) { errno = 0; ok (flux_aux_set (NULL, "foo", "bar", NULL) < 0 && errno == EINVAL, "flux_aux_set h=NULL fails with EINVAL"); errno = 0; ok (flux_aux_get (NULL, "foo") == NULL && errno == EINVAL, "flux_aux_get h=NULL fails with EINVAL"); } int main (int argc, char *argv[]) { flux_t *h; char *s; flux_msg_t *msg; const char *topic; uint32_t matchtag; plan (NO_PLAN); if (!(h = loopback_create (0))) BAIL_OUT ("can't continue without loopback handle"); test_handle_invalid_args (); /* Test flux_fatal_set, flux_fatal_err */ flux_fatal_set (h, fatal_err, NULL); flux_fatal_error (h, __FUNCTION__, "Foo"); ok (fatal_tested == true, "flux_fatal function is called on fatal error"); /* Test flux_opt_set, flux_opt_get. */ errno = 0; ok (flux_opt_set (h, "nonexistent", NULL, 0) < 0 && errno == EINVAL, "flux_opt_set fails with EINVAL on unknown option"); errno = 0; ok (flux_opt_get (h, "nonexistent", NULL, 0) < 0 && errno == EINVAL, "flux_opt_get fails with EINVAL on unknown option"); /* Test flux_aux_get, flux_aux_set */ s = flux_aux_get (h, "handletest::thing1"); ok (s == NULL, "flux_aux_get returns NULL on unknown key"); flux_aux_set (h, "handletest::thing1", xstrdup ("hello"), aux_free); s = flux_aux_get (h, "handletest::thing1"); ok (s != NULL && !strcmp (s, "hello"), "flux_aux_get returns what was set"); flux_aux_set (h, "handletest::thing1", NULL, NULL); ok (aux_destroyed, "flux_aux_set key to NULL invokes destructor"); s = flux_aux_get (h, "handletest::thing1"); ok (s == NULL, "flux_aux_get returns NULL on destroyed key"); /* Test flux_flags_set, flux_flags_unset, flux_flags_get */ ok (flux_flags_get (h) == 0, "flux_flags_get returns flags handle was opened with"); flux_flags_set (h, (FAKE_FLAG1 | FAKE_FLAG2)); ok (flux_flags_get (h) == (FAKE_FLAG1 | FAKE_FLAG2), "flux_flags_set sets specified flags"); flux_flags_unset (h, FAKE_FLAG1); ok (flux_flags_get (h) == FAKE_FLAG2, "flux_flags_unset clears specified flag without clearing others"); flux_flags_set (h, FAKE_FLAG1); ok (flux_flags_get (h) == (FAKE_FLAG1 | FAKE_FLAG2), "flux_flags_set sets specified flag without clearing others"); flux_flags_set (h, 0); ok (flux_flags_get (h) == (FAKE_FLAG1 | FAKE_FLAG2), "flux_flags_set (0) has no effect"); flux_flags_unset (h, 0); ok (flux_flags_get (h) == (FAKE_FLAG1 | FAKE_FLAG2), "flux_flags_unset (0) has no effect"); flux_flags_unset (h, ~0); ok (flux_flags_get (h) == 0, "flux_flags_unset (~0) clears all flags"); /* Test flux_send, flux_recv, flux_requeue * Check flux_pollevents along the way. */ ok (flux_pollevents (h) == FLUX_POLLOUT, "flux_pollevents returns only FLUX_POLLOUT on empty queue"); if (!(msg = flux_request_encode ("foo", NULL))) BAIL_OUT ("couldn't encode request"); ok (flux_send (h, msg, 0) == 0, "flux_send works"); flux_msg_destroy (msg); ok ((flux_pollevents (h) & FLUX_POLLIN) != 0, "flux_pollevents shows FLUX_POLLIN set on non-empty queue"); ok ((msg = flux_recv (h, FLUX_MATCH_ANY, 0)) != NULL && flux_request_decode (msg, &topic, NULL) == 0 && !strcmp (topic, "foo"), "flux_recv works and sent message was received"); ok ((flux_pollevents (h) & FLUX_POLLIN) == 0, "flux_pollevents shows FLUX_POLLIN clear after queue is emptied"); /* flux_requeue bad flags */ errno = 0; ok (flux_requeue (h, msg, 0) < 0 && errno == EINVAL, "flux_requeue fails with EINVAL if HEAD|TAIL unspecified"); flux_msg_destroy (msg); /* flux_requeue: add foo, bar to HEAD; then receive bar, foo */ if (!(msg = flux_request_encode ("foo", NULL))) BAIL_OUT ("couldn't encode request"); ok (flux_requeue (h, msg, FLUX_RQ_HEAD) == 0, "flux_requeue foo HEAD works"); flux_msg_destroy (msg); if (!(msg = flux_request_encode ("bar", NULL))) BAIL_OUT ("couldn't encode request"); ok (flux_requeue (h, msg, FLUX_RQ_HEAD) == 0, "flux_requeue bar HEAD works"); flux_msg_destroy (msg); ok ((flux_pollevents (h) & FLUX_POLLIN) != 0, "flux_pollevents shows FLUX_POLLIN set after requeue"); ok ((msg = flux_recv (h, FLUX_MATCH_ANY, 0)) != NULL && flux_request_decode (msg, &topic, NULL) == 0 && !strcmp (topic, "bar"), "flux_recv got bar"); flux_msg_destroy (msg); ok ((msg = flux_recv (h, FLUX_MATCH_ANY, 0)) != NULL && flux_request_decode (msg, &topic, NULL) == 0 && !strcmp (topic, "foo"), "flux_recv got foo"); flux_msg_destroy (msg); ok ((flux_pollevents (h) & FLUX_POLLIN) == 0, "flux_pollevents shows FLUX_POLLIN clear after queue is emptied"); /* flux_requeue: add foo, bar to TAIL; then receive foo, bar */ if (!(msg = flux_request_encode ("foo", NULL))) BAIL_OUT ("couldn't encode request"); ok (flux_requeue (h, msg, FLUX_RQ_TAIL) == 0, "flux_requeue foo TAIL works"); flux_msg_destroy (msg); if (!(msg = flux_request_encode ("bar", NULL))) BAIL_OUT ("couldn't encode request"); ok (flux_requeue (h, msg, FLUX_RQ_TAIL) == 0, "flux_requeue bar TAIL works"); flux_msg_destroy (msg); ok ((flux_pollevents (h) & FLUX_POLLIN) != 0, "flux_pollevents shows FLUX_POLLIN set after requeue"); ok ((msg = flux_recv (h, FLUX_MATCH_ANY, 0)) != NULL && flux_request_decode (msg, &topic, NULL) == 0 && !strcmp (topic, "foo"), "flux_recv got foo"); flux_msg_destroy (msg); ok ((msg = flux_recv (h, FLUX_MATCH_ANY, 0)) != NULL && flux_request_decode (msg, &topic, NULL) == 0 && !strcmp (topic, "bar"), "flux_recv got bar"); flux_msg_destroy (msg); ok ((flux_pollevents (h) & FLUX_POLLIN) == 0, "flux_pollevents shows FLUX_POLLIN clear after queue is emptied"); /* matchtags */ matchtag = flux_matchtag_alloc (h); ok (matchtag != FLUX_MATCHTAG_NONE, "flux_matchtag_alloc works"); flux_matchtag_free (h, matchtag); flux_close (h); done_testing(); return (0); } /* * vi:tabstop=4 shiftwidth=4 expandtab */
#!/bin/bash -e # Copyright (c) 2017 Stefan Katerkamp (katerkamp.de) . target/maven-shared-archive-resources/bash/config.sh 2>/dev/null || (echo "ERROR. Fix: run from project basedir."; exit 1) . $SHAREPATH/bash/lib.sh echo "FONTS........." runscript pull-googlefonts.sh echo "GIT REPOS........." runscript pull-repos.sh echo "NPM PACKAGES........." runscript pull-nodepkgs.sh exit 0
// This file has been generated by the SAPUI5 'AllInOne' Builder jQuery.sap.declare('sap.uxap.library-all'); if ( !jQuery.sap.isDeclared('sap.uxap.BlockBaseMetadata') ) { /*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2016 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ // Provides class sap.uxap.BlockBaseMetadata jQuery.sap.declare('sap.uxap.BlockBaseMetadata'); // unresolved dependency added by SAPUI5 'AllInOne' Builder jQuery.sap.require('jquery.sap.global'); // unlisted dependency retained jQuery.sap.require('sap.ui.core.ElementMetadata'); // unlisted dependency retained sap.ui.define("sap/uxap/BlockBaseMetadata",["jquery.sap.global", "sap/ui/core/ElementMetadata"], function (jQuery, ElementMetadata) { "use strict"; /** * Creates a new metadata object for a BlockBase subclass. * * @param {string} sClassName fully qualified name of the class that is described by this metadata object * @param {object} oClassInfo static info to construct the metadata from * * @class * @author SAP SE * @version 1.36.11 * @since 1.26 * @alias sap.uxap.BlockBaseMetadata */ var BlockBaseMetadata = function (sClassName, oClassInfo) { // call super constructor ElementMetadata.apply(this, arguments); this._mViews = oClassInfo.metadata.views || {}; }; //chain the prototypes BlockBaseMetadata.prototype = jQuery.sap.newObject(ElementMetadata.prototype); BlockBaseMetadata.prototype.applySettings = function (oClassInfo) { var vRenderer = oClassInfo.hasOwnProperty("renderer") ? (oClassInfo.renderer || "") : undefined; ElementMetadata.prototype.applySettings.call(this, oClassInfo); if (vRenderer == null) { // If a renderer has been defined on the block then use it, otherwise use the BlockBaseRenderer this._sRendererName = null; } }; /** * Determines the class name of the renderer for the described control class. * @returns {string} renderer name */ BlockBaseMetadata.prototype.getRendererName = function () { //if we have not resolved the renderer yet if (!this._sBlockRenderer) { this._sBlockRenderer = this._resolveRendererName(); jQuery.sap.log.debug("BlockBaseMetadata :: " + this.getName() + " is renderer with " + this._sBlockRenderer); } return this._sBlockRenderer; }; BlockBaseMetadata.prototype._resolveRendererName = function () { var sCandidateRenderer = ElementMetadata.prototype.getRendererName.call(this); //we test if a specific render has been provided, in this case we keep it if (sCandidateRenderer == null) { var oParent = this.getParent(); if (oParent) { sCandidateRenderer = BlockBaseMetadata.prototype._resolveRendererName.apply(oParent); } else { throw new Error("BlockBaseMetadata :: no renderer found for " + this.getName()); } } return sCandidateRenderer; }; /** * return a view from its name * @param {*} sViewName * @returns {*} view */ BlockBaseMetadata.prototype.getView = function (sViewName) { return this._mViews[sViewName]; }; /** * return the view definition object * @returns {*} view */ BlockBaseMetadata.prototype.getViews = function () { return this._mViews; }; /** * setter for the view * @param {*} sViewName the name of the view * @param {*} oViewParameters view parameters * @returns {*} this */ BlockBaseMetadata.prototype.setView = function (sViewName, oViewParameters) { this._mViews[sViewName] = oViewParameters; return this; }; /** * checks whether some view are defined * @returns {*} has views */ BlockBaseMetadata.prototype.hasViews = function () { return !jQuery.isEmptyObject(this._mViews); }; return BlockBaseMetadata; }, /* bExport= */ true); }; // end of sap/uxap/BlockBaseMetadata.js if ( !jQuery.sap.isDeclared('sap.uxap.BlockBaseRenderer') ) { /*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2016 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ jQuery.sap.declare('sap.uxap.BlockBaseRenderer'); // unresolved dependency added by SAPUI5 'AllInOne' Builder sap.ui.define("sap/uxap/BlockBaseRenderer",function () { "use strict"; var BlockBaseRenderer = {}; BlockBaseRenderer.render = function (oRm, oControl) { if (!oControl.getVisible()) { return; } oRm.write("<div"); oRm.writeControlData(oControl); if (oControl._getSelectedViewContent()) { oRm.addClass('sapUxAPBlockBase'); oRm.addClass("sapUxAPBlockBase" + oControl.getMode()); } else { var sClassShortName = oControl.getMetadata().getName().split(".").pop(); oRm.addClass('sapUxAPBlockBaseDefaultSize'); oRm.addClass('sapUxAPBlockBaseDefaultSize' + sClassShortName + oControl.getMode()); } oRm.writeClasses(); oRm.write(">"); if (oControl._getSelectedViewContent()) { oRm.renderControl(oControl._getSelectedViewContent()); } oRm.write("</div>"); }; return BlockBaseRenderer; }, /* bExport= */ true); }; // end of sap/uxap/BlockBaseRenderer.js if ( !jQuery.sap.isDeclared('sap.uxap.BreadCrumbsRenderer') ) { /*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2016 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ jQuery.sap.declare('sap.uxap.BreadCrumbsRenderer'); // unresolved dependency added by SAPUI5 'AllInOne' Builder sap.ui.define("sap/uxap/BreadCrumbsRenderer",function () { "use strict"; /** * @class BreadCrumbs renderer. * @static */ var BreadCrumbsRenderer = {}; BreadCrumbsRenderer.render = function (oRm, oControl) { oRm.write("<div"); oRm.writeControlData(oControl); oRm.addClass("sapUxAPBreadCrumbs"); oRm.writeClasses(); oRm.writeAttribute("role", "navigation"); oRm.writeAttributeEscaped("aria-labelledby", oControl._getAriaLabelledBy().getId()); oRm.write(">"); this._renderOverflowSelect(oRm, oControl); if (!oControl._bOnPhone) { this._renderBreadcrumbTrail(oRm, oControl); } oRm.write("</div>"); }; BreadCrumbsRenderer._renderBreadcrumbTrail = function (oRm, oControl) { var aLinks = oControl.getLinks(), oCurrentLocation = oControl.getCurrentLocation(), oTubeIcon = oControl._getTubeIcon(), bShowCurrentLocation = oControl.getShowCurrentLocation(); oRm.write("<ul id='" + oControl.getId() + "-breadcrumbs'"); oRm.write(">"); aLinks.forEach(function (oLink) { oRm.write("<li>"); oRm.renderControl(oLink); oRm.renderControl(oTubeIcon); oRm.write("</li>"); }); if (bShowCurrentLocation) { oRm.write("<li>"); oRm.renderControl(oCurrentLocation); oRm.write("</li>"); } oRm.write("</ul>"); }; BreadCrumbsRenderer._renderOverflowSelect = function (oRm, oControl) { var oTubeIcon = oControl._getTubeIcon(); oRm.write("<div id='" + oControl.getId() + "-select'"); oRm.addClass("sapUiHidden"); oRm.writeClasses(); oRm.write(">"); oRm.write('<span class="sapUxAPBreadCrumbsDots">...</span>'); oRm.renderControl(oTubeIcon); oRm.renderControl(oControl._getOverflowSelect()); oRm.write("</div>"); }; return BreadCrumbsRenderer; }, /* bExport= */ true); }; // end of sap/uxap/BreadCrumbsRenderer.js if ( !jQuery.sap.isDeclared('sap.uxap.HierarchicalSelectRenderer') ) { /*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2016 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ jQuery.sap.declare('sap.uxap.HierarchicalSelectRenderer'); // unresolved dependency added by SAPUI5 'AllInOne' Builder jQuery.sap.require('sap.m.SelectRenderer'); // unlisted dependency retained jQuery.sap.require('sap.ui.core.Renderer'); // unlisted dependency retained sap.ui.define("sap/uxap/HierarchicalSelectRenderer",["sap/m/SelectRenderer", "sap/ui/core/Renderer" ], function (SelectRenderer, Renderer) { "use strict"; /** * @class ObjectPageRenderer renderer. * @static */ var HierarchicalSelectRenderer = Renderer.extend(SelectRenderer); HierarchicalSelectRenderer.addClass = function (oRm) { oRm.addClass("sapUxAPHierarchicalSelect"); }; return HierarchicalSelectRenderer; }, /* bExport= */ true); }; // end of sap/uxap/HierarchicalSelectRenderer.js if ( !jQuery.sap.isDeclared('sap.uxap.ObjectPageHeaderActionButtonRenderer') ) { /*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2016 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ jQuery.sap.declare('sap.uxap.ObjectPageHeaderActionButtonRenderer'); // unresolved dependency added by SAPUI5 'AllInOne' Builder jQuery.sap.require('sap.m.ButtonRenderer'); // unlisted dependency retained jQuery.sap.require('sap.ui.core.Renderer'); // unlisted dependency retained sap.ui.define("sap/uxap/ObjectPageHeaderActionButtonRenderer",["sap/m/ButtonRenderer", "sap/ui/core/Renderer"], function (ButtonRenderer, Renderer) { "use strict"; /** * @class ObjectPageRenderer renderer. * @static */ var ObjectPageHeaderActionButtonRenderer = Renderer.extend(ButtonRenderer); return ObjectPageHeaderActionButtonRenderer; }, /* bExport= */ true); }; // end of sap/uxap/ObjectPageHeaderActionButtonRenderer.js if ( !jQuery.sap.isDeclared('sap.uxap.ObjectPageLayout.designtime') ) { /*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2016 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ // Provides the Design Time Metadata for the sap.uxap.ObjectPageLayout control jQuery.sap.declare('sap.uxap.ObjectPageLayout.designtime'); // unresolved dependency added by SAPUI5 'AllInOne' Builder sap.ui.define("sap/uxap/ObjectPageLayout.designtime",[], function() { "use strict"; return { aggregations : { sections : { domRef : ":sap-domref > .sapUxAPObjectPageWrapper" } }, cloneDomRef : ":sap-domref > header" }; }, /* bExport= */ false); }; // end of sap/uxap/ObjectPageLayout.designtime.js if ( !jQuery.sap.isDeclared('sap.uxap.ObjectPageSectionRenderer') ) { /*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2016 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ jQuery.sap.declare('sap.uxap.ObjectPageSectionRenderer'); // unresolved dependency added by SAPUI5 'AllInOne' Builder sap.ui.define("sap/uxap/ObjectPageSectionRenderer",function () { "use strict"; /** * @class Section renderer. * @static */ var ObjectPageSectionRenderer = {}; ObjectPageSectionRenderer.render = function (oRm, oControl) { if (!oControl.getVisible() || !oControl._getInternalVisible()) { return; } var sTitle = oControl._getInternalTitle() ? oControl._getInternalTitle() : oControl.getTitle(); oRm.write("<section "); oRm.addClass("sapUxAPObjectPageSection"); oRm.writeClasses(); oRm.writeAttribute("role", "region"); oRm.writeAttributeEscaped("aria-labelledby", oControl.getAggregation("ariaLabelledBy").getId()); oRm.writeControlData(oControl); oRm.write(">"); if (oControl.getShowTitle() && oControl._getInternalTitleVisible()) { oRm.write("<div"); oRm.writeAttribute("role", "heading"); oRm.writeAttribute("aria-level", "3"); oRm.writeAttributeEscaped("id", oControl.getId() + "-header"); oRm.addClass("sapUxAPObjectPageSectionHeader"); oRm.writeClasses(); oRm.write(">"); oRm.write("<div"); oRm.writeAttributeEscaped("id", oControl.getId() + "-title"); oRm.addClass("sapUxAPObjectPageSectionTitle"); if (oControl.getTitleUppercase()) { oRm.addClass("sapUxAPObjectPageSectionTitleUppercase"); } oRm.writeClasses(); oRm.write(">"); oRm.writeEscaped(sTitle); oRm.write("</div>"); oRm.renderControl(oControl._getShowHideAllButton()); oRm.renderControl(oControl._getShowHideButton()); oRm.write("</div>"); } oRm.write("<div"); oRm.addClass("sapUxAPObjectPageSectionContainer"); oRm.writeClasses(); if (oControl._isHidden){ oRm.addStyle("display", "none"); } oRm.writeStyles(); oRm.write(">"); oControl.getSubSections().forEach(oRm.renderControl); oRm.write("</div>"); oRm.write("</section>"); }; return ObjectPageSectionRenderer; }, /* bExport= */ true); }; // end of sap/uxap/ObjectPageSectionRenderer.js if ( !jQuery.sap.isDeclared('sap.uxap.ObjectPageSubSectionRenderer') ) { /*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2016 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ jQuery.sap.declare('sap.uxap.ObjectPageSubSectionRenderer'); // unresolved dependency added by SAPUI5 'AllInOne' Builder sap.ui.define("sap/uxap/ObjectPageSubSectionRenderer",function () { "use strict"; /** * @class Section renderer. * @static */ var ObjectPageSubSectionRenderer = {}; ObjectPageSubSectionRenderer.render = function (oRm, oControl) { var aActions, bHasTitle, bHasTitleLine, bHasActions, bUseTitleOnTheLeft; if (!oControl.getVisible() || !oControl._getInternalVisible()) { return; } aActions = oControl.getActions() || []; bHasActions = aActions.length > 0; bHasTitle = (oControl._getInternalTitleVisible() && (oControl.getTitle().trim() !== "")); bHasTitleLine = bHasTitle || bHasActions; oRm.write("<div "); oRm.writeAttribute("role", "region"); oRm.writeControlData(oControl); oRm.addClass("sapUxAPObjectPageSubSection"); oRm.writeClasses(oControl); oRm.writeClasses(); oRm.write(">"); if (bHasTitleLine) { oRm.write("<div"); oRm.addClass("sapUxAPObjectPageSubSectionHeader"); bUseTitleOnTheLeft = oControl._getUseTitleOnTheLeft(); if (bUseTitleOnTheLeft && oControl._onDesktopMediaRange()) { oRm.addClass("titleOnLeftLayout"); } oRm.writeAttributeEscaped("id", oControl.getId() + "-header"); oRm.writeClasses(); oRm.write(">"); oRm.write("<div"); if (bHasTitle) { oRm.writeAttribute("role", "heading"); oRm.writeAttribute("aria-level", "4"); } oRm.addClass('sapUxAPObjectPageSubSectionHeaderTitle'); if (oControl.getTitleUppercase()) { oRm.addClass("sapUxAPObjectPageSubSectionHeaderTitleUppercase"); } oRm.writeAttributeEscaped("id", oControl.getId() + "-headerTitle"); oRm.writeClasses(); oRm.writeAttribute("data-sap-ui-customfastnavgroup", true); if (bHasTitle) { oRm.writeAttribute("tabindex", 0); } oRm.write(">"); if (bHasTitle) { oRm.writeEscaped(oControl.getTitle()); } oRm.write("</div>"); if (bHasActions) { oRm.write("<div"); oRm.addClass('sapUxAPObjectPageSubSectionHeaderActions'); oRm.writeClasses(); oRm.writeAttribute("data-sap-ui-customfastnavgroup", true); oRm.write(">"); aActions.forEach(oRm.renderControl); oRm.write("</div>"); } oRm.write("</div>"); } oRm.write("<div"); oRm.addClass("ui-helper-clearfix"); oRm.addClass("sapUxAPBlockContainer"); oRm.addClass("sapUiResponsiveMargin"); oRm.writeClasses(); if (oControl._isHidden){ oRm.addStyle("display", "none"); } oRm.writeStyles(); oRm.write(">"); oRm.renderControl(oControl._getGrid()); oRm.write("<div"); oRm.addClass("sapUxAPSubSectionSeeMoreContainer"); oRm.writeClasses(); oRm.write(">"); oRm.renderControl(oControl._getSeeMoreButton()); oRm.write("</div>"); oRm.write("</div>"); oRm.write("</div>"); }; return ObjectPageSubSectionRenderer; }, /* bExport= */ true); }; // end of sap/uxap/ObjectPageSubSectionRenderer.js if ( !jQuery.sap.isDeclared('sap.uxap.component.Component') ) { /*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2016 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ jQuery.sap.declare('sap.uxap.component.Component'); // unresolved dependency added by SAPUI5 'AllInOne' Builder jQuery.sap.require('sap.uxap.ObjectPageConfigurationMode'); // unlisted dependency retained jQuery.sap.require('sap.ui.core.UIComponent'); // unlisted dependency retained jQuery.sap.require('sap.ui.model.json.JSONModel'); // unlisted dependency retained jQuery.sap.require('sap.ui.core.Component'); // unlisted dependency retained sap.ui.define("sap/uxap/component/Component",[ "sap/uxap/ObjectPageConfigurationMode", "sap/ui/core/UIComponent", "sap/ui/model/json/JSONModel", "sap/ui/core/Component" ], function (ObjectPageConfigurationMode, UIComponent, JSONModel /*, Component*/) { "use strict"; var Component = UIComponent.extend("sap.uxap.component.Component", { metadata: { /* nothing new compared to a standard UIComponent */ }, /** * initialize the view containing the objectPageLayout */ init: function () { //step1: create model from configuration this._oModel = null; //internal component model this._oViewConfig = { //internal view configuration viewData: { component: this } }; //step2: load model from the component configuration switch (this.oComponentData.mode) { case ObjectPageConfigurationMode.JsonURL: // jsonUrl bootstraps the ObjectPageLayout on a json config url jsonConfigurationURL // case 1: load from an XML view + json for the object page layout configuration this._oModel = new UIComponent(this.oComponentData.jsonConfigurationURL); this._oViewConfig.viewName = "sap.uxap.component.ObjectPageLayoutUXDrivenFactory"; this._oViewConfig.type = sap.ui.core.mvc.ViewType.XML; break; case ObjectPageConfigurationMode.JsonModel: // JsonModel bootstraps the ObjectPageLayout from the external model objectPageLayoutMedatadata this._oViewConfig.viewName = "sap.uxap.component.ObjectPageLayoutUXDrivenFactory"; this._oViewConfig.type = sap.ui.core.mvc.ViewType.XML; break; default: jQuery.sap.log.error("UxAPComponent :: missing bootstrap information. Expecting one of the following: JsonURL, JsonModel and FacetsAnnotation"); } //create the UIComponent UIComponent.prototype.init.call(this); }, /** * Create view corresponding to the chosen config * @returns {sap.ui.view} Created view */ createContent: function () { var oController; //step3: create view this._oView = sap.ui.view(this._oViewConfig); //step4: bind the view with the model if (this._oModel) { oController = this._oView.getController(); //some factory requires pre-processing once the view and model are created if (oController && oController.connectToComponent) { oController.connectToComponent(this._oModel); } //can now apply the model and rely on the underlying factory logic this._oView.setModel(this._oModel, "objectPageLayoutMetadata"); } return this._oView; }, /** * traps propagated properties for postprocessing on useExternalModel cases * @param {*} vName the name of the property * @returns {*} result of the function */ propagateProperties: function (vName) { if (this.oComponentData.mode === ObjectPageConfigurationMode.JsonModel) { var oController = this._oView.getController(); //some factory requires post-processing once the view and model are created if (oController && oController.connectToComponent) { oController.connectToComponent(this.getModel("objectPageLayoutMetadata")); } } return UIComponent.prototype.propagateProperties.apply(this, arguments); }, /** * destroy the view and model before exiting */ destroy: function () { if (this._oView) { this._oView.destroy(); this._oView = null; } if (this._oModel) { this._oModel.destroy(); this._oModel = null; } if (UIComponent.prototype.destroy) { UIComponent.prototype.destroy.call(this); } } }); return Component; }); }; // end of sap/uxap/component/Component.js if ( !jQuery.sap.isDeclared('sap.uxap.component.ObjectPageComponentContainer') ) { /*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2016 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ jQuery.sap.declare('sap.uxap.component.ObjectPageComponentContainer'); // unresolved dependency added by SAPUI5 'AllInOne' Builder jQuery.sap.require('sap.ui.core.ComponentContainer'); // unlisted dependency retained jQuery.sap.require('sap.uxap.ObjectPageConfigurationMode'); // unlisted dependency retained jQuery.sap.require('sap.ui.core.Component'); // unlisted dependency retained sap.ui.define("sap/uxap/component/ObjectPageComponentContainer",['sap/ui/core/ComponentContainer', 'sap/uxap/ObjectPageConfigurationMode', "sap/ui/core/Component"], function (ComponentContainer, ObjectPageConfigurationMode /*, Component */) { "use strict"; /** * The objectPageComponentContainer initialize and render an objectPageLayout * @alias sap.uxap.component.ObjectPageComponentContainer */ var ObjectPageComponentContainer = ComponentContainer.extend("sap.uxap.component.ObjectPageComponentContainer", /** @lends sap.uxap.component.ObjectPageComponentContainer.prototype */ { metadata: { properties: { "jsonConfigurationURL": {type: "string", group: "Behavior"}, "mode": {type: "sap.uxap.ObjectPageConfigurationMode", group: "Behavior"} } }, /** * initialize the component container and set default configuration */ init: function () { //set default config this.setPropagateModel(true); this.setName("sap.uxap.component"); }, /** * this ComponentContainer is working only with one component: the objectPageLayout * unlike the standard ComponentContainer, this ones exposes properties to the outside world and pass them on to the underlying component */ onBeforeRendering: function () { this._oComponent = sap.ui.component("sap.uxap"); if (!this._oComponent) { this._oComponent = sap.ui.component({ name: this.getName(), url: this.getUrl(), componentData: { //forward configuration to underlying component jsonConfigurationURL: this.getJsonConfigurationURL(), mode: this.getMode() } }); this.setComponent(this._oComponent, true); } // call the parent onBeforeRendering if (ComponentContainer.prototype.onBeforeRendering) { ComponentContainer.prototype.onBeforeRendering.call(this); } }, /** * Returns the instantiated objectPageLayout for further api manipulations or null if not not rendered already. * @returns {sap.uxap.ObjectPageLayout} Layout instanse */ getObjectPageLayoutInstance: function () { var oObjectPageLayoutInstance = null; if (this._oComponent && this._oComponent._oView) { oObjectPageLayoutInstance = this._oComponent._oView.byId("ObjectPageLayout"); } else { jQuery.sap.log.error("ObjectPageComponentContainer :: cannot find children ObjectPageLayout, has it been rendered already?"); } return oObjectPageLayoutInstance; }, /** * use the standard renderer */ renderer: "sap.ui.core.ComponentContainerRenderer" }); return ObjectPageComponentContainer; }); }; // end of sap/uxap/component/ObjectPageComponentContainer.js if ( !jQuery.sap.isDeclared('sap.uxap.library') ) { /*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2016 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ /** * Initialization Code and shared classes of library sap.uxap. */ jQuery.sap.declare('sap.uxap.library'); // unresolved dependency added by SAPUI5 'AllInOne' Builder jQuery.sap.require('jquery.sap.global'); // unlisted dependency retained jQuery.sap.require('sap.ui.core.Core'); // unlisted dependency retained jQuery.sap.require('sap.ui.core.library'); // unlisted dependency retained jQuery.sap.require('sap.m.library'); // unlisted dependency retained jQuery.sap.require('sap.ui.layout.library'); // unlisted dependency retained sap.ui.define("sap/uxap/library",["jquery.sap.global", "sap/ui/core/Core", "sap/ui/core/library", "sap/m/library", "sap/ui/layout/library"], function (jQuery, Core, library) { "use strict"; /** * SAP UxAP * * @namespace * @name sap.uxap * @public */ // library dependencies // delegate further initialization of this library to the Core sap.ui.getCore().initLibrary({ name: "sap.uxap", dependencies: ["sap.ui.core", "sap.m", "sap.ui.layout"], types: [ "sap.uxap.BlockBaseColumnLayout", "sap.uxap.ObjectPageConfigurationMode", "sap.uxap.ObjectPageHeaderDesign", "sap.uxap.ObjectPageHeaderPictureShape", "sap.uxap.ObjectPageSubSectionLayout", "sap.uxap.ObjectPageSubSectionMode" ], interfaces: [], controls: [ "sap.uxap.AnchorBar", "sap.uxap.BlockBase", "sap.uxap.BreadCrumbs", "sap.uxap.HierarchicalSelect", "sap.uxap.ObjectPageHeader", "sap.uxap.ObjectPageHeaderActionButton", "sap.uxap.ObjectPageHeaderContent", "sap.uxap.ObjectPageLayout", "sap.uxap.ObjectPageSection", "sap.uxap.ObjectPageSectionBase", "sap.uxap.ObjectPageSubSection" ], elements: [ "sap.uxap.ModelMapping", "sap.uxap.ObjectPageHeaderLayoutData" ], version: "1.36.11" }); /** * @class Used by the BlockBase control to define how many columns should it be assigned by the objectPageSubSection. * The allowed values can be auto (subsection assigned a number of columns based on the parent objectPageLayout subsectionLayout property), 1, 2 or 3 * (This may not be a valid value for some subSectionLayout, for example asking for 3 columns in a 2 column layout would raise warnings). * * @static * @public * @ui5-metamodel This simple type also will be described in the UI5 (legacy) designtime metamodel */ sap.uxap.BlockBaseColumnLayout = sap.ui.base.DataType.createType('sap.uxap.BlockBaseColumnLayout', { isValid: function (vValue) { return /^(auto|[1-4]{1})$/.test(vValue); } }, sap.ui.base.DataType.getType('string') ); /** * Used by the BlockBase control to define if it should do automatic adjustment of its nested forms. * * @author SAP SE * @enum {string} * @static * @public * @ui5-metamodel This simple type also will be described in the UI5 (legacy) designtime metamodel */ sap.uxap.BlockBaseFormAdjustment = { /** * Any form within the block will be automatically adjusted to have as many columns as the colspan of its parent block. * @public */ BlockColumns: "BlockColumns", /** * Any form within the block will be automatically adjusted to have only one column. * @public */ OneColumn: "OneColumn", /** * No automatic adjustment of forms. * @public */ None: "None" }; /** * Used by the sap.uxap.component.Component how to initialize the ObjectPageLayout sections and subsections. * * @author SAP SE * @enum {string} * @public * @ui5-metamodel This enumeration also will be described in the UI5 (legacy) designtime metamodel */ sap.uxap.ObjectPageConfigurationMode = { /** * Determines the JSON url * @public */ JsonURL: "JsonURL", /** * Determines the JSON model * @public */ JsonModel: "JsonModel" }; /** * Used by the ObjectPageHeader control to define which design to use. * * @author SAP SE * @enum {string} * @public * @ui5-metamodel This enumeration also will be described in the UI5 (legacy) designtime metamodel */ sap.uxap.ObjectPageHeaderDesign = { /** * Light theme for the ObjectPageHeader. * @public */ Light: "Light", /** * Dark theme for the ObjectPageHeader. * @public */ Dark: "Dark" }; /** * Used by the ObjectPageHeader control to define which shape to use for the image. * * @author SAP SE * @enum {string} * @public * @ui5-metamodel This enumeration also will be described in the UI5 (legacy) designtime metamodel */ sap.uxap.ObjectPageHeaderPictureShape = { /** * Circle shape for the images in the ObjectPageHeader. * @public */ Circle: "Circle", /** * Square shape for the images in the ObjectPageHeader. * @public */ Square: "Square" }; /** * Used by the ObjectPagSubSection control to define which layout to apply. * * @author SAP SE * @enum {string} * @public * @ui5-metamodel This enumeration also will be described in the UI5 (legacy) designtime metamodel */ sap.uxap.ObjectPageSubSectionLayout = { /** * TitleOnTop: title and actions on top of the block area. * @public */ TitleOnTop: "TitleOnTop", /** * TitleOnLeft: title and actions on the left, inside the block area. * @public */ TitleOnLeft: "TitleOnLeft" }; /** * Used by the ObjectPageLayout control to define which layout to use (either Collapsed or Expanded). * * @author SAP SE * @enum {string} * @public * @ui5-metamodel This enumeration also will be described in the UI5 (legacy) designtime metamodel */ sap.uxap.ObjectPageSubSectionMode = { /** * Collapsed mode of display of the ObjectPageLayout. * @public */ Collapsed: "Collapsed", /** * Expanded mode of displaying the ObjectPageLayout. * @public */ Expanded: "Expanded" }; /** * Used by the ObjectSectionBase control to define the importance of the content contained in it. * * @author SAP SE * @enum {string} * @public * @since 1.32.0 * @ui5-metamodel This enumeration also will be described in the UI5 (legacy) designtime metamodel */ sap.uxap.Importance = { /** * Low importance of the content * @public */ Low: "Low", /** * Medium importance of the content * @public */ Medium: "Medium", /** * High importance of the content * @public */ High: "High" }; sap.uxap.i18nModel = (function () { return new sap.ui.model.resource.ResourceModel({ bundleUrl: jQuery.sap.getModulePath("sap.uxap.i18n.i18n", ".properties") }); }()); /** * * @type {{getClosestOPL: Function}} */ sap.uxap.Utilities = { /** * Returns the reference to the ObjectPageLayout for a given control * @static * @param {sap.ui.core.Control} oControl - the control to find ObjectPageLayout for * @private * @returns {*} Object Page layout referance */ getClosestOPL: function (oControl) { while (oControl && oControl.getMetadata().getName() !== "sap.uxap.ObjectPageLayout") { oControl = oControl.getParent(); } return oControl; }, isPhoneScenario: function () { if (sap.ui.Device.system.phone) { return true; } return sap.uxap.Utilities._isCurrentMediaSize("Phone"); }, isTabletScenario: function () { if (sap.ui.Device.system.tablet) { return true; } return sap.uxap.Utilities._isCurrentMediaSize("Tablet"); }, _isCurrentMediaSize: function (sMedia) { if (sap.ui.Device.media.hasRangeSet(sap.ui.Device.media.RANGESETS.SAP_STANDARD_EXTENDED)) { var oRange = sap.ui.Device.media.getCurrentRange(sap.ui.Device.media.RANGESETS.SAP_STANDARD_EXTENDED); if (oRange && oRange.name === sMedia) { return true; } } return jQuery("html").hasClass("sapUiMedia-Std-" + sMedia); } }; return sap.uxap; }, /* bExport= */ true); }; // end of sap/uxap/library.js if ( !jQuery.sap.isDeclared('sap.uxap.BreadCrumbs') ) { /*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2016 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ // Provides control sap.uxap.BreadCrumbs. jQuery.sap.declare('sap.uxap.BreadCrumbs'); // unresolved dependency added by SAPUI5 'AllInOne' Builder jQuery.sap.require('sap.m.Link'); // unlisted dependency retained jQuery.sap.require('sap.m.Select'); // unlisted dependency retained jQuery.sap.require('sap.m.Text'); // unlisted dependency retained jQuery.sap.require('sap.ui.core.Control'); // unlisted dependency retained jQuery.sap.require('sap.ui.core.ResizeHandler'); // unlisted dependency retained jQuery.sap.require('sap.ui.core.delegate.ItemNavigation'); // unlisted dependency retained jQuery.sap.require('sap.ui.core.Item'); // unlisted dependency retained jQuery.sap.require('sap.ui.core.Icon'); // unlisted dependency retained jQuery.sap.require('sap.ui.Device'); // unlisted dependency retained sap.ui.define("sap/uxap/BreadCrumbs",[ "sap/m/Link", "sap/m/Select", "sap/m/Text", "sap/ui/core/Control", "sap/ui/core/ResizeHandler", "sap/ui/core/delegate/ItemNavigation", "sap/ui/core/Item", "sap/ui/core/Icon", "sap/ui/Device", "./library" ], function (Link, Select, Text, Control, ResizeHandler, ItemNavigation, Item, Icon, Device, library) { "use strict"; /** * Constructor for a new BreadCrumbs. * * @param {string} [sId] id for the new control, generated automatically if no id is given * @param {object} [mSettings] initial settings for the new control * * @class * * The BreadCrumbs control represents the navigation steps up to the current location in the application and allows * the user to quickly navigate to a previous location on the path that got him to the current location. * It has two main modes of operation. One is a trail of links followed by separators (when there's enough space * for the control to fit on one line), and the other is a dropdown list with the links (when the trail of links * wouldn't fit on one line). * @extends sap.ui.core.Control * * @author SAP SE * * @constructor * @public * @since 1.30 * @alias sap.uxap.BreadCrumbs * @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel */ var BreadCrumbs = Control.extend("sap.uxap.BreadCrumbs", /** @lends sap.uxap.BreadCrumbs.prototype */ { metadata: { library: "sap.uxap", properties: { /** * Sets the visibility of the current/last element in the BreadCrumbs path. */ showCurrentLocation: {type: "boolean", group: "Behavior", defaultValue: true} }, defaultAggregation: "links", aggregations: { /** * A list of all the active link elements in the BreadCrumbs control. */ links: {type: "sap.m.Link", multiple: true, singularName: "link"}, /** * The current/last element in the BreadCrumbs path. */ currentLocation: {type: "sap.m.Text", multiple: false}, /** * An icon that is used as a separator after each link in the standard mode. */ _tubeIcon: {type: "sap.ui.core.Icon", multiple: false, visibility: "hidden"}, /** * * A select control which is used to display the BreadCrumbs content on smaller mobile devices or * when there's not enough space for the control to fit on one line. */ _overflowSelect: {type: "sap.m.Select", multiple: false, visibility: "hidden"} } } }); BreadCrumbs.PAGEUP_AND_PAGEDOWN_JUMP_SIZE = 5; BreadCrumbs.prototype.init = function () { this._iREMSize = parseInt(jQuery("body").css("font-size"), 10); this._iContainerMaxHeight = this._iREMSize * 2; }; BreadCrumbs.prototype.onBeforeRendering = function () { this._bOnPhone = Device.system.phone; this._resetControl(); }; BreadCrumbs.prototype.onAfterRendering = function () { this._handleInitialModeSelection(); }; /** * Handles the the initial mode selection between overflowSelect and normal mode * * @private * @returns {object} this */ BreadCrumbs.prototype._handleInitialModeSelection = function () { if (this._bOnPhone) { this._setSelectVisible(true); return this; } this._configureKeyboardHandling(); if (!this._iContainerHeight) { this._iContainerHeight = this.$().outerHeight(); } if (this._iContainerHeight > this._iContainerMaxHeight) { this._toggleOverflowMode(true); return this; } this._sResizeListenerId = ResizeHandler.register(this, this._handleScreenResize.bind(this)); return this; }; /** * Handles the switching between overflowSelect and normal mode * * @private * @param {*} bUseOverFlowSelect use overflow select * @returns {object} this */ BreadCrumbs.prototype._toggleOverflowMode = function (bUseOverFlowSelect) { if (this._sResizeListenerId) { ResizeHandler.deregister(this._sResizeListenerId); } this._setSelectVisible(bUseOverFlowSelect); this._setBreadcrumbsVisible(!bUseOverFlowSelect); this._sResizeListenerId = ResizeHandler.register(this, this._handleScreenResize.bind(this)); return this; }; /** * Retrieves the tube separator icon with lazy loading * * @returns {sap.ui.core.Icon} tube icon * @private */ BreadCrumbs.prototype._getTubeIcon = function () { if (!this.getAggregation("_tubeIcon")) { this.setAggregation("_tubeIcon", new Icon({ "src": "sap-icon://slim-arrow-right", "color": "#bfbfbf", "size": "1rem", "useIconTooltip": false }).addStyleClass("sapUxAPTubeIcon")); } return this.getAggregation("_tubeIcon"); }; /** * Retrieves the overflowSelect with lazy loading * * @returns {sap.m.Select} select * @private */ BreadCrumbs.prototype._getOverflowSelect = function () { var oOverflowSelect, aSelectItems; if (!this.getAggregation("_overflowSelect")) { aSelectItems = this.getLinks().reverse() || []; aSelectItems.unshift(this.getCurrentLocation()); oOverflowSelect = new Select({ items: aSelectItems.map(this._createSelectItem), autoAdjustWidth: true }); oOverflowSelect.attachChange(this._overflowSelectChangeHandler); this.setAggregation("_overflowSelect", oOverflowSelect); } return this.getAggregation("_overflowSelect"); }; /** * Retrieves the an overflowSelect item using an sap.m.Link or sap.m.Text * * @param {sap.m.Text} oItem item * @returns {sap.ui.core.Item} new item * @private */ BreadCrumbs.prototype._createSelectItem = function (oItem) { return new Item({ key: oItem.getId(), text: oItem.getText() }); }; /** * Handles the overflowSelect "select" event * * @param {jQuery.Event} oEvent event * @returns {object} this * @private */ BreadCrumbs.prototype._overflowSelectChangeHandler = function (oEvent) { var oSelectedKey = oEvent.getParameter("selectedItem").getKey(), oControl = sap.ui.getCore().byId(oSelectedKey), sLinkHref, sLinkTarget; if (oControl instanceof Link) { sLinkHref = oControl.getHref(); oControl.firePress(); if (sLinkHref) { sLinkTarget = oControl.getTarget(); if (sLinkTarget) { window.open(sLinkHref, sLinkTarget); } else { window.location.href = sLinkHref; } } } return this; }; /** * Handles the resize event of the Breadcrumbs control container * * @param {jQuery.Event} oEvent event * @returns {object} this * @private */ BreadCrumbs.prototype._handleScreenResize = function (oEvent) { var bShouldSwitchToOverflow = this._shouldOverflow(), bUsingOverflowSelect = this._getUsingOverflowSelect(); if (bShouldSwitchToOverflow && !bUsingOverflowSelect) { this._toggleOverflowMode(true); } else if (!bShouldSwitchToOverflow && bUsingOverflowSelect) { this._toggleOverflowMode(false); } return this; }; /** * Handles the decision making on whether or not the control should go into overflow mode * * @returns {boolean} should overflow * @private */ BreadCrumbs.prototype._shouldOverflow = function () { var $breadcrumbs = this._getBreadcrumbsAsJQueryObject(), bShouldOverflow, bUsingOverflowSelect = this._getUsingOverflowSelect(); if (bUsingOverflowSelect) { this._setBreadcrumbsVisible(true); } $breadcrumbs.addClass("sapUxAPInvisible"); bShouldOverflow = $breadcrumbs.outerHeight() > this._iContainerMaxHeight; $breadcrumbs.removeClass("sapUxAPInvisible"); if (bUsingOverflowSelect) { this._setBreadcrumbsVisible(false); } return bShouldOverflow; }; /** * Retrieves the Breadcrumbs jQuery object * * @returns {jQuery.Object} breadcrumbs jQuery instance * @private */ BreadCrumbs.prototype._getBreadcrumbsAsJQueryObject = function () { if (!this._$breadcrumbs) { this._$breadcurmbs = this.$("breadcrumbs"); } return this._$breadcurmbs; }; /** * Retrieves the overflowSelect jQuery object * * @returns {jQuery.Object} jQuery select object * @private */ BreadCrumbs.prototype._getOverflowSelectAsJQueryObject = function () { if (!this._$select) { this._$select = this.$("select"); } return this._$select; }; /** * Sets the visibility of the Breadcrumbs * * @param {boolean} bVisible visibility of breadcrumbs * @returns {jQuery.Object} $this * @private */ BreadCrumbs.prototype._setBreadcrumbsVisible = function (bVisible) { var $this = this.$(), $breadcrumbs = this._getBreadcrumbsAsJQueryObject(), sFullWidthClass = "sapUxAPFullWidth", sSapHiddenClass = "sapUiHidden"; if (bVisible) { $breadcrumbs.removeClass(sSapHiddenClass); $this.removeClass(sFullWidthClass); } else { $breadcrumbs.addClass(sSapHiddenClass); $this.addClass(sFullWidthClass); } return $this; }; /** * Sets the visibility of the overflowSelect * * @param {boolean} bVisible select visibility state * @returns {*} this * @private */ BreadCrumbs.prototype._setSelectVisible = function (bVisible) { var $select = this._getOverflowSelectAsJQueryObject(), sSapHiddenClass = "sapUiHidden"; if (bVisible) { $select.removeClass(sSapHiddenClass); } else { $select.addClass(sSapHiddenClass); } return this; }; /** * Resets all of the internally cached values used by the control * * @returns {object} this * @private */ BreadCrumbs.prototype._resetControl = function () { this._iContainerHeight = null; this._$select = null; this._$breadcrumbs = null; this.setAggregation("_overflowSelect", null, true); if (this._sResizeListenerId) { ResizeHandler.deregister(this._sResizeListenerId); } return this; }; /** * Provides a default aria-labelled text * * @private * @returns {sap.ui.core.InvisibleText} Aria Labelled By */ BreadCrumbs.prototype._getAriaLabelledBy = function () { if (!this._oAriaLabelledBy) { BreadCrumbs.prototype._oAriaLabelledBy = new sap.ui.core.InvisibleText({ text: library.i18nModel.getResourceBundle().getText("BREADCRUMB_TRAIL_LABEL") }).toStatic(); } return this._oAriaLabelledBy; }; /** * Retrieves the ItemNavigation with lazy loading * * @private * @returns {sap.ui.core.delegate.ItemNavigation} item navigation */ BreadCrumbs.prototype._getItemNavigation = function () { if (!this._ItemNavigation) { this._ItemNavigation = new ItemNavigation(); } return this._ItemNavigation; }; /** * Retrieves the items which should be included in navigation. * * @private * @returns {array} aItemsToNavigate */ BreadCrumbs.prototype._getItemsToNavigate = function () { var aItemsToNavigate = this.getLinks(), oCurrentLocation = this.getCurrentLocation(), bShowCurrentLocation = this.getShowCurrentLocation(); if (bShowCurrentLocation && oCurrentLocation) { aItemsToNavigate.push(oCurrentLocation); } return aItemsToNavigate; }; /** * Configures the Keyboard handling for the control * * @private * @returns {object} this */ BreadCrumbs.prototype._configureKeyboardHandling = function () { var oItemNavigation = this._getItemNavigation(), oHeadDomRef = this._getBreadcrumbsAsJQueryObject()[0], iSelectedDomIndex = -1, aItemsToNavigate = this._getItemsToNavigate(), aNavigationDomRefs = []; aItemsToNavigate.forEach(function (oItem) { oItem.$().attr("tabIndex", "-1"); aNavigationDomRefs.push(oItem.getDomRef()); }); this.addDelegate(oItemNavigation); oItemNavigation.setCycling(false); oItemNavigation.setRootDomRef(oHeadDomRef); oItemNavigation.setItemDomRefs(aNavigationDomRefs); oItemNavigation.setSelectedIndex(iSelectedDomIndex); // fix the tab indexes so the first link to be 0 and read correctly by the screen reader this._getBreadcrumbsAsJQueryObject().attr("tabindex", "-1"); aItemsToNavigate[0].$().attr("tabindex", "0"); return this; }; /** * Handles PAGE UP key. * * @param {jQuery.Event} oEvent event * @private */ BreadCrumbs.prototype.onsappageup = function (oEvent) { this._handlePageKeys(oEvent, false); }; /** * Handles PAGE DOWN key. * * @param {jQuery.Event} oEvent * @private */ BreadCrumbs.prototype.onsappagedown = function (oEvent) { this._handlePageKeys(oEvent, true); }; BreadCrumbs.prototype._handlePageKeys = function (oEvent, bMovingDown) { var iNextIndex, aBreadCrumbs = this._getItemsToNavigate(), iEventTargetIndex = 0, iLastIndex = bMovingDown ? aBreadCrumbs.length - 1 : 0; oEvent.preventDefault(); aBreadCrumbs.some(function (oItem, iIndex) { if (oItem.getId() === oEvent.target.id) { iEventTargetIndex = iIndex; return true; } }); if (bMovingDown) { iNextIndex = iEventTargetIndex + BreadCrumbs.PAGEUP_AND_PAGEDOWN_JUMP_SIZE; } else { iNextIndex = iEventTargetIndex - BreadCrumbs.PAGEUP_AND_PAGEDOWN_JUMP_SIZE; } if (iNextIndex && aBreadCrumbs[iNextIndex]) { aBreadCrumbs[iNextIndex].focus(); } else if (aBreadCrumbs[iLastIndex]) { aBreadCrumbs[iLastIndex].focus(); } }; BreadCrumbs.prototype._getUsingOverflowSelect = function () { return !this._getOverflowSelectAsJQueryObject().hasClass("sapUiHidden"); }; BreadCrumbs.prototype.exit = function () { if (this._ItemNavigation) { this.removeDelegate(this._ItemNavigation); this._ItemNavigation.destroy(); this._ItemNavigation = null; } this._resetControl(); }; return BreadCrumbs; }); }; // end of sap/uxap/BreadCrumbs.js if ( !jQuery.sap.isDeclared('sap.uxap.HierarchicalSelect') ) { /*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2016 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ // Provides control sap.uxap.HierarchicalSelect. jQuery.sap.declare('sap.uxap.HierarchicalSelect'); // unresolved dependency added by SAPUI5 'AllInOne' Builder jQuery.sap.require('jquery.sap.global'); // unlisted dependency retained jQuery.sap.require('sap.m.Select'); // unlisted dependency retained jQuery.sap.require('sap.ui.Device'); // unlisted dependency retained sap.ui.define("sap/uxap/HierarchicalSelect",["jquery.sap.global", "sap/m/Select", "sap/ui/Device", "./library"], function (jQuery, Select, Device, library) { "use strict"; /** * Constructor for a new HierarchicalSelect. * * @param {string} [sId] id for the new control, generated automatically if no id is given * @param {object} [mSettings] initial settings for the new control * * @class * A select that display items on 2 level of hierarchy. * If a provided item has a custom data named "secondLevel", then it will be displayed as a second level, otherwise it would be displayed as a first level. * @extends sap.m.Select * * @author SAP SE * * @constructor * @public * @since 1.26 * @alias sap.uxap.HierarchicalSelect * @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel */ var HierarchicalSelect = Select.extend("sap.uxap.HierarchicalSelect", /** @lends sap.uxap.HierarchicalSelect.prototype */ { metadata: { library: "sap.uxap", properties: { /** * Determines whether the HierarchicalSelect items are displayed in upper case. */ upperCase: {type: "boolean", group: "Appearance", defaultValue: false} } } }); HierarchicalSelect.POPOVER_MIN_WIDTH_REM = 11; HierarchicalSelect.prototype.onAfterRenderingPicker = function () { Select.prototype.onAfterRenderingPicker.call(this); var aItems = this.getItems() || []; aItems.forEach(function (oItem) { var sClass = (oItem.data("secondLevel") === true) ? "sapUxAPHierarchicalSelectSecondLevel" : "sapUxAPHierarchicalSelectFirstLevel"; oItem.$().addClass(sClass); }, this); }; HierarchicalSelect.prototype.setUpperCase = function (bValue, bSuppressInvalidate) { this.setProperty("upperCase", bValue, bSuppressInvalidate); this.toggleStyleClass("sapUxAPHierarchicalSelectUpperCase", bValue); var oPicker = this.getAggregation("picker"); if (oPicker) { oPicker.toggleStyleClass("sapMSltPickerFirstLevelUpperCase", bValue); if (!bSuppressInvalidate) { oPicker.invalidate(); } } return this; }; /** * Keyboard handling requirement to have the same behavior on [ENTER] key * as on [SPACE] key (namely, to toggle the open state the select dropdown) */ HierarchicalSelect.prototype.onsapenter = Select.prototype.onsapspace; /** * Keyboard handling of [UP], [PAGE-UP], [PAGE-DOWN], [HOME], [END] keys * Stops propagation to avoid triggering the listeners for the same keys of the parent control (the AnchorBar) */ ["onsapup", "onsappageup", "onsappagedown", "onsaphome", "onsapend"].forEach(function (sName) { HierarchicalSelect.prototype[sName] = function (oEvent) { Select.prototype[sName].call(this, oEvent); oEvent.stopPropagation(); }; }); HierarchicalSelect.prototype._createDialog = function () { var oDialog = Select.prototype._createDialog.call(this); oDialog.getCustomHeader().addStyleClass("sapUxAPHierarchicalSelect"); return oDialog; }; /** * Decorate a Popover instance by adding some private methods. * * We are overriding function from sap.m.Select * in order to redefine position of popover * * @param {sap.m.Popover} * @private */ HierarchicalSelect.prototype._decoratePopover = function (oPopover) { Select.prototype._decoratePopover.call(this, oPopover); oPopover._adaptPositionParams = function () { this._marginTop = 0; this._marginLeft = 0; this._marginRight = 0; this._marginBottom = 0; this._arrowOffset = 0; this._offsets = ["0 0", "0 0", "0 0", "0 0"]; this._myPositions = ["end bottom", "end center", "end top", "begin center"]; this._atPositions = ["end top", "end center", "end bottom", "begin center"]; }; // offset the popup to make it cover the scrollbar (to avoid having page-scrollbar and popup-scrollbar appearing next to each other) if (Device.system.tablet || Device.system.desktop) { var fRight = jQuery.position.scrollbarWidth(); if (fRight > 0) { oPopover.setOffsetX(fRight); } } }; /** * Overriding function from sap.m.Select to access min-width of the popover * in order to ensure that min-width is not smaller than sap.uxap.HierarchicalSelect.POPOVER_MIN_WIDTH_REM */ HierarchicalSelect.prototype._onAfterRenderingPopover = function () { var oPopover = this.getPicker(), oPopoverDomRef = oPopover.getDomRef("cont"), sMinWidth = oPopoverDomRef.style.minWidth; if (jQuery.sap.endsWith(sMinWidth, "rem")) { sMinWidth = sMinWidth.substring(0, sMinWidth.length - 3); var iMinWidth = parseFloat(sMinWidth); if (iMinWidth < HierarchicalSelect.POPOVER_MIN_WIDTH_REM && oPopoverDomRef) { oPopoverDomRef.style.minWidth = HierarchicalSelect.POPOVER_MIN_WIDTH_REM + "rem"; } } }; return HierarchicalSelect; }); }; // end of sap/uxap/HierarchicalSelect.js if ( !jQuery.sap.isDeclared('sap.uxap.ModelMapping') ) { /*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2016 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ // Provides control sap.uxap.ModelMapping. jQuery.sap.declare('sap.uxap.ModelMapping'); // unresolved dependency added by SAPUI5 'AllInOne' Builder jQuery.sap.require('sap.ui.core.Element'); // unlisted dependency retained sap.ui.define("sap/uxap/ModelMapping",["sap/ui/core/Element", "./library"], function (Element, library) { "use strict"; /** * Constructor for a new ModelMapping. * * @param {string} [sId] ID for the new control, generated automatically if no ID is given * @param {object} [mSettings] Initial settings for the new control * * @class * * Define the entity that will be passed to the ObjectPageLayout. * @extends sap.ui.core.Element * * @author SAP SE * * @constructor * @public * @alias sap.uxap.ModelMapping * @since 1.26 * @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel */ var ModelMapping = Element.extend("sap.uxap.ModelMapping", /** @lends sap.uxap.ModelMapping.prototype */ { metadata: { library: "sap.uxap", properties: { /** * Determines the the external model name. */ externalModelName: {type: "string", group: "Misc", defaultValue: null}, /** * Determines the the internal model name. */ internalModelName: {type: "string", group: "Misc", defaultValue: "Model"}, /** * Determines the the external path. */ externalPath: {type: "string", group: "Misc", defaultValue: null} } } }); return ModelMapping; }); }; // end of sap/uxap/ModelMapping.js if ( !jQuery.sap.isDeclared('sap.uxap.ObjectPageHeaderActionButton') ) { /*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2016 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ // Provides control sap.uxap.ObjectPageHeaderActionButton. jQuery.sap.declare('sap.uxap.ObjectPageHeaderActionButton'); // unresolved dependency added by SAPUI5 'AllInOne' Builder jQuery.sap.require('sap.m.Button'); // unlisted dependency retained sap.ui.define("sap/uxap/ObjectPageHeaderActionButton",["sap/m/Button", "./library"], function (Button, library) { "use strict"; /** * Constructor for a new ObjectPageHeaderActionButton. * * @param {string} [sId] id for the new control, generated automatically if no id is given * @param {object} [mSettings] initial settings for the new control * * @class * * Button that can be used in the ObjectPageHeader action aggregation. * @extends sap.m.Button * * @author SAP SE * * @constructor * @public * @since 1.26 * @alias sap.uxap.ObjectPageHeaderActionButton * @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel */ var ObjectPageHeaderActionButton = Button.extend("sap.uxap.ObjectPageHeaderActionButton", /** @lends sap.uxap.ObjectPageHeaderActionButton.prototype */ { metadata: { library: "sap.uxap", properties: { /** * Hide the button text when rendered into the headerTitle part of the ObjectPageLayout. * This is useful if you want to display icons only in the headerTitle part but still want to display text + icon in the actionSheet that appears when not enough space is available on the screen for displaying all actions. */ hideText: {type: "boolean", defaultValue: true}, /** * Hide the button icon when rendered into the headerTitle part of the ObjectPageLayout. * This is useful if you want to display texts only in the headerTitle part but still want to display text + icon in the actionSheet that appears when not enough space is available on the screen for displaying all actions. */ hideIcon: {type: "boolean", defaultValue: false}, /** * Determines the order in which the button overflows. * @since 1.34.0 */ importance: { type: "sap.uxap.Importance", group: "Behavior", defaultValue: library.Importance.High } } } }); ObjectPageHeaderActionButton.prototype.applySettings = function (mSettings, oScope) { if (Button.prototype.applySettings) { Button.prototype.applySettings.call(this, mSettings, oScope); } this.toggleStyleClass("sapUxAPObjectPageHeaderActionButtonHideText", this.getHideText()); this.toggleStyleClass("sapUxAPObjectPageHeaderActionButtonHideIcon", this.getHideIcon()); }; ObjectPageHeaderActionButton.prototype.setHideText = function (bValue, bInvalidate) { this.toggleStyleClass("sapUxAPObjectPageHeaderActionButtonHideText", bValue); return this.setProperty("hideText", bValue, bInvalidate); }; ObjectPageHeaderActionButton.prototype.setHideIcon = function (bValue, bInvalidate) { this.toggleStyleClass("sapUxAPObjectPageHeaderActionButtonHideIcon", bValue); return this.setProperty("hideIcon", bValue, bInvalidate); }; return ObjectPageHeaderActionButton; }); }; // end of sap/uxap/ObjectPageHeaderActionButton.js if ( !jQuery.sap.isDeclared('sap.uxap.ObjectPageHeaderContent') ) { /*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2016 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ // Provides control sap.uxap.ObjectPageHeaderContent. jQuery.sap.declare('sap.uxap.ObjectPageHeaderContent'); // unresolved dependency added by SAPUI5 'AllInOne' Builder jQuery.sap.require('sap.ui.core.Control'); // unlisted dependency retained jQuery.sap.require('sap.m.Button'); // unlisted dependency retained sap.ui.define("sap/uxap/ObjectPageHeaderContent",["sap/ui/core/Control", "./library", "sap/m/Button"], function (Control, library, Button) { "use strict"; /** * Constructor for a new ObjectPageHeaderContent. * * @param {string} [sId] id for the new control, generated automatically if no id is given * @param {object} [mSettings] initial settings for the new control * * @class * ObjectPageHeaderContent represents the dynamic part of an Object page header. May contain any control. * Unlike the Object page header title, the Object page header content is part of the scrolling area of the Object page. * This enables it to hold any amount of information and still be usable on a mobile device. * @extends sap.ui.core.Control * * @author SAP SE * * @constructor * @public * @since 1.30 * @alias sap.uxap.ObjectPageHeaderContent * @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel */ var ObjectPageHeaderContent = Control.extend("sap.uxap.ObjectPageHeaderContent", /** @lends sap.uxap.ObjectPageHeaderContent.prototype */ { metadata: { library: "sap.uxap", properties: { /** * Determines the design of the header - Light or Dark */ contentDesign: { type: "sap.uxap.ObjectPageHeaderDesign", group: "Misc", defaultValue: sap.uxap.ObjectPageHeaderDesign.Light } }, aggregations: { /** * The list of Objects of type sap.ui.core.Control. */ content: {type: "sap.ui.core.Control", multiple: true, singularName: "content"}, /** * * Internal aggregation for the "Edit Header" button. */ _editHeaderButton: {type: "sap.m.Button", multiple: false, visibility: "hidden"} } } }); ObjectPageHeaderContent.prototype.onBeforeRendering = function () { var oParent = this.getParent(); if (oParent && (oParent instanceof library.ObjectPageLayout) && oParent.getShowEditHeaderButton()) { this._getInternalBtnAggregation("_editHeaderButton", "EDIT_HEADER", "-editHeaderBtn", "Transparent").attachPress(this._handleEditHeaderButtonPress, this); } }; ObjectPageHeaderContent.prototype._handleEditHeaderButtonPress = function (oEvent) { this.getParent().fireEditHeaderButtonPress(); }; ObjectPageHeaderContent.prototype._getInternalBtnAggregation = function (sAggregationName, sBtnText, sBtnIdText, sBtnType) { if (!this.getAggregation(sAggregationName)) { var oBtn = new Button({ text: library.i18nModel.getResourceBundle().getText(sBtnText), type: sBtnType, id: this.getId() + sBtnIdText }); this.setAggregation(sAggregationName, oBtn); } return this.getAggregation(sAggregationName); }; /** * The layout data to apply to a header cluster * called from the renderer * @private */ ObjectPageHeaderContent.prototype._getLayoutDataForControl = function (oControl) { var oLayoutData = oControl.getLayoutData(); if (!oLayoutData) { return; } else if (oLayoutData instanceof library.ObjectPageHeaderLayoutData) { return oLayoutData; } else if (oLayoutData.getMetadata().getName() == "sap.ui.core.VariantLayoutData") { // multiple LayoutData available - search here var aLayoutData = oLayoutData.getMultipleLayoutData(); for (var i = 0; i < aLayoutData.length; i++) { var oLayoutData2 = aLayoutData[i]; if (oLayoutData2 instanceof library.ObjectPageHeaderLayoutData) { return oLayoutData2; } } } }; return ObjectPageHeaderContent; }); }; // end of sap/uxap/ObjectPageHeaderContent.js if ( !jQuery.sap.isDeclared('sap.uxap.ObjectPageHeaderLayoutData') ) { /*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2016 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ // Provides control sap.uxap.ObjectPageHeaderLayoutData. jQuery.sap.declare('sap.uxap.ObjectPageHeaderLayoutData'); // unresolved dependency added by SAPUI5 'AllInOne' Builder jQuery.sap.require('sap.ui.core.LayoutData'); // unlisted dependency retained sap.ui.define("sap/uxap/ObjectPageHeaderLayoutData",["sap/ui/core/LayoutData", "./library"], function (LayoutData, library) { "use strict"; /** * Constructor for a new ObjectPageHeaderLayoutData. * * @param {string} [sId] id for the new control, generated automatically if no id is given * @param {object} [mSettings] initial settings for the new control * * @class * This is a LayoutData Element that can be added to a control if this control is used within an ObjectPage headerContent aggregation * @extends sap.ui.core.LayoutData * * @author SAP SE * * @constructor * @public * @since 1.26 * @alias sap.uxap.ObjectPageHeaderLayoutData * @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel */ var ObjectPageHeaderLayoutData = LayoutData.extend("sap.uxap.ObjectPageHeaderLayoutData", /** @lends sap.uxap.ObjectPageHeaderLayoutData.prototype */ { metadata: { library: "sap.uxap", properties: { /** * If this property is set the control will be visible (or not) in a small sized layout. */ visibleS: {type: "boolean", group: "Misc", defaultValue: true}, /** * If this property is set the control will be visible (or not) in a medium sized layout. */ visibleM: {type: "boolean", group: "Misc", defaultValue: true}, /** * If this property is set the control will be visible (or not) in a large sized layout. */ visibleL: {type: "boolean", group: "Misc", defaultValue: true}, /** * If this property is set the control will display a separator before it. */ showSeparatorBefore: {type: "boolean", group: "Misc", defaultValue: false}, /** * If this property is set the control will display a separator after it. */ showSeparatorAfter: {type: "boolean", group: "Misc", defaultValue: false}, /** * If this property is set the control will take the provided size. */ width: {type: "sap.ui.core.CSSSize", group: "Misc", defaultValue: 'auto'} } } }); /*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2016 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ return ObjectPageHeaderLayoutData; }); }; // end of sap/uxap/ObjectPageHeaderLayoutData.js if ( !jQuery.sap.isDeclared('sap.uxap.ObjectPageSectionBase') ) { /*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2016 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ // Provides control sap.uxap.ObjectPageSectionBase. jQuery.sap.declare('sap.uxap.ObjectPageSectionBase'); // unresolved dependency added by SAPUI5 'AllInOne' Builder jQuery.sap.require('jquery.sap.global'); // unlisted dependency retained jQuery.sap.require('sap.ui.core.Control'); // unlisted dependency retained sap.ui.define("sap/uxap/ObjectPageSectionBase",["jquery.sap.global", "sap/ui/core/Control", "./library"], function (jQuery, Control, library) { "use strict"; /** * Constructor for a new ObjectPageSectionBase. * * @param {string} [sId] id for the new control, generated automatically if no id is given * @param {object} [mSettings] initial settings for the new control * * @class * An abstract container for object page sections and subSections * @extends sap.ui.core.Control * * @constructor * @public * @alias sap.uxap.ObjectPageSectionBase * @since 1.26 * @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel */ var ObjectPageSectionBase = Control.extend("sap.uxap.ObjectPageSectionBase", /** @lends sap.uxap.ObjectPageSectionBase.prototype */ { metadata: { "abstract": true, library: "sap.uxap", properties: { /** * Section Title */ title: {type: "string", group: "Appearance", defaultValue: null}, /** * Invisible ObjectPageSectionBase are not rendered */ visible: {type: "boolean", group: "Appearance", defaultValue: true}, /** * Determines whether the section will be hidden on low resolutions. * @since 1.32.0 */ importance: { type: "sap.uxap.Importance", group: "Behavior", defaultValue: library.Importance.High } }, aggregations: { /** * The custom button that will provide a link to the section in the ObjectPageLayout anchor bar. * This button will be used as a custom template to be into the ObjectPageLayout anchorBar area, therefore property changes happening on this button template after the first rendering won't affect the actual button copy used in the anchorBar. * * If you want to change some of the button properties, you would need to bind them to a model. */ customAnchorBarButton: {type: "sap.m.Button", multiple: false} } } }); /** * Explicitly ask to connect to the UI5 model tree * * @name sap.uxap.ObjectPageSectionBase#connectToModels * @function * @type void * @public * @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel */ ObjectPageSectionBase.prototype.init = function () { //handled for ux rules management this._bInternalVisible = true; this._bInternalTitleVisible = true; this._sInternalTitle = ""; //hidden status this._isHidden = false; this._oParentObjectPageLayout = undefined; //store the parent objectPageLayout }; ObjectPageSectionBase.prototype.onAfterRendering = function () { if (this._getObjectPageLayout()) { this._getObjectPageLayout()._adjustLayout(); this._getObjectPageLayout()._setSectionsFocusValues(); } }; /** * set the internal visibility of the sectionBase. This is set by the ux rules (for example don't display a section that has no subSections) * @param bValue * @param bInvalidate if set to true, the sectionBase should be rerendered in order to be added or removed to the dom (similar to what a "real" internalVisibility property would trigger * @private */ ObjectPageSectionBase.prototype._setInternalVisible = function (bValue, bInvalidate) { if (bValue != this._bInternalVisible) { this._bInternalVisible = bValue; if (bInvalidate) { this.invalidate(); } } }; ObjectPageSectionBase.prototype._getInternalVisible = function () { return this._bInternalVisible; }; /** * set the internal visibility of the sectionBase title. This is set by the ux rules (for example don't display a subSection title if there are only 1 in the section) * @param bValue * @param bInvalidate if set to true, the sectionBase should be rerendered in order to be added or removed to the dom (similar to what a "real" internalVisibility property would trigger * @private */ ObjectPageSectionBase.prototype._setInternalTitleVisible = function (bValue, bInvalidate) { if (bValue != this._bInternalTitleVisible) { this._bInternalTitleVisible = bValue; if (bInvalidate) { this.invalidate(); } } }; ObjectPageSectionBase.prototype._getInternalTitleVisible = function () { return this._bInternalTitleVisible; }; /** * set the internal title of the sectionBase. This is set by the ux rules (for example the subSection title becomes the section title if there are only 1 subSection in the section) * @param sValue * @param bInvalidate if set to true, the sectionBase should be rerendered in order to be added or removed to the dom (similar to what a "real" internalVisibility property would trigger * @private */ ObjectPageSectionBase.prototype._setInternalTitle = function (sValue, bInvalidate) { if (sValue != this._sInternalTitle) { this._sInternalTitle = sValue; if (bInvalidate) { this.invalidate(); } } }; ObjectPageSectionBase.prototype._getInternalTitle = function () { return this._sInternalTitle; }; /** * getter for the parent object page layout * @returns {*} * @private */ ObjectPageSectionBase.prototype._getObjectPageLayout = function () { if (!this._oParentObjectPageLayout) { this._oParentObjectPageLayout = library.Utilities.getClosestOPL(this); } return this._oParentObjectPageLayout; }; /** * Notify the parent objectPageLayout of structural changes after the first rendering * @private */ ObjectPageSectionBase.prototype._notifyObjectPageLayout = function () { if (this.$().length && this._getObjectPageLayout()) { this._getObjectPageLayout()._adjustLayoutAndUxRules(); } }; // Generate proxies for aggregation mutators ["addAggregation", "insertAggregation", "removeAllAggregation", "removeAggregation", "destroyAggregation"].forEach(function (sMethod) { ObjectPageSectionBase.prototype[sMethod] = function () { var vResult = Control.prototype[sMethod].apply(this, arguments); this._notifyObjectPageLayout(); return vResult; }; }); ObjectPageSectionBase.prototype.setVisible = function (bValue, bSuppressInvalidate) { if (!this._getObjectPageLayout()) { return this.setProperty("visible", bValue, bSuppressInvalidate); } this.setProperty("visible", bValue, true); /* handle invalidation ourselves in adjustLayoutAndUxRules */ this._getObjectPageLayout()._adjustLayoutAndUxRules(); this.invalidate(); return this; }; ObjectPageSectionBase.prototype.setTitle = function (sValue, bSuppressInvalidate) { this.setProperty("title", sValue, bSuppressInvalidate); this._notifyObjectPageLayout(); return this; }; ObjectPageSectionBase.prototype._shouldBeHidden = function () { return ObjectPageSectionBase._importanceMap[this.getImportance()] > ObjectPageSectionBase._importanceMap[this._sCurrentLowestImportanceLevelToShow]; }; ObjectPageSectionBase._importanceMap = { "Low": 3, "Medium": 2, "High": 1 }; ObjectPageSectionBase.prototype._updateShowHideState = function (bHide) { var oObjectPage = this._getObjectPageLayout(); this._isHidden = bHide; this.$().children(this._sContainerSelector).toggle(!bHide); if (oObjectPage) { oObjectPage._adjustLayout(); } return this; }; ObjectPageSectionBase.prototype._getIsHidden = function () { return this._isHidden; }; ObjectPageSectionBase.prototype._expandSection = function () { return this._updateShowHideState(false); }; ObjectPageSectionBase.prototype._showHideContent = function () { return this._updateShowHideState(!this._getIsHidden()); }; /** * Called to set the visibility of the section / subsection * @params oSection, sCurrentLowestImportanceLevelToShow * * @private */ ObjectPageSectionBase.prototype._applyImportanceRules = function (sCurrentLowestImportanceLevelToShow) { this._sCurrentLowestImportanceLevelToShow = sCurrentLowestImportanceLevelToShow; if (this.getDomRef()) { this._updateShowHideState(this._shouldBeHidden()); } else { this._isHidden = this._shouldBeHidden(); } }; /******************************************************************************* * Keyboard navigation ******************************************************************************/ ObjectPageSectionBase.PAGEUP_AND_PAGEDOWN_JUMP_SIZE = 5; /** * Handler for key down - handle * @param oEvent - The event object */ ObjectPageSectionBase.prototype.onkeydown = function (oEvent) { // Filter F7 key down if (oEvent.keyCode === jQuery.sap.KeyCodes.F7) { var aSubSections = this.getSubSections(), oFirstSubSection = aSubSections[0], oLastFocusedEl; if (aSubSections.length === 1) { oLastFocusedEl = oFirstSubSection._oLastFocusedControlF7; if (oLastFocusedEl) { oLastFocusedEl.$().focus(); } else { oFirstSubSection.$().firstFocusableDomRef().focus(); } } else { if (oFirstSubSection.getActions().length) { oFirstSubSection.getActions()[0].$().focus(); } } } }; /** * Handler for arrow down * @param oEvent - The event object */ ObjectPageSectionBase.prototype.onsapdown = function (oEvent) { this._handleFocusing(oEvent, oEvent.currentTarget.nextSibling); }; ObjectPageSectionBase.prototype._handleFocusing = function (oEvent, oElementToReceiveFocus) { if (this._targetIsCorrect(oEvent) && oElementToReceiveFocus) { oEvent.preventDefault(); oElementToReceiveFocus.focus(); this._scrollParent(jQuery(oElementToReceiveFocus).attr("id")); } }; ObjectPageSectionBase.prototype._targetIsCorrect = function (oEvent) { return oEvent.srcControl === this; }; /** * Handler for arrow right */ ObjectPageSectionBase.prototype.onsapright = ObjectPageSectionBase.prototype.onsapdown; /** * Handler for arrow up * @param oEvent - The event object */ ObjectPageSectionBase.prototype.onsapup = function (oEvent) { this._handleFocusing(oEvent, oEvent.currentTarget.previousSibling); }; /** * Handler for arrow left */ ObjectPageSectionBase.prototype.onsapleft = ObjectPageSectionBase.prototype.onsapup; /** * Handler for HOME key * @param oEvent - The event object */ ObjectPageSectionBase.prototype.onsaphome = function (oEvent) { this._handleFocusing(oEvent, oEvent.currentTarget.parentElement.firstChild); }; /** * Handler for END key * @param oEvent - The event object */ ObjectPageSectionBase.prototype.onsapend = function (oEvent) { this._handleFocusing(oEvent, oEvent.currentTarget.parentElement.lastChild); }; /** * Handler for PAGE UP event. * * @param {jQuery.Event} oEvent * @private */ ObjectPageSectionBase.prototype.onsappageup = function (oEvent) { if (!this._targetIsCorrect(oEvent)) { return; } oEvent.preventDefault(); var iNextIndex; var aSections = jQuery(oEvent.currentTarget).parent().children(); var focusedSectionId; aSections.each(function (iSectionIndex, oSection) { if (jQuery(oSection).attr("id") === oEvent.currentTarget.id) { iNextIndex = iSectionIndex - (ObjectPageSectionBase.PAGEUP_AND_PAGEDOWN_JUMP_SIZE + 1); return; } }); if (iNextIndex && aSections[iNextIndex]) { aSections[iNextIndex].focus(); focusedSectionId = jQuery(aSections[iNextIndex]).attr("id"); } else if (aSections[0]) { aSections[0].focus(); focusedSectionId = jQuery(aSections[0]).attr("id"); } this._scrollParent(focusedSectionId); }; /** * Handler for PAGE DOWN event. * * @param {jQuery.Event} oEvent * @private */ ObjectPageSectionBase.prototype.onsappagedown = function (oEvent) { if (!this._targetIsCorrect(oEvent)) { return; } oEvent.preventDefault(); var iNextIndex; var aSections = jQuery(oEvent.currentTarget).parent().children(); var focusedSectionId; aSections.each(function (iSectionIndex, oSection) { if (jQuery(oSection).attr("id") === oEvent.currentTarget.id) { iNextIndex = iSectionIndex + ObjectPageSectionBase.PAGEUP_AND_PAGEDOWN_JUMP_SIZE + 1; return; } }); if (iNextIndex && aSections[iNextIndex]) { aSections[iNextIndex].focus(); focusedSectionId = jQuery(aSections[iNextIndex]).attr("id"); } else if (aSections[aSections.length - 1]) { aSections[aSections.length - 1].focus(); focusedSectionId = jQuery(aSections[aSections.length - 1]).attr("id"); } this._scrollParent(focusedSectionId); }; /** * Tells the ObjectPageLayout instance to scroll itself to a given section (by Id) * @param sId * @private */ ObjectPageSectionBase.prototype._scrollParent = function (sId) { if (this._getObjectPageLayout()) { this._getObjectPageLayout().scrollToSection(sId, 0, 10); } }; return ObjectPageSectionBase; }); }; // end of sap/uxap/ObjectPageSectionBase.js if ( !jQuery.sap.isDeclared('sap.uxap.AnchorBar') ) { /*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2016 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ // Provides control sap.uxap.AnchorBar. jQuery.sap.declare('sap.uxap.AnchorBar'); // unresolved dependency added by SAPUI5 'AllInOne' Builder jQuery.sap.require('sap.m.Button'); // unlisted dependency retained jQuery.sap.require('sap.m.PlacementType'); // unlisted dependency retained jQuery.sap.require('sap.m.Popover'); // unlisted dependency retained jQuery.sap.require('sap.m.Toolbar'); // unlisted dependency retained jQuery.sap.require('sap.ui.core.IconPool'); // unlisted dependency retained jQuery.sap.require('sap.ui.core.Item'); // unlisted dependency retained jQuery.sap.require('sap.ui.core.ResizeHandler'); // unlisted dependency retained jQuery.sap.require('sap.ui.core.delegate.ScrollEnablement'); // unlisted dependency retained jQuery.sap.require('sap.ui.layout.HorizontalLayout'); // unlisted dependency retained jQuery.sap.require('sap.ui.Device'); // unlisted dependency retained jQuery.sap.require('sap.ui.core.CustomData'); // unlisted dependency retained sap.ui.define("sap/uxap/AnchorBar",[ "sap/m/Button", "sap/m/PlacementType", "sap/m/Popover", "sap/m/Toolbar", "sap/ui/core/IconPool", "sap/ui/core/Item", "sap/ui/core/ResizeHandler", "sap/ui/core/delegate/ScrollEnablement", "sap/ui/layout/HorizontalLayout", "sap/ui/Device", "sap/ui/core/CustomData", "./HierarchicalSelect", "./library" ], function (Button, PlacementType, Popover, Toolbar, IconPool, Item, ResizeHandler, ScrollEnablement, HorizontalLayout, Device, CustomData, HierarchicalSelect, library) { "use strict"; /** * Constructor for a new AnchorBar. * * @param {string} [sId] id for the new control, generated automatically if no id is given * @param {object} [mSettings] initial settings for the new control * * @class * Anchor bar is the navigation bar of an Object page. Its purpose is to provide links to all Sections and Subsections. Takes the form of a Select on phone. * @extends sap.m.Toolbar * * @author SAP SE * * @constructor * @public * @since 1.26 * @alias sap.uxap.AnchorBar * @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel */ var AnchorBar = Toolbar.extend("sap.uxap.AnchorBar", /** @lends sap.uxap.AnchorBar.prototype */ { metadata: { library: "sap.uxap", properties: { /** * Determines whether to show a Popover with Subsection links when clicking on Section links in the Anchor bar. */ showPopover: {type: "boolean", defaultValue: true}, /** * Determines whether the Anchor bar items are displayed in upper case. */ upperCase: {type: "boolean", defaultValue: false} }, associations: { /** * The button that represents the Section being scrolled by the user. */ selectedButton: {type: "sap.m.Button", multiple: false} }, aggregations: { _select: {type: "sap.uxap.HierarchicalSelect", multiple: false, visibility: "hidden"}, _popovers: {type: "sap.m.Popover", multiple: true, visibility: "hidden"}, _scrollArrowLeft: {type: "sap.ui.core.Control", multiple: false, visibility: "hidden"}, _scrollArrowRight: {type: "sap.ui.core.Control", multiple: false, visibility: "hidden"} } } }); AnchorBar.prototype.init = function () { if (Toolbar.prototype.init) { Toolbar.prototype.init.call(this); } this.addStyleClass("sapUxAPAnchorBar"); this._oPressHandlers = {}; //keep references on the press handlers we set on first level items (in case of behavior change) this._oSectionInfo = {}; //keep scrolling info on sections this._oScroller = null; //are we on a rtl scenario? //IE handles rtl in a transparent way (positions positives, scroll starts at the end) //while firefox, safari and chrome have a special management (scroll at the beginning and negative positioning) //therefore we will apply some specific actions only if are in rtl and not in IE. this._bRtlScenario = sap.ui.getCore().getConfiguration().getRTL() && !Device.browser.msie; //there are 2 different uses cases: //case 1: on a real phone we don't need the scrolling anchorBar, just the hierarchicalSelect //case 2: on a a real ipad or a desktop we need both as the size may change this._bHasButtonsBar = Device.system.tablet || Device.system.desktop; this._oSelect = this._getHierarchicalSelect(); //case 2 requires the scrolling anchorBar if (this._bHasButtonsBar) { //horizontal scrolling this._oScroller = new ScrollEnablement(this, this.getId() + "-scroll", { horizontal: true, vertical: false, nonTouchScrolling: true }); this._iREMSize = parseInt(jQuery("body").css("font-size"), 10); this._iTolerance = this._iREMSize * 1; // 1 rem this._iOffset = this._iREMSize * 3; // 3 rem //listen to resize this._sResizeListenerId = undefined; //defined in onAfterRendering } //composite controls this.setDesign("Transparent"); //styling is coming from css }; /******************************************************************************* * UX design ******************************************************************************/ AnchorBar.SCROLL_STEP = 250;// how many pixels to scroll with every overflow arrow click AnchorBar.SCROLL_DURATION = 500; // ms AnchorBar.DOM_CALC_DELAY = 200; // ms AnchorBar.prototype.setSelectedButton = function (oButton) { if (typeof oButton === "string") { oButton = sap.ui.getCore().byId(oButton); } if (oButton) { if (oButton.getId() === this.getSelectedButton()) { return; } var oSelectedSectionId = oButton.data("sectionId"); if (oSelectedSectionId) { this._oSelect.setSelectedKey(oButton.getId()); } if (this._bHasButtonsBar) { //remove selection class from the currently selected item this.$().find(".sapUxAPAnchorBarButtonSelected").removeClass("sapUxAPAnchorBarButtonSelected"); oButton.$().addClass("sapUxAPAnchorBarButtonSelected"); if (oSelectedSectionId) { this.scrollToSection(oSelectedSectionId, AnchorBar.SCROLL_DURATION); } this._setAnchorButtonsTabFocusValues(oButton); } } return this.setAssociation("selectedButton", oButton, true /* don't rerender */); }; /******************************************************************************* * Responsive behavior ******************************************************************************/ AnchorBar.prototype.setShowPopover = function (bValue, bSuppressInvalidate) { if (this.getShowPopover() === bValue) { return this; } var sSelectedButton, bNeedInvalidate = !jQuery.isEmptyObject(this._oPressHandlers); //changing the behavior after the firstRendering is removing all press handlers on first level items if (bNeedInvalidate) { var aContent = this.getContent() || []; sSelectedButton = this.getSelectedButton(); aContent.forEach(this._detachPopoverHandler, this); } this.setProperty("showPopover", bValue, true /* always trigger re-rendering manually */); if (bNeedInvalidate) { this.rerender(); if (sSelectedButton) { this.setSelectedButton(sSelectedButton); } } return this; }; AnchorBar.prototype.getSelectedSection = function () { var oSelectedButton = this.getSelectedButton(); if (oSelectedButton && (typeof (oSelectedButton) === "string" )) { oSelectedButton = sap.ui.getCore().byId(oSelectedButton); } if (oSelectedButton && (oSelectedButton instanceof Button) && oSelectedButton.data("sectionId")) { return sap.ui.getCore().byId(oSelectedButton.data("sectionId")); } return null; }; /** * create phone equivalents for each of the provided content controls */ AnchorBar.prototype.onBeforeRendering = function () { if (Toolbar.prototype.onBeforeRendering) { Toolbar.prototype.onBeforeRendering.call(this); } var aContent = this.getContent() || [], bUpperCase = this.getUpperCase(), oPopoverState = { oLastFirstLevelButton: null, oCurrentPopover: null }; //rebuild select items this._oSelect.removeAllItems(); this._oSelect.setUpperCase(bUpperCase); this.toggleStyleClass("sapUxAPAnchorBarUpperCase", bUpperCase); //create responsive equivalents of the provided controls aContent.forEach(function (oButton) { this._createSelectItem(oButton); //desktop scenario logic: builds the scrolling anchorBar if (this._bHasButtonsBar) { this._createPopoverSubMenu(oButton, oPopoverState); } }, this); }; AnchorBar.prototype.addContent = function (oButton, bInvalidate) { oButton.addStyleClass("sapUxAPAnchorBarButton"); oButton.removeAllAriaDescribedBy(); if (this._bHasButtonsBar && (oButton.data("secondLevel") === true || oButton.data("secondLevel") === "true")) { //attach handler on the scrolling mechanism oButton.attachPress(this._handleDirectScroll, this); } return this.addAggregation("content", oButton, bInvalidate); }; AnchorBar.prototype._createSelectItem = function (oButton) { var bIsSecondLevel = oButton.data("secondLevel") === true || oButton.data("secondLevel") === "true"; //create the phone equivalent item if the button has some visible text (UX rule) if (oButton.getText().trim() != "" && (!bIsSecondLevel || oButton.data("bTitleVisible") === true)) { var oPhoneItem = new Item({ key: oButton.getId(), text: oButton.getText(), customData: [ new CustomData({ key: "secondLevel", value: oButton.data("secondLevel") }) ] }); this._oSelect.addItem(oPhoneItem); } }; AnchorBar.prototype._createPopoverSubMenu = function (oButton, oPopoverState) { var bIsSecondLevel = oButton.data("secondLevel") === true || oButton.data("secondLevel") === "true", fnPressHandler = null; //handles the tablet/desktop hierarchical behavior //a second level is injected into the latest first level //at this point we know that there are children to the last firstLevel therefore we can create the popover if (bIsSecondLevel) { if (oPopoverState.oLastFirstLevelButton && oPopoverState.oCurrentPopover) { //don't attach the parent press handler for each child if (!this._oPressHandlers[oPopoverState.oLastFirstLevelButton.getId()]) { fnPressHandler = jQuery.proxy(this._handlePopover, /* closure with oLastFirstLevelButton and oCurrentPopover as context */ { oCurrentPopover: oPopoverState.oCurrentPopover, oLastFirstLevelButton: oPopoverState.oLastFirstLevelButton } ); oPopoverState.oLastFirstLevelButton.attachPress(fnPressHandler); this._oPressHandlers[oPopoverState.oLastFirstLevelButton.getId()] = fnPressHandler; } oPopoverState.oCurrentPopover.addContent(oButton); } else if (this.getShowPopover()) { jQuery.sap.log.error("sapUxApAnchorBar :: missing parent first level for item " + oButton.getText()); } else { this.removeContent(oButton); } } else { oPopoverState.oLastFirstLevelButton = oButton; //default behavior: the first level show a popover containing second levels if (this.getShowPopover()) { oPopoverState.oCurrentPopover = new Popover({ placement: PlacementType.Bottom, showHeader: false, verticalScrolling: true, horizontalScrolling: false, contentWidth: "auto", showArrow: false }); oPopoverState.oCurrentPopover.addStyleClass("sapUxAPAnchorBarPopover"); this._addKeyboardHandling(oPopoverState.oCurrentPopover); this.addAggregation('_popovers', oPopoverState.oCurrentPopover); //alternative behavior: the first level triggers direct navigation } else if (!this._oPressHandlers[oPopoverState.oLastFirstLevelButton.getId()]) { fnPressHandler = jQuery.proxy(this._handleDirectScroll, this); oPopoverState.oLastFirstLevelButton.attachPress(fnPressHandler); this._oPressHandlers[oPopoverState.oLastFirstLevelButton.getId()] = fnPressHandler; } } }; AnchorBar.prototype._addKeyboardHandling = function (oCurrentPopover) { oCurrentPopover.onsapdown = function (oEvent) { if (oEvent.target.nextSibling) { oEvent.target.nextSibling.focus(); } }; oCurrentPopover.onsapright = function (oEvent) { oCurrentPopover.onsapdown(oEvent); }; oCurrentPopover.onsapup = function (oEvent) { if (oEvent.target.previousSibling) { oEvent.target.previousSibling.focus(); } }; oCurrentPopover.onsapleft = function (oEvent) { oCurrentPopover.onsapup(oEvent); }; oCurrentPopover.onsaphome = function (oEvent) { if (oEvent.target.parentElement.firstChild) { oEvent.target.parentElement.firstChild.focus(); } }; oCurrentPopover.onsapend = function (oEvent) { if (oEvent.target.parentElement.lastChild) { oEvent.target.parentElement.lastChild.focus(); } }; oCurrentPopover.onsappageup = this._handlePageUp.bind(oCurrentPopover); oCurrentPopover.onsappagedown = this._handlePageDown.bind(oCurrentPopover); }; AnchorBar.prototype._detachPopoverHandler = function (oButton) { if (this._oPressHandlers[oButton.getId()]) { oButton.detachPress(this._oPressHandlers[oButton.getId()]); this._oPressHandlers[oButton.getId()] = null; } }; AnchorBar.prototype._handlePopover = function (oEvent) { var aPopoverButtons = this.oCurrentPopover.getContent() || []; //open the popover only if we are in Tablet/Desktop scenario = the button is visible in the anchorBar if (this.oLastFirstLevelButton.$().is(":visible")) { //specific use case management: if there are only 1 button in the popover, then we don't display it and navigate directly (= the subsection is "promoted" it to a section level) //this is a specific behavior asked by UX as of Sep 25, 2014 if (aPopoverButtons.length == 1) { aPopoverButtons[0].firePress({}); } else { this.oCurrentPopover.openBy(this.oLastFirstLevelButton); } } }; AnchorBar.prototype._handleDirectScroll = function (oEvent) { if (oEvent.getSource().getParent() instanceof Popover) { oEvent.getSource().getParent().close(); } this._requestScrollToSection(oEvent.getSource().data("sectionId")); }; AnchorBar.prototype._requestScrollToSection = function (sRequestedSectionId) { var oRequestedSection = sap.ui.getCore().byId(sRequestedSectionId), oRequestedSectionParent = oRequestedSection.getParent(); if (this.getParent() instanceof library.ObjectPageLayout) { // determine the next section that will appear selected in the anchorBar after the scroll var sNextSelectedSection = sRequestedSectionId; // if the requestedSection is a subsection, the the nextSelectedSection will be its parent (since anchorBar contains only first-level sections) if (oRequestedSection instanceof library.ObjectPageSubSection && oRequestedSectionParent instanceof library.ObjectPageSection) { sNextSelectedSection = oRequestedSectionParent.getId(); } // we set *direct* scrolling by which we instruct the page to *skip* processing of intermediate sections (sections between current and requested) this.getParent().setDirectScrollingToSection(sNextSelectedSection); // finally request the page to scroll to the requested section this.getParent().scrollToSection(oRequestedSection.getId()); } if (oRequestedSection instanceof library.ObjectPageSubSection && oRequestedSectionParent instanceof library.ObjectPageSection) { oRequestedSectionParent.setAssociation("selectedSubSection", oRequestedSection, true); } }; /** * called on phone display only when a user selects a section to navigate to * simulate the press on the corresponding button * @param {*} oEvent event * @private */ AnchorBar.prototype._onSelectChange = function (oEvent) { var oSelectedItem = oEvent.getParameter("selectedItem"), oOriginalControl; oOriginalControl = sap.ui.getCore().byId(oSelectedItem.getKey()); if (oOriginalControl) { this._requestScrollToSection(oOriginalControl.data("sectionId")); } else { jQuery.sap.log.error("AnchorBar :: cannot find corresponding button", oSelectedItem.getKey()); } }; AnchorBar.prototype._getHierarchicalSelect = function () { if (!this.getAggregation('_select')) { this.setAggregation('_select', new HierarchicalSelect({ width: "100%", icon: "sap-icon://slim-arrow-down", change: jQuery.proxy(this._onSelectChange, this) })); } return this.getAggregation('_select'); }; /** * Creates a new scroll arrow. The scroll arrow consists of two controls: * 1. A HorizontalLayout which is used to display the gradient mask and to serve as a container for the arrow. * 2. A Button which displays the arrow itself. * In bluecrystal theme the button appears when hovering over the gradient mask and is not focusable. * In HCB, the button is always visible and can receive focus. * * @param {boolean} bLeft indicates whether this is the left button * @return {sap.ui.layout.HorizontalLayout} a new scroll arrow * @private */ AnchorBar.prototype._createScrollArrow = function (bLeft) { var sArrowId, sIconName, sArrowClass, oScrollButton, that = this; if (bLeft) { sArrowId = this.getId() + "-arrowScrollLeft"; sIconName = "slim-arrow-left"; sArrowClass = "anchorBarArrowLeft"; } else { sArrowId = this.getId() + "-arrowScrollRight"; sIconName = "slim-arrow-right"; sArrowClass = "anchorBarArrowRight"; } oScrollButton = new Button(sArrowId, { icon: IconPool.getIconURI(sIconName), type: "Transparent", press: function (oEvent) { oEvent.preventDefault(); that._handleScrollButtonTap(bLeft); } }); oScrollButton.addEventDelegate({ onAfterRendering: function () { if (sap.ui.getCore().getConfiguration().getTheme() != "sap_hcb") { this.$().attr("tabindex", -1); } }, onThemeChanged: function () { if (sap.ui.getCore().getConfiguration().getTheme() == "sap_hcb") { this.$().removeAttr("tabindex"); } else { this.$().attr("tabindex", -1); } } }, oScrollButton); return new HorizontalLayout({ content: [oScrollButton] }).addStyleClass("anchorBarArrow").addStyleClass(sArrowClass); }; /** * Overwritten getter for aggregation "_scrollArrowLeft". * Implements lazy loading mechanism. * * @return {sap.ui.layout.HorizontalLayout} reference to the left scroll arrow instance * @private */ AnchorBar.prototype._getScrollArrowLeft = function () { var oScrollArrowLeft = this.getAggregation("_scrollArrowLeft"); if (oScrollArrowLeft) { return oScrollArrowLeft; } else { oScrollArrowLeft = this._createScrollArrow(true); this.setAggregation("_scrollArrowLeft", oScrollArrowLeft); return oScrollArrowLeft; } }; /** * Overwritten getter for aggregation "_scrollArrowRight". * Implements lazy loading mechanism. * * @return {sap.ui.layout.HorizontalLayout} reference to the right scroll arrow instance * @private */ AnchorBar.prototype._getScrollArrowRight = function () { var oScrollArrowRight = this.getAggregation("_scrollArrowRight"); if (oScrollArrowRight) { return oScrollArrowRight; } else { oScrollArrowRight = this._createScrollArrow(false); this.setAggregation("_scrollArrowRight", oScrollArrowRight); return oScrollArrowRight; } }; /******************************************************************************* * Horizontal scrolling ******************************************************************************/ AnchorBar._hierarchicalSelectModes = { "Icon": "icon", // Only icon - overview button mode "Text": "text" // Text - phone mode }; AnchorBar.prototype._applyHierarchicalSelectMode = function () { if (this._sHierarchicalSelectMode === AnchorBar._hierarchicalSelectModes.Icon) { this.$().find(".sapUxAPAnchorBarScrollContainer").show(); this._oSelect.setWidth("auto"); this._oSelect.setAutoAdjustWidth(true); this._oSelect.setType(sap.m.SelectType.IconOnly); this._computeBarSectionsInfo(); } else { this.$().find(".sapUxAPAnchorBarScrollContainer").hide(); this._oSelect.setWidth("100%"); this._oSelect.setAutoAdjustWidth(false); this._oSelect.setType(sap.m.SelectType.Default); } this.$().toggleClass("sapUxAPAnchorBarOverflow", this._sHierarchicalSelectMode === AnchorBar._hierarchicalSelectModes.Icon); }; AnchorBar.prototype._adjustSize = function () { //size changed => check if switch in display-mode (phone-view vs. desktop-view) needed var sNewMode = library.Utilities.isPhoneScenario() ? AnchorBar._hierarchicalSelectModes.Text : AnchorBar._hierarchicalSelectModes.Icon; if (sNewMode !== this._sHierarchicalSelectMode) { this._sHierarchicalSelectMode = sNewMode; this._applyHierarchicalSelectMode(); } //size changed => check if overflow gradients needed if (this._sHierarchicalSelectMode === AnchorBar._hierarchicalSelectModes.Icon) { //don't go any further if the positions of the items are not calculated yet if (this._iMaxPosition < 0) { return; } var $dom = this.$(), $scrollContainer = $dom.find(".sapUxAPAnchorBarScrollContainer"), bNeedScrollingBegin, bNeedScrollingEnd, iContainerWidth; iContainerWidth = $scrollContainer.width(); //do we need to scroll left or right if (this._bRtlScenario) { if (Device.browser.firefox) { bNeedScrollingEnd = Math.abs($scrollContainer.scrollLeft()) + iContainerWidth < (this._iMaxPosition - this._iTolerance); bNeedScrollingBegin = Math.abs($scrollContainer.scrollLeft()) >= this._iTolerance; } else { bNeedScrollingEnd = Math.abs($scrollContainer.scrollLeft()) >= this._iTolerance; bNeedScrollingBegin = Math.abs($scrollContainer.scrollLeft()) + iContainerWidth < (this._iMaxPosition - this._iTolerance); } } else { bNeedScrollingEnd = $scrollContainer.scrollLeft() + iContainerWidth < (this._iMaxPosition - this._iTolerance); bNeedScrollingBegin = $scrollContainer.scrollLeft() >= this._iTolerance; } jQuery.sap.log.debug("AnchorBar :: scrolled at " + $scrollContainer.scrollLeft(), "scrollBegin [" + (bNeedScrollingBegin ? "true" : "false") + "] scrollEnd [" + (bNeedScrollingEnd ? "true" : "false") + "]"); $dom.toggleClass("sapUxAPAnchorBarScrollLeft", bNeedScrollingBegin); $dom.toggleClass("sapUxAPAnchorBarScrollRight", bNeedScrollingEnd); } }; /** * Handles scrolling via the scroll buttons. * * @param boolean bScrollLeft indicates whether the left arrow button was pressed * @private */ AnchorBar.prototype._handleScrollButtonTap = function (bScrollLeft) { /* calculate the direction where to scroll increase if: - ltr and right arrow was pressed - rtl and the left arrow was pressed decrease if: - ltr and the left arrow was pressed - rtl and the right arrow was pressed */ var iScrollDirection = ((!this._bRtlScenario && bScrollLeft) || (this._bRtlScenario && !bScrollLeft)) ? -1 : 1; this._oScroller.scrollTo(this._iMaxPosition * iScrollDirection, 0, AnchorBar.SCROLL_DURATION * 3); //increase scroll duration when scrolling to the other end of the anchorBar (UX requirement) }; /** * Scroll to a specific Section. * * @param {string} sId The Section ID to scroll to * @param {int} duration Scroll duration (in ms). Default value is 0 * @public * @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel */ AnchorBar.prototype.scrollToSection = function (sId, duration) { if (this._bHasButtonsBar) { var iDuration = duration || AnchorBar.SCROLL_DURATION, iScrollTo; if ((this._sHierarchicalSelectMode === AnchorBar._hierarchicalSelectModes.Icon) && this._oSectionInfo[sId]) { if (this._bRtlScenario && Device.browser.firefox) { // in firefox RTL mode we are working with negative numbers and we have to add the offset in order not to hide the selected item iScrollTo = this._oSectionInfo[sId].scrollLeft + this._iOffset; } else { //scroll to the positionRtl minus the offset (so the gradient never hide the selected item) iScrollTo = this._oSectionInfo[sId].scrollLeft - this._iOffset; if (iScrollTo < 0) { //do not allow hiding part of the content if negative value for scroll is calculated here iScrollTo = 0; } } jQuery.sap.log.debug("AnchorBar :: scrolling to section " + sId + " of " + iScrollTo); //avoid triggering twice the scrolling onto the same target section if (this._sCurrentScrollId != sId) { this._sCurrentScrollId = sId; if (this._iCurrentScrollTimeout) { jQuery.sap.clearDelayedCall(this._iCurrentScrollTimeout); jQuery.sap.byId(this.getId() + "-scroll").parent().stop(true, false); } this._iCurrentScrollTimeout = jQuery.sap.delayedCall(duration, this, function () { this._sCurrentScrollId = undefined; this._iCurrentScrollTimeout = undefined; }); this._oScroller.scrollTo(iScrollTo, 0, iDuration); } } else { jQuery.sap.log.debug("AnchorBar :: no need to scroll to " + sId); } } }; // use type 'object' because Metamodel doesn't know ScrollEnablement /** * Returns a sap.ui.core.delegate.ScrollEnablement object used to handle scrolling. * * @type object * @public * @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel */ AnchorBar.prototype.getScrollDelegate = function () { return this._oScroller; }; /******************************************************************************* * Keyboard navigation ******************************************************************************/ AnchorBar.PAGEUP_AND_PAGEDOWN_JUMP_SIZE = 5; /** * Handles DOWN key, triggered on anchor bar level. * * @param {jQuery.Event} oEvent * @private */ AnchorBar.prototype.onsapdown = function (oEvent) { oEvent.preventDefault(); if (oEvent.target.nextSibling) { oEvent.target.nextSibling.focus(); } }; /** * Handles RIGHT key, triggered on anchor bar level. * * @param {jQuery.Event} oEvent * @private */ AnchorBar.prototype.onsapright = function (oEvent) { this.onsapdown(oEvent); }; /** * Handles UP key, triggered on anchor bar level. * * @param {jQuery.Event} oEvent * @private */ AnchorBar.prototype.onsapup = function (oEvent) { oEvent.preventDefault(); if (oEvent.target.previousSibling) { oEvent.target.previousSibling.focus(); } }; /** * Handles LEFT key, triggered on anchor bar level. * * @param {jQuery.Event} oEvent * @private */ AnchorBar.prototype.onsapleft = function (oEvent) { this.onsapup(oEvent); }; /** * Handles HOME key, triggered on anchor bar level. * * @param {jQuery.Event} oEvent * @private */ AnchorBar.prototype.onsaphome = function (oEvent) { oEvent.preventDefault(); if (oEvent.target.parentElement.firstChild) { oEvent.target.parentElement.firstChild.focus(); } }; /** * Handles END key, triggered on anchor bar level. * * @param {jQuery.Event} oEvent * @private */ AnchorBar.prototype.onsapend = function (oEvent) { oEvent.preventDefault(); if (oEvent.target.parentElement.lastChild) { oEvent.target.parentElement.lastChild.focus(); } }; /** * Handles PAGE UP key, triggered on anchor bar level. * * @param {jQuery.Event} oEvent * @private */ AnchorBar.prototype.onsappageup = function (oEvent) { this._handlePageUp(oEvent); }; /** * Handles PAGE DOWN key, triggered on anchor bar level. * * @param {jQuery.Event} oEvent * @private */ AnchorBar.prototype.onsappagedown = function (oEvent) { this._handlePageDown(oEvent); }; /** * Handler for sappageup event. * * @param {jQuery.Event} oEvent * @private */ AnchorBar.prototype._handlePageUp = function (oEvent) { oEvent.preventDefault(); var iNextIndex; var aAnchors = this.getContent(); aAnchors.forEach(function (oAnchor, iAnchorIndex) { if (oAnchor.getId() === oEvent.target.id) { iNextIndex = iAnchorIndex - (AnchorBar.PAGEUP_AND_PAGEDOWN_JUMP_SIZE + 1); return; } }); if (iNextIndex && aAnchors[iNextIndex]) { aAnchors[iNextIndex].focus(); } else if (aAnchors[0]) { aAnchors[0].focus(); } }; /** * Handler for sappagedown event. * * @param {jQuery.Event} oEvent * @private */ AnchorBar.prototype._handlePageDown = function (oEvent) { oEvent.preventDefault(); var iNextIndex; var aAnchors = this.getContent(); aAnchors.forEach(function (oAnchor, iAnchorIndex) { if (oAnchor.getId() === oEvent.target.id) { iNextIndex = iAnchorIndex + AnchorBar.PAGEUP_AND_PAGEDOWN_JUMP_SIZE + 1; return; } }); if (iNextIndex && aAnchors[iNextIndex]) { aAnchors[iNextIndex].focus(); } else if (aAnchors[aAnchors.length - 1]) { aAnchors[aAnchors.length - 1].focus(); } }; /** * handle tab focusing */ AnchorBar.prototype._setAnchorButtonsTabFocusValues = function (oSelectedButton) { var aAnchorBarContent = this.getContent() || [], $anchorBarItem, sFocusable = '0', sNotFocusable = '-1', sTabIndex = "tabIndex"; aAnchorBarContent.forEach(function (oAnchorBarItem) { $anchorBarItem = oAnchorBarItem.$(); if (oAnchorBarItem.sId === oSelectedButton.sId) { $anchorBarItem.attr(sTabIndex, sFocusable); } else { $anchorBarItem.attr(sTabIndex, sNotFocusable); } }); }; /** * Handler for F6 * * @param oEvent - The event object */ AnchorBar.prototype.onsapskipforward = function (oEvent) { this._handleGroupNavigation(oEvent, false); }; /** * Handler for F6 and Shift + F6 group navigation * * @param oEvent {jQuery.EventObject} * @param bShiftKey serving as a reference if shift is used * @private */ AnchorBar.prototype._handleGroupNavigation = function (oEvent, bShiftKey) { var oEventF6 = jQuery.Event("keydown"), oSettings = {}, aSections = this.getParent().getSections(), aSubSections = [this.getDomRef()], aCurruntSubSections; //this is needed in order to be sure that next F6 group will be found in sub sections aSections.forEach(function (oSection) { aCurruntSubSections = oSection.getSubSections().map(function (oSubSection) { return oSubSection.$().attr("tabindex", -1)[0]; }); aSubSections = aSubSections.concat(aCurruntSubSections); }); oSettings.scope = aSubSections; oEvent.preventDefault(); this.$().focus(); oEventF6.target = oEvent.target; oEventF6.keyCode = jQuery.sap.KeyCodes.F6; oEventF6.shiftKey = bShiftKey; jQuery.sap.handleF6GroupNavigation(oEventF6, oSettings); }; /** * called for figuring out responsive scenarios */ AnchorBar.prototype.onAfterRendering = function () { if (Toolbar.prototype.onAfterRendering) { Toolbar.prototype.onAfterRendering.call(this); } this._sHierarchicalSelectMode = AnchorBar._hierarchicalSelectModes.Text; //save max for arrow show/hide management, the max position is the required scroll for the the item to be fully visible this._iMaxPosition = -1; //show/hide scrolling arrows this._sResizeListenerId = ResizeHandler.register(this, jQuery.proxy(this._adjustSize, this)); this.$().find(".sapUxAPAnchorBarScrollContainer").scroll(jQuery.proxy(this._onScroll, this)); //restore state from previous rendering if (this.getSelectedButton()) { this.setSelectedButton(this.getSelectedButton()); } //initial state if (this._bHasButtonsBar) { jQuery.sap.delayedCall(AnchorBar.DOM_CALC_DELAY, this, function () { this._adjustSize(); }); } }; AnchorBar.prototype._onScroll = function () { if (!this._iCurrentSizeCheckTimeout) { this._iCurrentSizeCheckTimeout = jQuery.sap.delayedCall(AnchorBar.SCROLL_DURATION, this, function () { this._iCurrentSizeCheckTimeout = undefined; this._adjustSize(); }); } }; AnchorBar.prototype._computeBarSectionsInfo = function () { //reset the max position this._iMaxPosition = 0; var aContent = this.getContent() || []; aContent.forEach(this._computeNextSectionInfo, this); //post processing based on how browsers implement rtl //chrome, safari && Device.browser.webkit && firefox if (this._bRtlScenario && (Device.browser.webkit || Device.browser.firefox)) { aContent.forEach(this._adjustNextSectionInfo, this); // adjust positions depending of the browser this._oScroller.scrollTo(this._iMaxPosition, 0, 0); } }; AnchorBar.prototype._computeNextSectionInfo = function (oContent) { // set ARIA has-popup if button opens submenu if (oContent.data("bHasSubMenu")) { oContent.$().attr("aria-haspopup", "true"); } // set ARIA attributes of main buttons oContent.$().attr("aria-controls", oContent.data("sectionId")); var iWidth = oContent.$().outerWidth(true); //store info on the various sections for horizontalScrolling //scrollLeft is the amount of scroll required for reaching that item in normal mode this._oSectionInfo[oContent.data("sectionId")] = { scrollLeft: this._iMaxPosition, width: iWidth }; this._iMaxPosition += iWidth; }; /** * Adjustment for webkit only * * Reverse the position as the scroll 0 is at the far end (first item = maxPosition, last item = 0) */ AnchorBar.prototype._adjustNextSectionInfo = function (oContent) { var oSectionInfo = this._oSectionInfo[oContent.data("sectionId")]; if (Device.browser.firefox) { // 27.11.2015 fix made for the following issue // firefox not working yet see internal incident 1570001701 oSectionInfo.scrollLeft = -oSectionInfo.scrollLeft; } else { // Reverse all positions as the scroll 0 is at the far end (first item = maxPosition, last item = 0) oSectionInfo.scrollLeft = this._iMaxPosition - oSectionInfo.scrollLeft - oSectionInfo.width; } }; /** * clean created controls and deregister handlers */ AnchorBar.prototype.exit = function () { if (this._sResizeListenerId) { ResizeHandler.deregister(this._sResizeListenerId); this._sResizeListenerId = null; } if (this._oScroller) { this._oScroller.destroy(); this._oScroller = null; } }; return AnchorBar; }); }; // end of sap/uxap/AnchorBar.js if ( !jQuery.sap.isDeclared('sap.uxap.AnchorBarRenderer') ) { /*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2016 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ jQuery.sap.declare('sap.uxap.AnchorBarRenderer'); // unresolved dependency added by SAPUI5 'AllInOne' Builder jQuery.sap.require('sap.m.ToolbarRenderer'); // unlisted dependency retained jQuery.sap.require('sap.ui.core.Renderer'); // unlisted dependency retained jQuery.sap.require('sap.m.BarInPageEnabler'); // unlisted dependency retained sap.ui.define("sap/uxap/AnchorBarRenderer",["sap/m/ToolbarRenderer", "sap/ui/core/Renderer", "sap/m/BarInPageEnabler", "./AnchorBar", "./library"], function (ToolbarRenderer, Renderer, BarInPageEnabler, AnchorBar, library) { "use strict"; /** * @class ObjectPageRenderer renderer. * @static */ var AnchorBarRenderer = Renderer.extend(ToolbarRenderer); AnchorBarRenderer.renderBarContent = function (rm, oToolbar) { if (oToolbar._bHasButtonsBar) { rm.renderControl(oToolbar._getScrollArrowLeft()); rm.write("<div"); rm.writeAttributeEscaped("id", oToolbar.getId() + "-scrollContainer"); // ARIA attributes rm.writeAttributeEscaped("aria-label", library.i18nModel.getResourceBundle().getText("ANCHOR_BAR_LABEL")); // rm.addClass("sapUxAPAnchorBarScrollContainer"); rm.writeClasses(); rm.write(">"); rm.write("<div"); rm.writeAttributeEscaped("id", oToolbar.getId() + "-scroll"); rm.write(">"); AnchorBarRenderer.renderBarItems(rm, oToolbar); rm.write("</div>"); rm.write("</div>"); rm.renderControl(oToolbar._getScrollArrowRight()); } BarInPageEnabler.addChildClassTo(oToolbar._oSelect, oToolbar); rm.renderControl(oToolbar._oSelect); }; AnchorBarRenderer.renderBarItems = function (rm, oToolbar) { var sSelectedItemId = oToolbar.getSelectedButton(); oToolbar.getContent().forEach(function(oControl) { BarInPageEnabler.addChildClassTo(oControl, oToolbar); if (oControl.getId() === sSelectedItemId) { oControl.addStyleClass("sapUxAPAnchorBarButtonSelected"); } rm.renderControl(oControl); }); }; AnchorBarRenderer.decorateRootElement = function (rm, oToolbar) { ToolbarRenderer.decorateRootElement.apply(this, arguments); if (oToolbar._sHierarchicalSelectMode === AnchorBar._hierarchicalSelectModes.Icon) { rm.addClass("sapUxAPAnchorBarOverflow"); } }; return AnchorBarRenderer; }, /* bExport= */ true); }; // end of sap/uxap/AnchorBarRenderer.js if ( !jQuery.sap.isDeclared('sap.uxap.BlockBase') ) { /*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2016 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ // Provides control sap.uxap.BlockBase. jQuery.sap.declare('sap.uxap.BlockBase'); // unresolved dependency added by SAPUI5 'AllInOne' Builder jQuery.sap.require('sap.ui.core.Control'); // unlisted dependency retained jQuery.sap.require('sap.ui.core.CustomData'); // unlisted dependency retained jQuery.sap.require('sap.ui.model.Context'); // unlisted dependency retained jQuery.sap.require('sap.ui.Device'); // unlisted dependency retained jQuery.sap.require('sap.ui.layout.form.ResponsiveGridLayout'); // unlisted dependency retained sap.ui.define("sap/uxap/BlockBase",[ "sap/ui/core/Control", "sap/ui/core/CustomData", "./BlockBaseMetadata", "./ModelMapping", "sap/ui/model/Context", "sap/ui/Device", "sap/ui/layout/form/ResponsiveGridLayout", "./library" ], function (Control, CustomData, BlockBaseMetadata, ModelMapping, Context, Device, ResponsiveGridLayout, library) { "use strict"; /** * Constructor for a new BlockBase. * * @param {string} [sId] id for the new control, generated automatically if no id is given * @param {object} [mSettings] initial settings for the new control * * @class * * A block is the main element that will be displayed, mainly in an object page, but not necessarily * only there. * * A block is a control that use a XML view for storing its internal control tree. * A block is a control that has modes and a view associated to each modes. * At rendering time, the view associated to the mode is rendered. * * <b>Note:</b> The control supports only XML views. * * As any UI5 views, the XML view can have a controller which automatically comes a this.oParentBlock attribute (so that the controller can interacts with the block). * If the controller implements the onParentBlockModeChange method, this method will get called with the sMode parameter when the view is used or re-used by the block. * * @extends sap.ui.core.Control * @author SAP SE * @constructor * @public * @since 1.26 * @alias sap.uxap.BlockBase * @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel */ var BlockBase = Control.extend("sap.uxap.BlockBase", { metadata: { library: "sap.uxap", properties: { /** * Determines the mode of the block. * When block is used inside ObjectPage this mode is inherited my the SubSection. * The mode of the block is changed when SubSection mode changes. */ "mode": {type: "string", group: "Appearance"}, /** * Determines the visibility of the block. */ "visible": {type: "boolean", group: "Appearance", defaultValue: true}, /** * Determines on how columns the layout will be rendered. * Allowed values are integers from 1 to 4 and "auto". */ "columnLayout": {type: "sap.uxap.BlockBaseColumnLayout", group: "Behavior", defaultValue: "auto"}, /** * Determines if the block should automatically adjust its inner forms. * Allowed values are "BlockColumns" and "OneColumn" and "None". * If the value is "BlockColumns", then the inner form will have as many columns as the colspan of its parent block. * If the value is "OneColumn", the inner form will have exactly one column, regardless the colspan of its parent block. * If the value is "None", no automatic adjustment of inner forms will be made and the form will keep its original column count. */ "formAdjustment": { type: "sap.uxap.BlockBaseFormAdjustment", group: "Behavior", defaultValue: sap.uxap.BlockBaseFormAdjustment.BlockColumns }, /** * Determines whether the show more button should be shown. */ "showSubSectionMore": {type: "boolean", group: "Behavior", defaultValue: false} }, defaultAggregation: "mappings", aggregations: { /** * Map external UI5 model and internal Block model */ "mappings": {type: "sap.uxap.ModelMapping", multiple: true, singularName: "mapping"}, /** * Internal aggregation that contains all views inside this Block */ "_views": {type: "sap.ui.core.Control", multiple: true, singularName: "view", visibility: "hidden"} }, associations: { /** * The view that is rendered now. * Can be used as getter for the rendered view. */ "selectedView": {type: "sap.ui.core.Control", multiple: false} }, views: { // define your views here following the pattern: // "yourModeName": {viewName: "your.view.path" , type: "yourUI5ViewType" } // for example: // "Collapsed": { // viewName: "sap.uxap.testblocks.multiview.MultiViewBlockCollapsed", // type: "XML" // }, // "Expanded": { // viewName: "sap.uxap.testblocks.multiview.MultiViewBlockExpanded", // type: "XML" // } // // if no views are provided, the blockBase looks for an xml view which name is equal to the block's one // } }, renderer: "sap.uxap.BlockBaseRenderer" }, BlockBaseMetadata); BlockBase.prototype.init = function () { //convenience mechanism: //if there are no views defined by the Block, // we look for the default one which would have the same name as the block and type XML if (!this.getMetadata().hasViews()) { this.getMetadata().setView("defaultXML", {viewName: this.getMetadata().getName(), type: "XML"}); } //for performance optimization this._oMappingApplied = {}; //lazy loading this._bLazyLoading = false; //by default, no lazy loading so we can use it out of an objectPageLayout this._bConnected = false; //indicates connectToModels function has been called this._oUpdatedModels = {}; }; BlockBase.prototype.onBeforeRendering = function () { this._applyMapping(); if (!this.getMode() || this.getMode() === "") { if (this.getMetadata().getView("defaultXML")) { this.setMode("defaultXML"); } else { jQuery.sap.log.error("BlockBase ::: there is no mode defined for rendering " + this.getMetadata().getName() + ". You can either set a default mode on the block metadata or set the mode property before rendering the block."); } } this._applyFormAdjustment(); //TODO: for iconTabBar mode, specify lazyLoading for selectedTab only? this._bLazyLoading = this._getObjectPageLayout() && (this._getObjectPageLayout().getEnableLazyLoading() || this._getObjectPageLayout().getUseIconTabBar()); }; BlockBase.prototype.onAfterRendering = function () { if (this._getObjectPageLayout()) { this._getObjectPageLayout()._adjustLayout(); } }; /** * Set the parent control for the current block. * Every time the parent changes, we try to find the parent objectPageLayout in order to determine the lazy loading strategy to apply. * @param {*} oParent parent instance * @param {*} sAggregationName aggregation name * @param {*} bSuppressInvalidate invalidate */ BlockBase.prototype.setParent = function (oParent, sAggregationName, bSuppressInvalidate) { Control.prototype.setParent.call(this, oParent, sAggregationName, bSuppressInvalidate); if (oParent instanceof library.ObjectPageSubSection) { this._bLazyLoading = true; //we activate the block lazy loading since we are within an objectPageLayout this._oParentObjectPageSubSection = oParent; } }; /********************************************* * model mapping management * *******************************************/ /** * Intercept direct setModel calls. * @param {*} oModel model instance * @param {*} sName name of the model * @returns {sap.ui.base.ManagedObject} instance of managed object */ BlockBase.prototype.setModel = function (oModel, sName) { this._applyMapping(sName); return Control.prototype.setModel.call(this, oModel, sName); }; /** * Called for applying the modelmapping once all properties are set. * @private */ BlockBase.prototype._applyMapping = function () { if (this._bLazyLoading && !this._bConnected) { jQuery.sap.log.debug("BlockBase ::: Ignoring the _applyMapping as the block is not connected"); } else { this.getMappings().forEach(function (oMapping, iIndex) { var oModel, sInternalModelName = oMapping.getInternalModelName(), sExternalPath = oMapping.getExternalPath(), sExternalModelName = oMapping.getExternalModelName(), sPath; if (sExternalPath) { if (sInternalModelName == "" || sExternalPath == "") { throw new Error("BlockBase :: incorrect mapping, one of the modelMapping property is empty"); } if (!this._isMappingApplied(sInternalModelName) /* check if mapping is set already */ || (this.getModel(sInternalModelName) != this.getModel(sExternalModelName)) /* model changed, then we have to update internal model mapping */) { jQuery.sap.log.info("BlockBase :: mapping external model " + sExternalModelName + " to " + sInternalModelName); oModel = this.getModel(sExternalModelName); if (oModel) { sPath = oModel.resolve(sExternalPath, this.getBindingContext(sExternalModelName)); this._oMappingApplied[sInternalModelName] = true; Control.prototype.setModel.call(this, oModel, sInternalModelName); this.setBindingContext(new Context(oModel, sPath), sInternalModelName); } } } }, this); } }; BlockBase.prototype._isMappingApplied = function (sInternalModelName) { return this.getModel(sInternalModelName) && this._oMappingApplied[sInternalModelName]; }; /** * Intercept propagated properties. * @param {*} vName property instance or property name * @returns {*} propagateProperties function result */ BlockBase.prototype.propagateProperties = function (vName) { if (this._bLazyLoading && !this._bConnected && !this._oUpdatedModels.hasOwnProperty(vName)) { this._oUpdatedModels[vName] = true; } else { this._applyMapping(vName); } return Control.prototype.propagateProperties.call(this, vName); }; /********************************************* * mode vs views management * *******************************************/ /** * Returns an object containing the supported modes for the block. * @returns {sap.ui.core/object} supported modes */ BlockBase.prototype.getSupportedModes = function () { var oSupportedModes = jQuery.extend({}, this.getMetadata().getViews()); for (var key in oSupportedModes) { oSupportedModes[key] = key; //this is what developers expect, for ex: {Collapsed:"Collapsed"} } return oSupportedModes; }; /** * Set the view mode for this particular block. * @public * @param {string} sMode the mode to apply to the control (that should be synchronized with view declared) * @returns {*} this */ BlockBase.prototype.setMode = function (sMode) { sMode = this._validateMode(sMode); if (this.getMode() !== sMode) { this.setProperty("mode", sMode, false); //if Lazy loading is enabled, and if the block is not connected //delay the view creation (will be done in connectToModels function) if (!this._bLazyLoading || this._bConnected) { this._initView(sMode); } } return this; }; /** * Set the column layout for this particular block. * @param {string} sLayout The column layout to apply to the control * @public */ BlockBase.prototype.setColumnLayout = function (sLayout) { if (this._oParentObjectPageSubSection) { this._oParentObjectPageSubSection.invalidate(); /*the parent subsection needs to recalculate block layout data based on the changed block column layout */ } this.setProperty("columnLayout", sLayout); }; /** * Provide a clone mechanism: the selectedView needs to point to one of the _views. * @returns {sap.ui.core.Element} cloned element */ BlockBase.prototype.clone = function () { var iAssocIndex = -1, sAssoc = this.getAssociation("selectedView"), aViews = this.getAggregation("_views") || []; //find the n-view associated if (sAssoc) { aViews.forEach(function (oView, iIndex) { if (oView.getId() === sAssoc) { iAssocIndex = iIndex; } return iAssocIndex < 0; }); } var oNewThis = Control.prototype.clone.call(this); //we need to maintain the association onto the new object if (iAssocIndex >= 0) { oNewThis.setAssociation("selectedView", oNewThis.getAggregation("_views")[iAssocIndex]); } return oNewThis; }; /** * Validate that the provided mode has been declared in the metadata views section, throw an exception otherwise. * @param {*} sMode mode * @returns {*} sMode * @private */ BlockBase.prototype._validateMode = function (sMode) { this.validateProperty("mode", sMode); //type expected as per properties definition if (!this.getMetadata().getView(sMode)) { var sBlockName = this.getMetadata()._sClassName || this.getId(); //the view wasn't defined. //as a fallback mechanism: we look for the defaultXML one and raise an error before raising an exception if (this.getMetadata().getView("defaultXML")) { jQuery.sap.log.warning("BlockBase :: no view defined for block " + sBlockName + " for mode " + sMode + ", loading defaultXML instead"); sMode = "defaultXML"; } else { throw new Error("BlockBase :: no view defined for block " + sBlockName + " for mode " + sMode); } } return sMode; }; /** * Get the view associated with the selectedView. * @returns {*} Selected view * @private */ BlockBase.prototype._getSelectedViewContent = function () { var oView = null, sSelectedViewId, aViews; sSelectedViewId = this.getAssociation("selectedView"); aViews = this.getAggregation("_views"); if (aViews) { for (var i = 0; !oView && i < aViews.length; i++) { if (aViews[i].getId() === sSelectedViewId) { oView = aViews[i]; } } } return oView; }; /*** * Create view * @param {*} mParameter parameter * @returns {sap.ui.core.mvc.View} view * @protected */ BlockBase.prototype.createView = function (mParameter) { return sap.ui.xmlview(mParameter); }; /** * Initialize a view and returns it if it has not been defined already. * @param {*} sMode the valid mode corresponding to the view to initialize * @returns {sap.ui.view} view * @private */ BlockBase.prototype._initView = function (sMode) { var oView, aViews = this.getAggregation("_views") || [], mParameter = this.getMetadata().getView(sMode); //look for the views if it was already instantiated aViews.forEach(function (oCurrentView, iIndex) { if (oCurrentView.data("layoutMode") === sMode) { oView = oCurrentView; } }); //the view is not instantiated yet, handle a new view scenario if (!oView) { oView = this._initNewView(sMode); } this.setAssociation("selectedView", oView, true); //try to notify the associated controller that the view is being used for this mode if (oView.getController() && oView.getController().onParentBlockModeChange) { oView.getController().onParentBlockModeChange(sMode); } else { jQuery.sap.log.info("BlockBase ::: could not notify " + mParameter.viewName + " of loading in mode " + sMode + ": missing controller onParentBlockModeChange method"); } return oView; }; /** * Initialize new BlockBase view * @param {*} sMode the valid mode corresponding to the view to initialize * @returns {sap.ui.view} view * @private */ BlockBase.prototype._initNewView = function (sMode) { var oView = this._getSelectedViewContent(), mParameter = this.getMetadata().getView(sMode); //check if the new view is not the current one (we may want to have the same view for several modes) if (!oView || mParameter.viewName != oView.getViewName()) { oView = this.createView(mParameter); //link to the controller defined in the Block if (oView) { //inject a reference to this if (oView.getController()) { oView.getController().oParentBlock = this; } oView.addCustomData(new CustomData({ "key": "layoutMode", "value": sMode })); this.addAggregation("_views", oView, true); } else { throw new Error("BlockBase :: no view defined in metadata.views for mode " + sMode); } } return oView; }; // This offset is needed so the breakpoints of the simpleForm match those of the GridLayout (offset = left-padding of grid + margins of grid-cells [that create the horizontal spacing between the cells]) BlockBase.FORM_ADUSTMENT_OFFSET = 32; BlockBase._FORM_ADJUSTMENT_CONST = { breakpoints: { XL: Device.media._predefinedRangeSets.StdExt.points[2] - BlockBase.FORM_ADUSTMENT_OFFSET, L: Device.media._predefinedRangeSets.StdExt.points[1] - BlockBase.FORM_ADUSTMENT_OFFSET, M: Device.media._predefinedRangeSets.StdExt.points[0] - BlockBase.FORM_ADUSTMENT_OFFSET }, labelSpan: { /* values specified by design requirement */ XL: 12, L: 12, M: 12, S: 12 }, emptySpan: { /* values specified by design requirement */ XL: 0, L: 0, M: 0, S: 0 }, columns: { XL: 1, L: 1, M: 1 } }; BlockBase._PARENT_GRID_SIZE = 12; BlockBase.prototype._computeFormAdjustmentFields = function (oView, oLayoutData, sFormAdjustment, oParentColumns) { if (oView && oLayoutData && sFormAdjustment && oParentColumns) { var oColumns = this._computeFormColumns(oLayoutData, sFormAdjustment, oParentColumns), oBreakpoints = this._computeFormBreakpoints(oLayoutData, sFormAdjustment); return jQuery.extend({}, BlockBase._FORM_ADJUSTMENT_CONST, {columns: oColumns}, {breakpoints: oBreakpoints}); } }; BlockBase.prototype._computeFormColumns = function (oLayoutData, sFormAdjustment, oParentColumns) { var oColumns = jQuery.extend({}, BlockBase._FORM_ADJUSTMENT_CONST.columns); if (sFormAdjustment === sap.uxap.BlockBaseFormAdjustment.BlockColumns) { var iColumnSpanXL = BlockBase._PARENT_GRID_SIZE / oParentColumns.XL, iColumnSpanL = BlockBase._PARENT_GRID_SIZE / oParentColumns.L, iColumnSpanM = BlockBase._PARENT_GRID_SIZE / oParentColumns.M; oColumns.XL = oLayoutData.getSpanXL() / iColumnSpanXL; oColumns.L = oLayoutData.getSpanL() / iColumnSpanL; oColumns.M = oLayoutData.getSpanM() / iColumnSpanM; } return oColumns; }; BlockBase.prototype._computeFormBreakpoints = function (oLayoutData, sFormAdjustment) { var oBreakpoints = jQuery.extend({}, BlockBase._FORM_ADJUSTMENT_CONST.breakpoints); if (sFormAdjustment === sap.uxap.BlockBaseFormAdjustment.BlockColumns) { oBreakpoints.XL = Math.round(oBreakpoints.XL * oLayoutData.getSpanXL() / BlockBase._PARENT_GRID_SIZE); oBreakpoints.L = Math.round(oBreakpoints.L * oLayoutData.getSpanL() / BlockBase._PARENT_GRID_SIZE); oBreakpoints.M = Math.round(oBreakpoints.M * oLayoutData.getSpanM() / BlockBase._PARENT_GRID_SIZE); } return oBreakpoints; }; BlockBase.prototype._applyFormAdjustment = function () { var oLayoutData = this.getLayoutData(), sFormAdjustment = this.getFormAdjustment(), oView = this._getSelectedViewContent(), oParent = this._oParentObjectPageSubSection, oFormAdjustmentFields; if (sFormAdjustment && (sFormAdjustment !== sap.uxap.BlockBaseFormAdjustment.None) && oView && oLayoutData && oParent) { var oParentColumns = oParent._oLayoutConfig; oView.getContent().forEach(function (oItem) { if (oItem.getMetadata().getName() === "sap.ui.layout.form.SimpleForm") { oItem.setLayout(sap.ui.layout.form.SimpleFormLayout.ResponsiveGridLayout); if (!oFormAdjustmentFields) { oFormAdjustmentFields = this._computeFormAdjustmentFields(oView, oLayoutData, sFormAdjustment, oParentColumns); } this._applyFormAdjustmentFields(oFormAdjustmentFields, oItem); oItem.setWidth("100%"); } else if (oItem.getMetadata().getName() === "sap.ui.layout.form.Form") { var oLayout = oItem.getLayout(), oResponsiveGridLayout; if (oLayout && oLayout.getMetadata().getName() === "sap.ui.layout.form.ResponsiveGridLayout") { oResponsiveGridLayout = oLayout; // existing ResponsiveGridLayout must be reused, otherwise an error is thrown in the existing implementation } else { oResponsiveGridLayout = new ResponsiveGridLayout(); oItem.setLayout(oResponsiveGridLayout); } if (!oFormAdjustmentFields) { oFormAdjustmentFields = this._computeFormAdjustmentFields(oView, oLayoutData, sFormAdjustment, oParentColumns); } this._applyFormAdjustmentFields(oFormAdjustmentFields, oResponsiveGridLayout); oItem.setWidth("100%"); } }, this); } }; BlockBase.prototype._applyFormAdjustmentFields = function (oFormAdjustmentFields, oFormLayout) { oFormLayout.setColumnsXL(oFormAdjustmentFields.columns.XL); oFormLayout.setColumnsL(oFormAdjustmentFields.columns.L); oFormLayout.setColumnsM(oFormAdjustmentFields.columns.M); oFormLayout.setLabelSpanXL(oFormAdjustmentFields.labelSpan.XL); oFormLayout.setLabelSpanL(oFormAdjustmentFields.labelSpan.L); oFormLayout.setLabelSpanM(oFormAdjustmentFields.labelSpan.M); oFormLayout.setLabelSpanS(oFormAdjustmentFields.labelSpan.S); oFormLayout.setEmptySpanXL(oFormAdjustmentFields.emptySpan.XL); oFormLayout.setEmptySpanL(oFormAdjustmentFields.emptySpan.L); oFormLayout.setEmptySpanM(oFormAdjustmentFields.emptySpan.M); oFormLayout.setEmptySpanS(oFormAdjustmentFields.emptySpan.S); oFormLayout.setBreakpointXL(oFormAdjustmentFields.breakpoints.XL); oFormLayout.setBreakpointL(oFormAdjustmentFields.breakpoints.L); oFormLayout.setBreakpointM(oFormAdjustmentFields.breakpoints.M); }; /************************************************************************************* * objectPageLayout integration & lazy loading management ************************************************************************************/ /** * Getter for the parent object page layout. * @returns {*} OP layout * @private */ BlockBase.prototype._getObjectPageLayout = function () { if (!this._oParentObjectPageLayout) { this._oParentObjectPageLayout = library.Utilities.getClosestOPL(this); } return this._oParentObjectPageLayout; }; /** * Setter for the visibility of the block. * @public */ BlockBase.prototype.setVisible = function (bValue, bSuppressInvalidate) { this.setProperty("visible", bValue, bSuppressInvalidate); this._getObjectPageLayout() && this._getObjectPageLayout()._adjustLayoutAndUxRules(); return this; }; /** * Set the showSubSectionMore property. * Ask the parent ObjectPageSubSection to refresh its see more visibility state if present. * @param bValue * @param bInvalidate * @returns {*} */ BlockBase.prototype.setShowSubSectionMore = function (bValue, bInvalidate) { //suppress invalidate as ShowSubSectionMore has no impact on block itself. if (bValue != this.getShowSubSectionMore()) { this.setProperty("showSubSectionMore", bValue, true); //refresh the parent subsection see more visibility if we have changed it and we are within an objectPageSubSection if (this._oParentObjectPageSubSection) { this._oParentObjectPageSubSection.refreshSeeMoreVisibility(); } } return this; }; /** * Connect Block to the UI5 model tree. * Initialize view if lazy loading is enabled. * @returns {*} */ BlockBase.prototype.connectToModels = function () { if (!this._bConnected) { jQuery.sap.log.debug("BlockBase :: Connecting block to the UI5 model tree"); this._bConnected = true; if (this._bLazyLoading) { //if lazy loading is enabled, the view has not been created during the setMode //so create it now var sMode = this.getMode(); sMode && this._initView(sMode); } this.invalidate(); } }; /** * Override of the default model lifecycle method to disable the automatic binding resolution for lazyloading. * @override * @param bSkipLocal * @param bSkipChildren * @param sModelName * @param bUpdateAll * @returns {*} */ BlockBase.prototype.updateBindingContext = function (bSkipLocal, bSkipChildren, sModelName, bUpdateAll) { if (!this._bLazyLoading || this._bConnected) { return Control.prototype.updateBindingContext.call(this, bSkipLocal, bSkipChildren, sModelName, bUpdateAll); } else { jQuery.sap.log.debug("BlockBase ::: Ignoring the updateBindingContext as the block is not visible for now in the ObjectPageLayout"); } }; /** * Override of the default model lifecycle method to disable the automatic binding resolution for lazyloading. * @override * @param bUpdateAll * @param sModelName * @returns {*} */ BlockBase.prototype.updateBindings = function (bUpdateAll, sModelName) { if (!this._bLazyLoading || this._bConnected) { return Control.prototype.updateBindings.call(this, bUpdateAll, sModelName); } else { jQuery.sap.log.debug("BlockBase ::: Ignoring the updateBindingContext as the block is not visible for now in the ObjectPageLayout"); } }; return BlockBase; }); }; // end of sap/uxap/BlockBase.js if ( !jQuery.sap.isDeclared('sap.uxap.ObjectPageHeader') ) { /*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2016 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ // Provides control sap.uxap.ObjectPageHeader. jQuery.sap.declare('sap.uxap.ObjectPageHeader'); // unresolved dependency added by SAPUI5 'AllInOne' Builder jQuery.sap.require('sap.ui.core.Control'); // unlisted dependency retained jQuery.sap.require('sap.ui.core.IconPool'); // unlisted dependency retained jQuery.sap.require('sap.ui.core.CustomData'); // unlisted dependency retained jQuery.sap.require('sap.ui.Device'); // unlisted dependency retained jQuery.sap.require('sap.m.Breadcrumbs'); // unlisted dependency retained jQuery.sap.require('sap.ui.core.ResizeHandler'); // unlisted dependency retained jQuery.sap.require('sap.m.Text'); // unlisted dependency retained jQuery.sap.require('sap.m.Button'); // unlisted dependency retained jQuery.sap.require('sap.m.ActionSheet'); // unlisted dependency retained jQuery.sap.require('sap.m.Image'); // unlisted dependency retained jQuery.sap.require('sap.ui.core.Icon'); // unlisted dependency retained sap.ui.define("sap/uxap/ObjectPageHeader",[ "sap/ui/core/Control", "sap/ui/core/IconPool", "sap/ui/core/CustomData", "sap/ui/Device", "sap/m/Breadcrumbs", "./ObjectPageHeaderActionButton", "sap/ui/core/ResizeHandler", "sap/m/Text", "sap/m/Button", "sap/m/ActionSheet", "sap/m/Image", "sap/ui/core/Icon", "./library" ], function (Control, IconPool, CustomData, Device, Breadcrumbs, ObjectPageHeaderActionButton, ResizeHandler, Text, Button, ActionSheet, Image, Icon, library) { "use strict"; /** * Constructor for a new ObjectPageHeader. * * @param {string} [sId] id for the new control, generated automatically if no id is given * @param {object} [mSettings] initial settings for the new control * * @class * ObjectPageHeader represents the static part of an Object page header. * Typically used to display the basic information about a business object, such as title/description/picture, as well as a list of common actions. * @extends sap.ui.core.Control * * @author SAP SE * * @constructor * @public * @alias sap.uxap.ObjectPageHeader * @since 1.26 * @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel */ var ObjectPageHeader = Control.extend("sap.uxap.ObjectPageHeader", /** @lends sap.uxap.ObjectPageHeader.prototype */ { metadata: { library: "sap.uxap", properties: { /** * The URL of the image, representing the business object */ objectImageURI: {type: "string", defaultValue: null}, /** * The text to be used for the Alt and Tooltip attribute of the image, supplied via the objectImageURI property */ objectImageAlt: {type: "string", defaultValue: ''}, /** * The value of densityAware for the image, supplied via the objectImageURI property. * See sap.m.Image for more details on densityAware. */ objectImageDensityAware: {type: "boolean", defaultValue: false}, /** * The title of the object */ objectTitle: {type: "string", defaultValue: null}, /** * The description of the object */ objectSubtitle: {type: "string", defaultValue: null}, /** * Determines whether the picture should be displayed in a square or with a circle-shaped mask. */ objectImageShape: { type: "sap.uxap.ObjectPageHeaderPictureShape", defaultValue: sap.uxap.ObjectPageHeaderPictureShape.Square }, /** * Determines whether the icon should always be visible or visible only when the header is snapped. */ isObjectIconAlwaysVisible: {type: "boolean", defaultValue: false}, /** * Determines whether the title should always be visible or visible only when the header is snapped. */ isObjectTitleAlwaysVisible: {type: "boolean", defaultValue: true}, /** * Determines whether the subtitle should always be visible or visible only when the header is snapped. */ isObjectSubtitleAlwaysVisible: {type: "boolean", defaultValue: true}, /** * Determines whether the action buttons should always be visible or visible only when the header is snapped. */ isActionAreaAlwaysVisible: {type: "boolean", defaultValue: true}, /** * Determines the design of the header - Light or Dark */ headerDesign: { type: "sap.uxap.ObjectPageHeaderDesign", defaultValue: sap.uxap.ObjectPageHeaderDesign.Light }, /** * When set to true, the selector arrow icon/image is shown and can be pressed. */ showTitleSelector: {type: "boolean", group: "Misc", defaultValue: false}, /** * Set the favorite state to true or false. The showMarkers property must be true for this property to take effect. */ markFavorite: {type: "boolean", group: "Misc", defaultValue: false}, /** * Set the flagged state to true or false. The showMarkers property must be true for this property to take effect. */ markFlagged: {type: "boolean", group: "Misc", defaultValue: false}, /** * Indicates if object page header title supports showing markers such as flagged and favorite. */ showMarkers: {type: "boolean", group: "Misc", defaultValue: false}, /** * Set the locked state of the objectPageHeader. */ markLocked: {type: "boolean", group: "Misc", defaultValue: false}, /** * Enables support of a placeholder image in case no image is specified or the URL of the provided image is invalid. */ showPlaceholder: {type: "boolean", group: "Misc", defaultValue: false}, /** * Marks that there are unsaved changes in the objectPageHeader. * The markChanges state cannot be used together with the markLocked state. * If both are set to true, only the locked state will be displayed. * @since 1.34.0 */ markChanges: {type: "boolean", group: "Misc", defaultValue: false} }, defaultAggregation: "actions", aggregations: { /** * * Internal aggregation for the BreadCrumbs in the header. */ _breadCrumbs: {type: "sap.m.Breadcrumbs", multiple: false, visibility: "hidden"}, /** * * A list of all the active link elements in the BreadCrumbs control. */ breadCrumbsLinks: {type: "sap.m.Link", multiple: true, singularName: "breadCrumbLink"}, /** * * Internal aggregation for the overflow button in the header. */ _overflowButton: {type: "sap.m.Button", multiple: false, visibility: "hidden"}, /** * * Internal aggregation for the expand header button. */ _expandButton: {type: "sap.m.Button", multiple: false, visibility: "hidden"}, /** * * Icon for the identifier line. */ _objectImage: {type: "sap.ui.core.Control", multiple: false, visibility: "hidden"}, _lockIconCont: {type: "sap.m.Button", multiple: false, visibility: "hidden"}, _lockIcon: {type: "sap.m.Button", multiple: false, visibility: "hidden"}, _titleArrowIconCont: {type: "sap.m.Button", multiple: false, visibility: "hidden"}, _titleArrowIcon: {type: "sap.m.Button", multiple: false, visibility: "hidden"}, _favIcon: {type: "sap.ui.core.Icon", multiple: false, visibility: "hidden"}, _flagIcon: {type: "sap.ui.core.Icon", multiple: false, visibility: "hidden"}, _overflowActionSheet: {type: "sap.m.ActionSheet", multiple: false, visibility: "hidden"}, _changesIconCont: {type: "sap.m.Button", multiple: false, visibility: "hidden"}, _changesIcon: {type: "sap.m.Button", multiple: false, visibility: "hidden"}, /** * * An instance of sap.m.Bar to be embedded in the header */ navigationBar: {type: "sap.m.Bar", multiple: false}, /** * * List of actions that will be displayed in the header. * You can use ObjectPageHeaderActionButton controls to achieve a different visual representation of the action buttons in the action bar and the action sheet (overflow menu). * You can use ObjectPageHeaderLayoutData to display a visual separator. */ actions: {type: "sap.ui.core.Control", multiple: true, singularName: "action"} }, events: { /** * The event is fired when the objectPage header title selector (down-arrow) is pressed */ titleSelectorPress: { parameters: { /** * DOM reference of the title item's icon to be used for positioning. */ domRef: {type: "string"} } }, /** * The event is fired when the Locked button is pressed */ markLockedPress: { parameters: { /** * DOM reference of the lock item's icon to be used for positioning. */ domRef: {type: "string"} } }, /** * The event is fired when the unsaved changes button is pressed */ markChangesPress: { parameters: { /** * DOM reference of the changed item's icon to be used for positioning. * @since 1.34.0 */ domRef: {type: "string"} } } } } }); ObjectPageHeader.prototype._iAvailablePercentageForActions = 0.3; ObjectPageHeader.prototype.init = function () { if (!this.oLibraryResourceBundle) { this.oLibraryResourceBundle = sap.ui.getCore().getLibraryResourceBundle("sap.m"); // get resource translation bundle } if (!this.oLibraryResourceBundleOP) { this.oLibraryResourceBundleOP = library.i18nModel.getResourceBundle(); // get resource translation bundle } this._iREMSize = parseInt(jQuery("body").css("font-size"), 10); this._iOffset = parseInt(0.25 * this._iREMSize, 10); this._iScrollBarWidth = jQuery.position.scrollbarWidth(); // Overflow button this._oOverflowActionSheet = this._getInternalAggregation("_overflowActionSheet"); this._oOverflowButton = this._getInternalAggregation("_overflowButton").attachPress(this._handleOverflowButtonPress, this); this._oExpandButton = this._getInternalAggregation("_expandButton"); this._oActionSheetButtonMap = {}; this._oFlagIcon = this._getInternalAggregation("_flagIcon"); this._oFavIcon = this._getInternalAggregation("_favIcon"); this._oTitleArrowIcon = this._getInternalAggregation("_titleArrowIcon").attachPress(this._handleArrowPress, this); this._oTitleArrowIconCont = this._getInternalAggregation("_titleArrowIconCont").attachPress(this._handleArrowPress, this); this._oLockIcon = this._getInternalAggregation("_lockIcon").attachPress(this._handleLockPress, this); this._oLockIconCont = this._getInternalAggregation("_lockIconCont").attachPress(this._handleLockPress, this); this._oChangesIcon = this._getInternalAggregation("_changesIcon").attachPress(this._handleChangesPress, this); this._oChangesIconCont = this._getInternalAggregation("_changesIconCont").attachPress(this._handleChangesPress, this); }; ObjectPageHeader.prototype._handleOverflowButtonPress = function (oEvent) { this._oOverflowActionSheet.openBy(this._oOverflowButton); }; ObjectPageHeader.prototype._handleArrowPress = function (oEvent) { this.fireTitleSelectorPress({ domRef: oEvent.getSource().getDomRef() }); }; ObjectPageHeader.prototype._handleLockPress = function (oEvent) { this.fireMarkLockedPress({ domRef: oEvent.getSource().getDomRef() }); }; ObjectPageHeader.prototype._handleChangesPress = function (oEvent) { this.fireMarkChangesPress({ domRef: oEvent.getSource().getDomRef() }); }; ObjectPageHeader._internalAggregationFactory = { "_objectImage": function (oParent) { var oObjectImage, sObjectImageURI = oParent.getObjectImageURI(); if (sObjectImageURI.indexOf("sap-icon://") == 0) { oObjectImage = new Icon(); } else { oObjectImage = new Image({ densityAware: oParent.getObjectImageDensityAware(), alt: oParent.getObjectImageAlt(), decorative: false }); } oObjectImage.setSrc(sObjectImageURI); oObjectImage.addStyleClass("sapUxAPObjectPageHeaderObjectImage"); if (oParent.getObjectImageAlt()) { oObjectImage.setTooltip(oParent.getObjectImageAlt()); } return oObjectImage; }, "_overflowActionSheet": function () { return new ActionSheet({placement: sap.m.PlacementType.Bottom}); }, "_lockIconCont": function (oParent) { return this._getButton(oParent, "sap-icon://locked", "lock-cont"); }, "_breadCrumbs": function (oParent) { return new Breadcrumbs({ links: oParent.getAggregation("breadCrumbLinks") }); }, "_lockIcon": function (oParent) { return this._getButton(oParent, "sap-icon://locked", "lock", oParent.oLibraryResourceBundleOP.getText("TOOLTIP_OP_LOCK_MARK_VALUE")); }, "_titleArrowIconCont": function (oParent) { return this._getButton(oParent, "sap-icon://arrow-down", "titleArrow-cont", oParent.oLibraryResourceBundleOP.getText("OP_SELECT_ARROW_TOOLTIP")); }, "_titleArrowIcon": function (oParent) { return this._getButton(oParent, "sap-icon://arrow-down", "titleArrow", oParent.oLibraryResourceBundleOP.getText("OP_SELECT_ARROW_TOOLTIP")); }, "_favIcon": function (oParent) { return this._getIcon(oParent, "favorite", oParent.oLibraryResourceBundleOP.getText("TOOLTIP_OP_FAVORITE_MARK_VALUE")); }, "_flagIcon": function (oParent) { return this._getIcon(oParent, "flag", oParent.oLibraryResourceBundleOP.getText("TOOLTIP_OP_FLAG_MARK_VALUE")); }, "_overflowButton": function (oParent) { return this._getButton(oParent, "sap-icon://overflow", "overflow"); }, "_expandButton": function (oParent) { return this._getButton(oParent, "sap-icon://slim-arrow-down", "expand", oParent.oLibraryResourceBundleOP.getText("TOOLTIP_OP_EXPAND_HEADER_BTN")); }, "_changesIconCont": function (oParent) { return this._getButton(oParent, "sap-icon://request", "changes-cont", oParent.oLibraryResourceBundleOP.getText("TOOLTIP_OP_CHANGES_MARK_VALUE")); }, "_changesIcon": function (oParent) { return this._getButton(oParent, "sap-icon://request", "changes", oParent.oLibraryResourceBundleOP.getText("TOOLTIP_OP_CHANGES_MARK_VALUE")); }, _getIcon: function (oParent, sIcon, sTooltip) { return IconPool.createControlByURI({ id: this._getParentAugmentedId(oParent, sIcon), tooltip: sTooltip, src: IconPool.getIconURI(sIcon), visible: false }); }, _getButton: function (oParent, sIcon, sChildSignature, sTooltip) { return new Button({ id: this._getParentAugmentedId(oParent, sChildSignature), tooltip: sTooltip, icon: sIcon, type: sap.m.ButtonType.Transparent }); }, _getParentAugmentedId: function (oParent, sChildSignature) { return oParent.getId() + "-" + sChildSignature; } }; ObjectPageHeader.prototype._getInternalAggregation = function (sAggregationName) { if (!this.getAggregation(sAggregationName)) { this.setAggregation(sAggregationName, ObjectPageHeader._internalAggregationFactory[sAggregationName](this)); } return this.getAggregation(sAggregationName); }; ObjectPageHeader.prototype._applyActionProperty = function (sPropertyName, aArguments) { var newValue = aArguments[0]; if (this.getProperty(sPropertyName) !== newValue) { aArguments.unshift(sPropertyName); this.setProperty.apply(this, aArguments); this._notifyParentOfChanges(); } return this; }; ObjectPageHeader.prototype._applyObjectImageProperty = function (sPropertyName, aArguments) { var newValue = aArguments[0]; if (this.getProperty(sPropertyName) !== newValue) { aArguments.unshift(sPropertyName); this.setProperty.apply(this, aArguments); this._destroyObjectImage(); this._notifyParentOfChanges(); } return this; }; ObjectPageHeader.prototype._proxyMethodToBreadCrumbControl = function (sFuncName, aArguments) { var oBreadCrumbs = this._getInternalAggregation("_breadCrumbs"); return oBreadCrumbs[sFuncName].apply(oBreadCrumbs, aArguments); }; ObjectPageHeader.prototype.setHeaderDesign = function (sHeaderDesign) { this.setProperty("headerDesign", sHeaderDesign); if (this.getParent()) { this.getParent().invalidate(); // Force rerendering of ObjectPageLayout if the design change } return this; }; ObjectPageHeader.prototype._shiftHeaderTitle = function () { var oParent = this.getParent(), iHeaderOffset = 0, sStyleAttribute = sap.ui.getCore().getConfiguration().getRTL() ? "left" : "right", $actions = this.$().find(".sapUxAPObjectPageHeaderIdentifierActions"), bHasVerticalScroll = true, iActionsOffset = this._iOffset; if (typeof oParent._hasVerticalScrollBar === "function") { bHasVerticalScroll = oParent._hasVerticalScrollBar(); } if (sap.ui.Device.system.desktop) { iHeaderOffset = this._iScrollBarWidth; if (!bHasVerticalScroll) { iHeaderOffset = 0; iActionsOffset += this._iScrollBarWidth; } } $actions.css(sStyleAttribute, iActionsOffset + "px"); if (typeof oParent._shiftHeader === "function"){ oParent._shiftHeader(sStyleAttribute, iHeaderOffset + "px"); } }; /** * get current title and if it is different from the new one rerender the HeaderContent * @param {string} sTitle title string * @return {*} this */ ObjectPageHeader.prototype.setObjectTitle = function (sTitle) { return this._applyActionProperty("objectTitle", Array.prototype.slice.call(arguments)); }; var aPropertiesToOverride = ["objectSubtitle", "showTitleSelector", "markLocked", "markFavorite", "markFlagged", "showMarkers", "showPlaceholder", "markChanges"], aObjectImageProperties = ["objectImageURI", "objectImageAlt", "objectImageDensityAware", "objectImageShape"]; var fnGenerateSetter = function (sPropertyName) { var sConvertedSetterName = "set" + sPropertyName.charAt(0).toUpperCase() + sPropertyName.slice(1); ObjectPageHeader.prototype[sConvertedSetterName] = function () { var aArgumentsPassedToTheProperty = Array.prototype.slice.call(arguments); this._applyActionProperty.call(this, sPropertyName, aArgumentsPassedToTheProperty); }; }; var fnGenerateSetterForObjectImageProperties = function (sPropertyName) { var sConvertedSetterName = "set" + sPropertyName.charAt(0).toUpperCase() + sPropertyName.slice(1); ObjectPageHeader.prototype[sConvertedSetterName] = function () { var aArgumentsPassedToTheProperty = Array.prototype.slice.call(arguments); this._applyObjectImageProperty.call(this, sPropertyName, aArgumentsPassedToTheProperty); }; }; aPropertiesToOverride.forEach(fnGenerateSetter); aObjectImageProperties.forEach(fnGenerateSetterForObjectImageProperties); ObjectPageHeader.prototype.getBreadCrumbsLinks = function () { return this._getInternalAggregation("_breadCrumbs").getLinks(); }; ObjectPageHeader.prototype.addBreadCrumbLink = function () { return this._proxyMethodToBreadCrumbControl("addLink", arguments); }; ObjectPageHeader.prototype.indexOfBreadCrumbLink = function () { return this._proxyMethodToBreadCrumbControl("indexOfLink", arguments); }; ObjectPageHeader.prototype.insertBreadCrumbLink = function () { return this._proxyMethodToBreadCrumbControl("insertLink", arguments); }; ObjectPageHeader.prototype.removeBreadCrumbLink = function () { return this._proxyMethodToBreadCrumbControl("removeLink", arguments); }; ObjectPageHeader.prototype.removeAllBreadCrumbsLinks = function () { return this._proxyMethodToBreadCrumbControl("removeAllLinks", arguments); }; ObjectPageHeader.prototype.destroyBreadCrumbsLinks = function () { return this._proxyMethodToBreadCrumbControl("destroyLinks", arguments); }; ObjectPageHeader.prototype._destroyObjectImage = function () { var sObjectImage = "_objectImage", oObjectImage = this.getAggregation(sObjectImage); if (oObjectImage) { oObjectImage.destroy(); this.setAggregation(sObjectImage, null); } }; ObjectPageHeader.prototype.onBeforeRendering = function () { if (this.getShowPlaceholder()) { this._oPlaceholder = IconPool.createControlByURI({ src: IconPool.getIconURI("picture"), visible: true }); } var aActions = this.getActions() || []; this._oOverflowActionSheet.removeAllButtons(); this._oActionSheetButtonMap = {}; //display overflow if there are more than 1 item or only 1 item and it is showing its text if (aActions.length > 1 || this._hasOneButtonShowText(aActions)) { //create responsive equivalents of the provided controls jQuery.each(aActions, jQuery.proxy(function (iIndex, oAction) { // Force the design of the button to transparent if (oAction instanceof Button && oAction.getVisible()) { if (oAction instanceof Button && (oAction.getType() === "Default" || oAction.getType() === "Unstyled")) { oAction.setProperty("type", sap.m.ButtonType.Transparent, false); } var oActionSheetButton = this._createActionSheetButton(oAction); this._oActionSheetButtonMap[oAction.getId()] = oActionSheetButton; //store the originalId/reference for later use (adaptLayout) this._oOverflowActionSheet.addButton(oActionSheetButton); } }, this)); } this._oTitleArrowIcon.setVisible(this.getShowTitleSelector()); this._oFavIcon.setVisible(this.getMarkFavorite()); this._oFlagIcon.setVisible(this.getMarkFlagged()); this._attachDetachActionButtonsHandler(false); }; /** * "clone" the button provided by the app developer in order to create an equivalent for the actionsheet (displayed in overflowing scenarios) * @param {*} oButton the button to copy * @returns {sap.m.Button} the copied button * @private */ ObjectPageHeader.prototype._createActionSheetButton = function (oButton) { //copy binding if present var oCopy = new Button({ press: jQuery.proxy(this._onSeeMoreContentSelect, this), enabled: oButton.getEnabled(), customData: new CustomData({ key: "originalId", value: oButton.getId() }) }); //carry property & binding on text var oTextBinding = oButton.getBindingInfo("text"), oIconBinding = oButton.getBindingInfo("icon"), sModelName; if (oTextBinding && oTextBinding.parts && oTextBinding.parts.length > 0) { sModelName = oTextBinding.parts[0].model; //copy binding information oCopy.bindProperty("text", { path: oTextBinding.parts[0].path, model: sModelName, formatter: oTextBinding.formatter }); //handle relative binding scenarios oCopy.setBindingContext(oButton.getBindingContext(sModelName), sModelName); oCopy.setModel(oButton.getModel(sModelName), sModelName); } else { oCopy.setText(oButton.getText()); } //carry property & binding on icon if (oIconBinding && oIconBinding.parts && oIconBinding.parts.length > 0) { sModelName = oIconBinding.parts[0].model; //copy binding information oCopy.bindProperty("icon", { path: oIconBinding.parts[0].path, model: sModelName, formatter: oIconBinding.formatter }); //handle relative binding scenarios oCopy.setBindingContext(oButton.getBindingContext(sModelName), sModelName); oCopy.setModel(oButton.getModel(sModelName), sModelName); } else { oCopy.setIcon(oButton.getIcon()); } return oCopy; }; ObjectPageHeader.prototype.onAfterRendering = function () { this._adaptLayout(); if (this.getShowPlaceholder()) { jQuery(".sapUxAPObjectPageHeaderObjectImage").off("error").error(function () { jQuery(this).hide(); jQuery(".sapUxAPObjectPageHeaderPlaceholder").removeClass("sapUxAPHidePlaceholder"); }); } else { jQuery(".sapUxAPObjectPageHeaderObjectImage").off("error").error(function () { jQuery(this).addClass("sapMNoImg"); }); } if (!this._iResizeId) { this._iResizeId = ResizeHandler.register(this, this._onHeaderResize.bind(this)); } this._shiftHeaderTitle(); this._attachDetachActionButtonsHandler(true); }; ObjectPageHeader.prototype._onHeaderResize = function () { this._adaptLayout(); if (this.getParent() && typeof this.getParent()._adjustHeaderHeights === "function") { this.getParent()._adjustHeaderHeights(); } }; ObjectPageHeader.prototype._attachDetachActionButtonsHandler = function (bAttach) { var aActions = this.getActions() || []; if (aActions.length < 1) { return; } aActions.forEach(function (oAction) { if (oAction instanceof ObjectPageHeaderActionButton) { if (bAttach) { oAction.attachEvent("_change", this._adaptLayout, this); } else { oAction.detachEvent("_change", this._adaptLayout, this); } } }, this); }; ObjectPageHeader.prototype._onSeeMoreContentSelect = function (oEvent) { var oPressedButton = oEvent.getSource(), oOriginalControl = sap.ui.getCore().byId(oPressedButton.data("originalId")); //forward press event if (oOriginalControl.firePress) { //provide parameters in case the handlers wants to know where was the event fired from oOriginalControl.firePress({ overflowButtonId: this._oOverflowButton.getId() }); } this._oOverflowActionSheet.close(); }; ObjectPageHeader._actionImportanceMap = { "Low": 3, "Medium": 2, "High": 1 }; /** * Actions custom sorter function * @private */ ObjectPageHeader._sortActionsByImportance = function (oActionA, oActionB) { var sImportanceA = (oActionA instanceof ObjectPageHeaderActionButton) ? oActionA.getImportance() : sap.uxap.Importance.High, sImportanceB = (oActionB instanceof ObjectPageHeaderActionButton) ? oActionB.getImportance() : sap.uxap.Importance.High, iImportanceDifference = ObjectPageHeader._actionImportanceMap[sImportanceA] - ObjectPageHeader._actionImportanceMap[sImportanceB]; if (iImportanceDifference === 0) { return oActionA.position - oActionB.position; } return iImportanceDifference; }; ObjectPageHeader.prototype._hasOneButtonShowText = function (aActions) { var bOneButtonShowingText = false; if (aActions.length !== 1) { return bOneButtonShowingText; } if (aActions[0] instanceof ObjectPageHeaderActionButton) { bOneButtonShowingText = (!aActions[0].getHideText() && aActions[0].getText() != "" ); } else if (aActions[0] instanceof Button) { bOneButtonShowingText = (aActions[0].getText() != "" ); } return bOneButtonShowingText; }; /************************************************************************************* * Adapting ObjectPage image, title/subtitle container and actions container ************************************************************************************/ /** * Adapt title/subtitle container and action buttons and overflow button * @private */ ObjectPageHeader.prototype._adaptLayout = function () { var iIdentifierContWidth = this.$("identifierLine").width(), iActionsWidth = this._getActionsWidth(), // the width off all actions without hidden one iActionsContProportion = iActionsWidth / iIdentifierContWidth, // the percentage(proportion) that action buttons take from the available space iAvailableSpaceForActions = this._iAvailablePercentageForActions * iIdentifierContWidth, $overflowButton = this._oOverflowButton.$(), $actionButtons = this.$("actions").find(".sapMBtn").not(".sapUxAPObjectPageHeaderExpandButton"); if (iActionsContProportion > this._iAvailablePercentageForActions) { this._adaptActions(iAvailableSpaceForActions); } $actionButtons.css("visibility", "visible"); // verify overflow button visibility if ($actionButtons.filter(":visible").length === $actionButtons.length) { $overflowButton.hide(); } this._adaptObjectPageHeaderIndentifierLine(); }; /** * Adapt title/subtitle container and action buttons * @private */ ObjectPageHeader.prototype._adaptObjectPageHeaderIndentifierLine = function () { var iIdentifierContWidth = this.$("identifierLine").width(), $subtitle = this.$("subtitle"), $identifierLineContainer = this.$("identifierLineContainer"), iSubtitleBottom, iTitleBottom, iActionsAndImageWidth = this.$("actions").width() + this.$().find(".sapUxAPObjectPageHeaderObjectImageContainer").width(), iPixelTolerance = this.$().parents().hasClass('sapUiSizeCompact') ? 7 : 3; // the tolerance of pixels from which we can tell that the title and subtitle are on the same row if ($subtitle.length) { if ($subtitle.hasClass("sapOPHSubtitleBlock")) { $subtitle.removeClass("sapOPHSubtitleBlock"); } iSubtitleBottom = $subtitle.outerHeight() + $subtitle.position().top; iTitleBottom = this.$("innerTitle").outerHeight() + this.$("innerTitle").position().top; // check if subtitle is below the title and add it a display block class if (Math.abs(iSubtitleBottom - iTitleBottom) > iPixelTolerance) { $subtitle.addClass("sapOPHSubtitleBlock"); } } $identifierLineContainer.width((0.95 - (iActionsAndImageWidth / iIdentifierContWidth)) * 100 + "%"); }; /** * Show or hide action buttons depending on how much space is available * @private */ ObjectPageHeader.prototype._adaptActions = function (iAvailableSpaceForActions) { var bMobileScenario = jQuery("html").hasClass("sapUiMedia-Std-Phone") || Device.system.phone, iVisibleActionsWidth = this._oOverflowButton.$().show().width(), aActions = this.getActions(), iActionsLength = aActions.length, oActionSheetButton; for (var i = 0; i < iActionsLength; i++) { aActions[i].position = i; } aActions.sort(ObjectPageHeader._sortActionsByImportance); aActions.forEach(function (oAction) { oActionSheetButton = this._oActionSheetButtonMap[oAction.getId()]; //separators and non sap.m.Button or not visible buttons have no equivalent in the overflow if (oActionSheetButton) { iVisibleActionsWidth += oAction.$().width(); if (iAvailableSpaceForActions > iVisibleActionsWidth && !bMobileScenario) { oActionSheetButton.setVisible(false); } else { this._setActionButtonVisibility(oAction, false); } } }, this); }; /** * Set visibility of action button and the button in action sheet * @private */ ObjectPageHeader.prototype._setActionButtonVisibility = function (oAction, bVisible) { var oActionSheetButton = this._oActionSheetButtonMap[oAction.getId()]; //separators and non sap.m.Button or not visible buttons have no equivalent in the overflow if (oActionSheetButton) { if (bVisible) { oAction.$().show(); } else { oAction.$().hide(); } oActionSheetButton.setVisible(!bVisible); } }; /** * The sum of widths(+ margins) of all action buttons * @private */ ObjectPageHeader.prototype._getActionsWidth = function () { var iWidthSum = 0; this.getActions().forEach(function (oAction) { if (oAction instanceof Button) { oAction.$().show(); oAction.$().css("visibility", "hidden"); iWidthSum += oAction.$().outerWidth(true); } }); return iWidthSum; }; /*************************************************************************************/ /** * rerender the title in the ContentHeader if something in it is changed * @private */ ObjectPageHeader.prototype._notifyParentOfChanges = function () { if (this.getParent() && typeof this.getParent()._headerTitleChangeHandler === "function") { this.getParent()._headerTitleChangeHandler(); } }; /** * check if the ActionBar has padding on top, if not in case of rerendering of the control it has to be removed * @returns {boolean} * @private */ ObjectPageHeader.prototype._getActionsPaddingStatus = function () { return this.$("actions").hasClass("sapUxAPObjectPageHeaderIdentifierActionsNoPadding"); }; ObjectPageHeader.prototype._setActionsPaddingStatus = function (bShow) { return this.$("actions").toggleClass("sapUxAPObjectPageHeaderIdentifierActionsNoPadding", bShow); }; ObjectPageHeader.prototype.exit = function () { jQuery(".sapUxAPObjectPageHeaderObjectImage").off("error"); if (this._iResizeId) { ResizeHandler.deregister(this._iResizeId); } }; return ObjectPageHeader; }); }; // end of sap/uxap/ObjectPageHeader.js if ( !jQuery.sap.isDeclared('sap.uxap.ObjectPageLayoutABHelper') ) { /*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2016 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ jQuery.sap.declare('sap.uxap.ObjectPageLayoutABHelper'); // unresolved dependency added by SAPUI5 'AllInOne' Builder jQuery.sap.require('jquery.sap.global'); // unlisted dependency retained jQuery.sap.require('sap.ui.base.Metadata'); // unlisted dependency retained jQuery.sap.require('sap.ui.core.CustomData'); // unlisted dependency retained jQuery.sap.require('sap.m.Button'); // unlisted dependency retained jQuery.sap.require('sap.ui.core.IconPool'); // unlisted dependency retained sap.ui.define("sap/uxap/ObjectPageLayoutABHelper",[ "jquery.sap.global", "sap/ui/base/Metadata", "sap/ui/core/CustomData", "./AnchorBar", "sap/m/Button", "sap/ui/core/IconPool" ], function (jQuery, Metadata, CustomData, AnchorBar, Button, IconPool) { "use strict"; var ABHelper = Metadata.createClass("sap.uxap._helpers.AB", { /** * @private * @param {sap.uxap.ObjectPageLayout} oObjectPageLayout Object Page layout instance */ constructor: function (oObjectPageLayout) { this._oObjectPageLayout = oObjectPageLayout; this._iScrollDuration = oObjectPageLayout._iScrollToSectionDuration; } }); ABHelper.prototype.getObjectPageLayout = function () { return this._oObjectPageLayout; }; /** * Lazy loads the hidden Aggregation "_anchorBar" * @returns {sap.uxap.AnchorBar} AnchorBar * @private */ ABHelper.prototype._getAnchorBar = function () { var oAnchorBar = this.getObjectPageLayout().getAggregation("_anchorBar"); if (!oAnchorBar) { oAnchorBar = new AnchorBar({ showPopover: this.getObjectPageLayout().getShowAnchorBarPopover() }); this.getObjectPageLayout().setAggregation("_anchorBar", oAnchorBar); } return oAnchorBar; }; /** * build the anchorBar and all the anchorBar buttons * @private */ ABHelper.prototype._buildAnchorBar = function () { var aSections = this.getObjectPageLayout().getSections() || [], oAnchorBar = this._getAnchorBar(); //tablet & desktop mechanism if (oAnchorBar && this.getObjectPageLayout().getShowAnchorBar()) { oAnchorBar.removeAllContent(); //first level aSections.forEach(function (oSection) { if (!oSection.getVisible() || !oSection._getInternalVisible()) { return true; } var oButtonClone, aSubSections = oSection.getSubSections() || []; oButtonClone = this._buildAnchorBarButton(oSection, true); if (oButtonClone) { oAnchorBar.addContent(oButtonClone); //second Level aSubSections.forEach(function (oSubSection) { if (!oSubSection.getVisible() || !oSubSection._getInternalVisible()) { return; } var oButtonClone = this._buildAnchorBarButton(oSubSection, false); if (oButtonClone) { oAnchorBar.addContent(oButtonClone); } }, this); } }, this); } }; ABHelper.prototype._focusOnSectionWhenUsingKeyboard = function (oEvent) { var oSourceData = oEvent.srcControl.data(), oSection = sap.ui.getCore().byId(oSourceData.sectionId), oObjectPage = this.getObjectPageLayout(); if (oSection && !oSourceData.bHasSubMenu && !oObjectPage.getUseIconTabBar()) { jQuery.sap.delayedCall(this._iScrollDuration, oSection.$(), "focus"); } }; /** * build a sap.m.button equivalent to a section or sub section for insertion in the anchorBar * also registers the section info for further dom position updates * @param oSectionBase * @param bIsSection * @returns {null} * @private */ ABHelper.prototype._buildAnchorBarButton = function (oSectionBase, bIsSection) { var oButtonClone = null, oObjectPageLayout = this.getObjectPageLayout(), oButton, oSectionBindingInfo, sModelName, aSubSections = oSectionBase.getAggregation("subSections"), fnButtonKeyboardUseHandler = this._focusOnSectionWhenUsingKeyboard.bind(this), oEventDelegatesForkeyBoardHandler = { onsapenter: fnButtonKeyboardUseHandler, onsapspace: fnButtonKeyboardUseHandler }; if (oSectionBase.getVisible() && oSectionBase._getInternalVisible()) { oButton = oSectionBase.getCustomAnchorBarButton(); //by default we get create a button with the section title as text if (!oButton) { oButtonClone = new Button({ ariaDescribedBy: oSectionBase }); oButtonClone.addEventDelegate(oEventDelegatesForkeyBoardHandler); //has a ux rule been applied that we need to reflect here? if (oSectionBase._getInternalTitle() != "") { oButtonClone.setText(oSectionBase._getInternalTitle()); } else { //is the section title bound to a model? in this case we need to apply the same binding oSectionBindingInfo = oSectionBase.getBindingInfo("title"); if (oSectionBindingInfo && oSectionBindingInfo.parts && oSectionBindingInfo.parts.length > 0) { sModelName = oSectionBindingInfo.parts[0].model; //handle relative binding scenarios oButtonClone.setBindingContext(oSectionBase.getBindingContext(sModelName), sModelName); //copy binding information oButtonClone.bindProperty("text", { path: oSectionBindingInfo.parts[0].path, model: sModelName }); } else { //otherwise just copy the plain text oButtonClone.setText(oSectionBase.getTitle()); } } } else { oButtonClone = oButton.clone(); //keep original button parent control hierarchy } //update the section info oObjectPageLayout._oSectionInfo[oSectionBase.getId()].buttonId = oButtonClone.getId(); //the anchorBar needs to know the sectionId for automatic horizontal scrolling oButtonClone.addCustomData(new CustomData({ key: "sectionId", value: oSectionBase.getId() })); //the anchorBar needs to know whether the title is actually displayed or not (so the anchorBar is really reflecting the objactPage layout state) oButtonClone.addCustomData(new CustomData({ key: "bTitleVisible", value: oSectionBase._getInternalTitleVisible() })); if (!bIsSection) { //the anchorBar needs to know that this is a second section because it will handle responsive scenarios oButtonClone.addCustomData(new CustomData({ key: "secondLevel", value: true })); } if (aSubSections && aSubSections.length > 1) { // the anchor bar need to know if the button has submenu for accessibility rules oButtonClone.addCustomData(new CustomData({ key: "bHasSubMenu", value: true })); if (oObjectPageLayout.getShowAnchorBarPopover()) { // Add arrow icon-down in order to indicate that on click will open popover oButtonClone.setIcon(IconPool.getIconURI("slim-arrow-down")); oButtonClone.setIconFirst(false); } } } return oButtonClone; }; return ABHelper; }, /* bExport= */ false); }; // end of sap/uxap/ObjectPageLayoutABHelper.js if ( !jQuery.sap.isDeclared('sap.uxap.ObjectPageSection') ) { /*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2016 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ // Provides control sap.uxap.ObjectPageSection. jQuery.sap.declare('sap.uxap.ObjectPageSection'); // unresolved dependency added by SAPUI5 'AllInOne' Builder jQuery.sap.require('jquery.sap.global'); // unlisted dependency retained jQuery.sap.require('sap.ui.core.InvisibleText'); // unlisted dependency retained jQuery.sap.require('sap.ui.Device'); // unlisted dependency retained jQuery.sap.require('sap.m.Button'); // unlisted dependency retained sap.ui.define("sap/uxap/ObjectPageSection",[ "jquery.sap.global", "sap/ui/core/InvisibleText", "./ObjectPageSectionBase", "sap/ui/Device", "sap/m/Button", "./library" ], function (jQuery, InvisibleText, ObjectPageSectionBase, Device, Button, library) { "use strict"; /** * Constructor for a new ObjectPageSection. * * @param {string} [sId] id for the new control, generated automatically if no id is given * @param {object} [mSettings] initial settings for the new control * * @class * * An ObjectPageSection is the top-level information container of an Object page. Its purpose is to aggregate Subsections. * Disclaimer: This control is intended to be used only as part of the Object page layout * @extends sap.uxap.ObjectPageSectionBase * * @constructor * @public * @alias sap.uxap.ObjectPageSection * @since 1.26 * @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel */ var ObjectPageSection = ObjectPageSectionBase.extend("sap.uxap.ObjectPageSection", /** @lends sap.uxap.ObjectPageSection.prototype */ { metadata: { library: "sap.uxap", properties: { /** * Determines whether to display the Section title or not. */ showTitle: {type: "boolean", group: "Appearance", defaultValue: true}, /** * Determines whether the Section title is displayed in upper case. */ titleUppercase: {type: "boolean", group: "Appearance", defaultValue: true} }, defaultAggregation: "subSections", aggregations: { /** * The list of Subsections. */ subSections: {type: "sap.uxap.ObjectPageSubSection", multiple: true, singularName: "subSection"}, /** * Screen Reader ariaLabelledBy */ ariaLabelledBy: {type: "sap.ui.core.InvisibleText", multiple: false, visibility: "hidden"}, _showHideAllButton: {type: "sap.m.Button", multiple: false, visibility: "hidden"}, _showHideButton: {type: "sap.m.Button", multiple: false, visibility: "hidden"} }, associations: { /** * The most recently selected Subsection by the user. */ selectedSubSection: {type: "sap.uxap.ObjectPageSubSection", multiple: false} } } }); ObjectPageSection.MEDIA_RANGE = Device.media.RANGESETS.SAP_STANDARD; ObjectPageSection.prototype._expandSection = function () { ObjectPageSectionBase.prototype._expandSection.call(this) ._updateShowHideAllButton(!this._thereAreHiddenSubSections()); }; ObjectPageSection.prototype.init = function () { ObjectPageSectionBase.prototype.init.call(this); this._sContainerSelector = ".sapUxAPObjectPageSectionContainer"; Device.media.attachHandler(this._updateImportance, this, ObjectPageSection.MEDIA_RANGE); }; ObjectPageSection.prototype.exit = function () { Device.media.detachHandler(this._updateImportance, this, ObjectPageSection.MEDIA_RANGE); }; /** * Handler for key up - handle * @param oEvent - The event object */ ObjectPageSection.prototype.onkeyup = function (oEvent) { var eventTarget = sap.ui.getCore().byId(jQuery(oEvent.target).attr("id")); if (oEvent.keyCode === jQuery.sap.KeyCodes.TAB && eventTarget instanceof sap.uxap.ObjectPageSection && this._getObjectPageLayout()._isFirstSection(this)) { this._getObjectPageLayout().$("opwrapper").scrollTop(0); } }; ObjectPageSection.prototype._getImportanceLevelToHide = function (oCurrentMedia) { var oObjectPage = this._getObjectPageLayout(), oMedia = oCurrentMedia || Device.media.getCurrentRange(ObjectPageSection.MEDIA_RANGE), bShowOnlyHighImportance = oObjectPage && oObjectPage.getShowOnlyHighImportance(); return this._determineTheLowestLevelOfImportanceToShow(oMedia.name, bShowOnlyHighImportance); }; ObjectPageSection.prototype._updateImportance = function (oCurrentMedia) { var oObjectPage = this._getObjectPageLayout(), sImportanceLevelToHide = this._getImportanceLevelToHide(oCurrentMedia); this.getSubSections().forEach(function (oSubSection) { oSubSection._applyImportanceRules(sImportanceLevelToHide); }); this._applyImportanceRules(sImportanceLevelToHide); this._updateShowHideAllButton(false); if (oObjectPage && this.getDomRef()) { oObjectPage._adjustLayout(); } }; ObjectPageSection.prototype._determineTheLowestLevelOfImportanceToShow = function (sMedia, bShowOnlyHighImportance) { if (bShowOnlyHighImportance || sMedia === "Phone") { return library.Importance.High; } if (sMedia === "Tablet") { return library.Importance.Medium; } return library.Importance.Low; }; ObjectPageSection.prototype.connectToModels = function () { this.getSubSections().forEach(function (oSubSection) { oSubSection.connectToModels(); }); }; ObjectPageSection.prototype.onBeforeRendering = function () { var sAriaLabeledBy = "ariaLabelledBy"; if (!this.getAggregation(sAriaLabeledBy)) { this.setAggregation(sAriaLabeledBy, this._getAriaLabelledBy()); } this._updateImportance(); }; /** * provide a default aria-labeled by text * @private * @returns {*} sap.ui.core.InvisibleText */ ObjectPageSection.prototype._getAriaLabelledBy = function () { return new InvisibleText({ text: this._getInternalTitle() || this.getTitle() }).toStatic(); }; /** * set subsections focus rules * @private * @returns {*} this */ ObjectPageSection.prototype._setSubSectionsFocusValues = function () { var aSubSections = this.getSubSections() || [], sLastSelectedSubSectionId = this.getSelectedSubSection(), bPreselectedSection; if (aSubSections.length === 0) { return this; } if (aSubSections.length === 1) { aSubSections[0]._setToFocusable(false); return this; } aSubSections.forEach(function (oSubsection) { if (sLastSelectedSubSectionId === oSubsection.sId) { oSubsection._setToFocusable(true); bPreselectedSection = true; } else { oSubsection._setToFocusable(false); } }); if (!bPreselectedSection) { aSubSections[0]._setToFocusable(true); } return this; }; ObjectPageSection.prototype._disableSubSectionsFocus = function () { var aSubSections = this.getSubSections() || []; aSubSections.forEach(function (oSubsection) { oSubsection._setToFocusable(false); }); return this; }; ObjectPageSection.prototype._thereAreHiddenSubSections = function () { return this.getSubSections().some(function (oSubSection) { return oSubSection._getIsHidden(); }); }; ObjectPageSection.prototype._updateShowHideSubSections = function (bHide) { this.getSubSections().forEach(function (oSubSection) { if (bHide && oSubSection._shouldBeHidden()) { oSubSection._updateShowHideState(true); } else if (!bHide) { oSubSection._updateShowHideState(false); } }); }; ObjectPageSection.prototype._getShouldDisplayShowHideAllButton = function () { return this.getSubSections().some(function (oSubSection) { return oSubSection._shouldBeHidden(); }); }; ObjectPageSection.prototype._showHideContentAllContent = function () { var bShouldShowSubSections = this._thereAreHiddenSubSections(); if (this._getIsHidden() && bShouldShowSubSections) { this._updateShowHideState(false); } this._updateShowHideSubSections(!bShouldShowSubSections); this._updateShowHideAllButton(bShouldShowSubSections); }; ObjectPageSection.prototype._updateShowHideState = function (bHide) { this._updateShowHideButton(bHide); this._getShowHideAllButton().setVisible(this._getShouldDisplayShowHideAllButton()); return ObjectPageSectionBase.prototype._updateShowHideState.call(this, bHide); }; ObjectPageSection.prototype._updateShowHideAllButton = function (bHide) { this._getShowHideAllButton() .setVisible(this._getShouldDisplayShowHideAllButton()) .setText(this._getShowHideAllButtonText(bHide)); }; ObjectPageSection.prototype._getShowHideAllButton = function () { if (!this.getAggregation("_showHideAllButton")) { this.setAggregation("_showHideAllButton", new Button({ visible: this._getShouldDisplayShowHideAllButton(), text: this._getShowHideAllButtonText(!this._thereAreHiddenSubSections()), press: this._showHideContentAllContent.bind(this), type: sap.m.ButtonType.Transparent }).addStyleClass("sapUxAPSectionShowHideButton")); } return this.getAggregation("_showHideAllButton"); }; ObjectPageSection.prototype._getShowHideButtonText = function (bHide) { return library.i18nModel.getResourceBundle().getText(bHide ? "HIDE" : "SHOW"); }; ObjectPageSection.prototype._getShowHideAllButtonText = function (bHide) { return library.i18nModel.getResourceBundle().getText(bHide ? "HIDE_ALL" : "SHOW_ALL"); }; ObjectPageSection.prototype._updateShowHideButton = function (bHide) { this._getShowHideButton() .setVisible(this._shouldBeHidden()) .setText(this._getShowHideButtonText(!bHide)); }; ObjectPageSection.prototype._getShowHideButton = function () { if (!this.getAggregation("_showHideButton")) { this.setAggregation("_showHideButton", new Button({ visible: this._shouldBeHidden(), text: this._getShowHideButtonText(!this._getIsHidden()), press: this._showHideContent.bind(this), type: sap.m.ButtonType.Transparent }).addStyleClass("sapUxAPSectionShowHideButton")); } return this.getAggregation("_showHideButton"); }; return ObjectPageSection; }); }; // end of sap/uxap/ObjectPageSection.js if ( !jQuery.sap.isDeclared('sap.uxap.ObjectPageSubSection') ) { /*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2016 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ // Provides control sap.uxap.ObjectPageSubSection. jQuery.sap.declare('sap.uxap.ObjectPageSubSection'); // unresolved dependency added by SAPUI5 'AllInOne' Builder jQuery.sap.require('sap.ui.core.CustomData'); // unlisted dependency retained jQuery.sap.require('sap.ui.layout.Grid'); // unlisted dependency retained jQuery.sap.require('sap.uxap.ObjectPageSubSectionLayout'); // unlisted dependency retained jQuery.sap.require('sap.uxap.ObjectPageSubSectionMode'); // unlisted dependency retained jQuery.sap.require('sap.ui.layout.GridData'); // unlisted dependency retained jQuery.sap.require('sap.m.Button'); // unlisted dependency retained jQuery.sap.require('sap.ui.Device'); // unlisted dependency retained sap.ui.define("sap/uxap/ObjectPageSubSection",[ "sap/ui/core/CustomData", "sap/ui/layout/Grid", "./ObjectPageSectionBase", "./ObjectPageSubSectionLayout", "./ObjectPageSubSectionMode", "./BlockBase", "sap/ui/layout/GridData", "sap/m/Button", "sap/ui/Device", "./library" ], function (CustomData, Grid, ObjectPageSectionBase, ObjectPageSubSectionLayout, ObjectPageSubSectionMode, BlockBase, GridData, Button, Device, library) { "use strict"; /** * Constructor for a new ObjectPageSubSection. * * @param {string} [sId] id for the new control, generated automatically if no id is given * @param {object} [mSettings] initial settings for the new control * * @class * * An ObjectPageSubSection is the second-level information container of an Object page and may only be used within an Object page section. * Subsections may display primary information in the so called blocks aggregation (always visible) * and not-so-important information in the moreBlocks aggregation, whose content is initially hidden, but may be accessed via a See more (...) button. * Disclaimer: This control is intended to be used only as part of the Object page layout * @extends sap.uxap.ObjectPageSectionBase * * @constructor * @public * @alias sap.uxap.ObjectPageSubSection * @since 1.26 * @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel */ var ObjectPageSubSection = ObjectPageSectionBase.extend("sap.uxap.ObjectPageSubSection", /** @lends sap.uxap.ObjectPageSubSection.prototype */ { metadata: { library: "sap.uxap", properties: { /** * A mode property that will be passed to the controls in the blocks and moreBlocks aggregations. Only relevant if these aggregations use Object page blocks. */ mode: { type: "sap.uxap.ObjectPageSubSectionMode", group: "Appearance", defaultValue: ObjectPageSubSectionMode.Collapsed }, /** * Determines whether the Subsection title is displayed in upper case. */ titleUppercase: {type: "boolean", group: "Appearance", defaultValue: false} }, defaultAggregation: "blocks", aggregations: { /** * Internal grid aggregation */ _grid: {type: "sap.ui.core.Control", multiple: false, visibility: "hidden"}, /** * Controls to be displayed in the subsection */ blocks: {type: "sap.ui.core.Control", multiple: true, singularName: "block"}, /** * Additional controls to display when the Show more / See all / (...) button is pressed */ moreBlocks: {type: "sap.ui.core.Control", multiple: true, singularName: "moreBlock"}, /** * Actions available for this Subsection */ actions: {type: "sap.ui.core.Control", multiple: true, singularName: "action"} } } }); ObjectPageSubSection.MEDIA_RANGE = Device.media.RANGESETS.SAP_STANDARD; /** * @private */ ObjectPageSubSection.prototype.init = function () { ObjectPageSectionBase.prototype.init.call(this); //proxy public aggregations this._bRenderedFirstTime = false; this._aAggregationProxy = {blocks: [], moreBlocks: []}; //dom reference this._$spacer = []; this._sContainerSelector = ".sapUxAPBlockContainer"; //switch logic for the default mode this._switchSubSectionMode(this.getMode()); }; ObjectPageSubSection.prototype._expandSection = function () { ObjectPageSectionBase.prototype._expandSection.call(this); var oParent = this.getParent(); oParent && typeof oParent._expandSection === "function" && oParent._expandSection(); return this; }; ObjectPageSubSection.prototype._getGrid = function () { if (!this.getAggregation("_grid")) { this.setAggregation("_grid", new Grid({ id: this.getId() + "-innerGrid", defaultSpan: "XL12 L12 M12 S12", hSpacing: 1, vSpacing: 1, width: "100%", containerQuery: true })); } return this.getAggregation("_grid"); }; ObjectPageSubSection.prototype.connectToModels = function () { var aBlocks = this.getBlocks() || [], aMoreBlocks = this.getMoreBlocks() || [], sCurrentMode = this.getMode(); aBlocks.forEach(function (oBlock) { if (oBlock instanceof BlockBase) { if (!oBlock.getMode()) { oBlock.setMode(sCurrentMode); } oBlock.connectToModels(); } }); if (aMoreBlocks.length > 0 && sCurrentMode === ObjectPageSubSectionMode.Expanded) { aMoreBlocks.forEach(function (oMoreBlock) { if (oMoreBlock instanceof BlockBase) { if (!oMoreBlock.getMode()) { oMoreBlock.setMode(sCurrentMode); } oMoreBlock.connectToModels(); } }); } }; ObjectPageSubSection.prototype.exit = function () { if (this._oSeeMoreButton) { this._oSeeMoreButton.destroy(); this._oSeeMoreButton = null; } Device.media.detachHandler(this._updateImportance, this, ObjectPageSubSection.MEDIA_RANGE); Device.media.detachHandler(this._titleOnLeftSynchronizeLayouts, this, ObjectPageSubSection.MEDIA_RANGE); if (ObjectPageSectionBase.prototype.exit) { ObjectPageSectionBase.prototype.exit.call(this); } }; ObjectPageSubSection.prototype.onAfterRendering = function () { var oObjectPageLayout = this._getObjectPageLayout(); if (ObjectPageSectionBase.prototype.onAfterRendering) { ObjectPageSectionBase.prototype.onAfterRendering.call(this); } if (!oObjectPageLayout) { return; } if (this._getUseTitleOnTheLeft()) { Device.media.attachHandler(this._titleOnLeftSynchronizeLayouts, this, ObjectPageSubSection.MEDIA_RANGE); } else { Device.media.detachHandler(this._titleOnLeftSynchronizeLayouts, this, ObjectPageSubSection.MEDIA_RANGE); } this._$spacer = jQuery.sap.byId(oObjectPageLayout.getId() + "-spacer"); }; ObjectPageSubSection.prototype.onBeforeRendering = function () { if (ObjectPageSectionBase.prototype.onBeforeRendering) { ObjectPageSectionBase.prototype.onBeforeRendering.call(this); } this._setAggregationProxy(); this._getGrid().removeAllContent(); this._applyLayout(this._getObjectPageLayout()); this.refreshSeeMoreVisibility(); }; ObjectPageSubSection.prototype._applyLayout = function (oLayoutProvider) { var aVisibleBlocks, oGrid = this._getGrid(), sCurrentMode = this.getMode(), sLayout = oLayoutProvider.getSubSectionLayout(), oLayoutConfig = this._calculateLayoutConfiguration(sLayout, oLayoutProvider), aBlocks = this.getBlocks(), aAllBlocks = aBlocks.concat(this.getMoreBlocks()); this._oLayoutConfig = oLayoutConfig; this._resetLayoutData(aAllBlocks); //also add the more blocks defined for being visible in expanded mode only if (sCurrentMode === ObjectPageSubSectionMode.Expanded) { aVisibleBlocks = aAllBlocks; } else { aVisibleBlocks = aBlocks; } this._calcBlockColumnLayout(aVisibleBlocks, this._oLayoutConfig); try { aVisibleBlocks.forEach(function (oBlock) { this._setBlockMode(oBlock, sCurrentMode); oGrid.addContent(oBlock); }, this); } catch (sError) { jQuery.sap.log.error("ObjectPageSubSection :: error while building layout " + sLayout + ": " + sError); } return this; }; ObjectPageSubSection.prototype._calculateLayoutConfiguration = function (sLayout, oLayoutProvider) { var oLayoutConfig = {M: 2, L: 3, XL: 4}, iLargeScreenColumns = oLayoutConfig.L, iExtraLargeScreenColumns = oLayoutConfig.XL, bTitleOnTheLeft = (sLayout === ObjectPageSubSectionLayout.TitleOnLeft), bUseTwoColumnsOnLargeScreen = oLayoutProvider.getUseTwoColumnsForLargeScreen(); if (bTitleOnTheLeft) { iLargeScreenColumns -= 1; iExtraLargeScreenColumns -= 1; } if (bUseTwoColumnsOnLargeScreen) { iLargeScreenColumns -= 1; } oLayoutConfig.L = iLargeScreenColumns; oLayoutConfig.XL = iExtraLargeScreenColumns; return oLayoutConfig; }; ObjectPageSubSection.prototype.refreshSeeMoreVisibility = function () { var bBlockHasMore = !!this.getMoreBlocks().length, oSeeMoreControl = this._getSeeMoreButton(), $seeMoreControl = oSeeMoreControl.$(), $this = this.$(); if (!bBlockHasMore) { bBlockHasMore = this.getBlocks().some(function (oBlock) { //check if the block ask for the global see more the rule is //by default we don't display the see more //if one control is visible and ask for it then we display it if (oBlock instanceof BlockBase && oBlock.getVisible() && oBlock.getShowSubSectionMore()) { return true; } }); } //if the subsection is already rendered, don't rerender it all for showing a more button if ($this.length) { $this.toggleClass("sapUxAPObjectPageSubSectionWithSeeMore", bBlockHasMore); } this.toggleStyleClass("sapUxAPObjectPageSubSectionWithSeeMore", bBlockHasMore); if ($seeMoreControl.length) { $seeMoreControl.toggleClass("sapUxAPSubSectionSeeMoreButtonVisible", bBlockHasMore); } oSeeMoreControl.toggleStyleClass("sapUxAPSubSectionSeeMoreButtonVisible", bBlockHasMore); return bBlockHasMore; }; ObjectPageSubSection.prototype.setMode = function (sMode) { if (this.getMode() !== sMode) { this._switchSubSectionMode(sMode); if (this._bRenderedFirstTime) { this.rerender(); } } return this; }; /******************************************************************************* * Keyboard navigation ******************************************************************************/ /** * Handler for key down - handle * @param oEvent - The event object */ ObjectPageSubSection.prototype.onkeydown = function (oEvent) { // Filter F7 key down if (oEvent.keyCode === jQuery.sap.KeyCodes.F7) { oEvent.stopPropagation(); var oTarget = sap.ui.getCore().byId(oEvent.target.id); //define if F7 is pressed from SubSection itself or active element inside SubSection if (oTarget instanceof ObjectPageSubSection) { this._handleSubSectionF7(); } else { this._handleInteractiveElF7(); this._oLastFocusedControlF7 = oTarget; } } }; // It's used when F7 key is pressed and the focus is on interactive element ObjectPageSubSection.prototype._handleInteractiveElF7 = function () { //If there are more sub sections focus current subsection otherwise focus the parent section if (this.getParent().getSubSections().length > 1) { this.$().focus(); } else { this.getParent().$().focus(); } }; //It's used when F7 key is pressed and the focus is on SubSection ObjectPageSubSection.prototype._handleSubSectionF7 = function (oEvent) { if (this._oLastFocusedControlF7) { this._oLastFocusedControlF7.$().focus(); } else { this.$().firstFocusableDomRef().focus(); } }; /************************************************************************************* * generic block layout calculation ************************************************************************************/ /** * calculate the layout data to use for subsection blocks * Aligned with PUX specifications as of Oct 14, 2014 */ ObjectPageSubSection.prototype._calcBlockColumnLayout = function (aBlocks, oColumnConfig) { var iGridSize = 12, aVisibleBlocks, M, L, XL, aDisplaySizes; M = { iRemaining: oColumnConfig.M, iColumnConfig: oColumnConfig.M }; L = { iRemaining: oColumnConfig.L, iColumnConfig: oColumnConfig.L }; XL = { iRemaining: oColumnConfig.XL, iColumnConfig: oColumnConfig.XL }; aDisplaySizes = [XL, L, M]; //step 1: get only visible blocks into consideration aVisibleBlocks = aBlocks.filter(function (oBlock) { return oBlock.getVisible && oBlock.getVisible(); }); //step 2: set layout for each blocks based on their columnLayout configuration //As of Oct 14, 2014, the default behavior is: //on phone, blocks take always the full line //on tablet, desktop: //1 block on the line: takes 3/3 columns //2 blocks on the line: takes 1/3 columns then 2/3 columns //3 blocks on the line: takes 1/3 columns then 1/3 columns and last 1/3 columns aVisibleBlocks.forEach(function (oBlock, iIndex) { aDisplaySizes.forEach(function (oConfig) { oConfig.iCalculatedSize = this._calculateBlockSize(oBlock, oConfig.iRemaining, aVisibleBlocks, iIndex, oConfig.iColumnConfig); }, this); //set block layout based on resolution and break to a new line if necessary oBlock.setLayoutData(new GridData({ spanS: iGridSize, spanM: M.iCalculatedSize * (iGridSize / M.iColumnConfig), spanL: L.iCalculatedSize * (iGridSize / L.iColumnConfig), spanXL: XL.iCalculatedSize * (iGridSize / XL.iColumnConfig), linebreakM: (iIndex > 0 && M.iRemaining === M.iColumnConfig), linebreakL: (iIndex > 0 && L.iRemaining === L.iColumnConfig), linebreakXL: (iIndex > 0 && XL.iRemaining === XL.iColumnConfig) })); aDisplaySizes.forEach(function (oConfig) { oConfig.iRemaining -= oConfig.iCalculatedSize; if (oConfig.iRemaining < 1) { oConfig.iRemaining = oConfig.iColumnConfig; } }); }, this); return aVisibleBlocks; }; ObjectPageSubSection.prototype._calculateBlockSize = function (oBlock, iRemaining, aVisibleBlocks, iCurrentIndex, iMax) { var iCalc, iForewordBlocksToCheck = iMax, indexOffset; if (!this._hasAutoLayout(oBlock)) { return Math.min(iMax, parseInt(oBlock.getColumnLayout(), 10)); } for (indexOffset = 1; indexOffset <= iForewordBlocksToCheck; indexOffset++) { iCalc = this._calcLayout(aVisibleBlocks[iCurrentIndex + indexOffset]); if (iCalc < iRemaining) { iRemaining -= iCalc; } else { break; } } return iRemaining; }; ObjectPageSubSection.prototype._calcLayout = function (oBlock) { var iLayoutCols = 1; if (!oBlock) { iLayoutCols = 0; } else if (oBlock instanceof BlockBase && oBlock.getColumnLayout() != "auto") { iLayoutCols = parseInt(oBlock.getColumnLayout(), 10); } return iLayoutCols; }; ObjectPageSubSection.prototype._hasAutoLayout = function (oBlock) { return !(oBlock instanceof BlockBase) || oBlock.getColumnLayout() == "auto"; }; /************************************************************************************* * TitleOnLeft layout ************************************************************************************/ ObjectPageSubSection.prototype._onDesktopMediaRange = function (oCurrentMedia) { var oMedia = oCurrentMedia || Device.media.getCurrentRange(ObjectPageSubSection.MEDIA_RANGE); return ["LargeDesktop", "Desktop"].indexOf(oMedia.name) > -1; }; ObjectPageSubSection.prototype._titleOnLeftSynchronizeLayouts = function (oCurrentMedia) { this.$("header").toggleClass("titleOnLeftLayout", this._onDesktopMediaRange(oCurrentMedia)); }; /************************************************************************************* * blocks & moreBlocks aggregation proxy * getter and setters works with _aAggregationProxy instead of the blocks aggregation ************************************************************************************/ ObjectPageSubSection.prototype._setAggregationProxy = function () { if (this._bRenderedFirstTime) { return; } //empty real aggregations and feed internal ones at first rendering only jQuery.each(this._aAggregationProxy, jQuery.proxy(function (sAggregationName, aValue) { this._setAggregation(sAggregationName, this.removeAllAggregation(sAggregationName)); }, this)); this._bRenderedFirstTime = true; }; ObjectPageSubSection.prototype.hasProxy = function (sAggregationName) { return this._bRenderedFirstTime && this._aAggregationProxy.hasOwnProperty(sAggregationName); }; ObjectPageSubSection.prototype._getAggregation = function (sAggregationName) { return this._aAggregationProxy[sAggregationName]; }; ObjectPageSubSection.prototype._setAggregation = function (sAggregationName, aValue) { this._aAggregationProxy[sAggregationName] = aValue; this._notifyObjectPageLayout(); this.invalidate(); return this._aAggregationProxy[sAggregationName]; }; ObjectPageSubSection.prototype.addAggregation = function (sAggregationName, oObject) { var aAggregation; if (this.hasProxy(sAggregationName)) { aAggregation = this._getAggregation(sAggregationName); aAggregation.push(oObject); this._setAggregation(aAggregation); if (oObject instanceof BlockBase) { oObject.setParent(this); //let the block know of its parent subsection } return this; } return ObjectPageSectionBase.prototype.addAggregation.apply(this, arguments); }; ObjectPageSubSection.prototype.insertAggregation = function (sAggregationName, oObject, iIndex) { if (this.hasProxy(sAggregationName)) { jQuery.sap.log.warning("ObjectPageSubSection :: used of insertAggregation for " + sAggregationName + " is not supported, will use addAggregation instead"); return this.addAggregation(sAggregationName, oObject); } return ObjectPageSectionBase.prototype.insertAggregation.apply(this, arguments); }; ObjectPageSubSection.prototype.removeAllAggregation = function (sAggregationName) { var aInternalAggregation; if (this.hasProxy(sAggregationName)) { aInternalAggregation = this._getAggregation(sAggregationName); this._setAggregation(sAggregationName, []); return aInternalAggregation.slice(); } return ObjectPageSectionBase.prototype.removeAllAggregation.apply(this, arguments); }; ObjectPageSubSection.prototype.removeAggregation = function (sAggregationName, oObject) { var bRemoved = false, aInternalAggregation; if (this.hasProxy(sAggregationName)) { aInternalAggregation = this._getAggregation(sAggregationName); aInternalAggregation.forEach(function (oObjectCandidate, iIndex) { if (oObjectCandidate.getId() === oObject.getId()) { aInternalAggregation.splice(iIndex, 1); this._setAggregation(aInternalAggregation); bRemoved = true; } return !bRemoved; }, this); return (bRemoved ? oObject : null); } return ObjectPageSectionBase.prototype.removeAggregation.apply(this, arguments); }; ObjectPageSubSection.prototype.indexOfAggregation = function (sAggregationName, oObject) { var iIndexFound = -1; if (this.hasProxy(sAggregationName)) { this._getAggregation(sAggregationName).some(function (oObjectCandidate, iIndex) { if (oObjectCandidate.getId() === oObject.getId()) { iIndexFound = iIndex; return true; } }, this); return iIndexFound; } return ObjectPageSectionBase.prototype.indexOfAggregation.apply(this, arguments); }; ObjectPageSubSection.prototype.getAggregation = function (sAggregationName) { if (this.hasProxy(sAggregationName)) { return this._getAggregation(sAggregationName); } return ObjectPageSectionBase.prototype.getAggregation.apply(this, arguments); }; ObjectPageSubSection.prototype.destroyAggregation = function (sAggregationName) { if (this.hasProxy(sAggregationName)) { this._getAggregation(sAggregationName).forEach(function (object) { object.destroy(); }); this._setAggregation(sAggregationName, []); return this; } return ObjectPageSectionBase.prototype.destroyAggregation.apply(this, arguments); }; /************************************************************************************* * Private section : should overridden with care ************************************************************************************/ /** * build the control that will used internally for the see more / see less * @private */ ObjectPageSubSection.prototype._getSeeMoreButton = function () { if (!this._oSeeMoreButton) { this._oSeeMoreButton = new Button(this.getId() + "--seeMore", { type: sap.m.ButtonType.Transparent, iconFirst: false }).addStyleClass("sapUxAPSubSectionSeeMoreButton").attachPress(this._seeMoreLessControlPressHandler, this); } return this._oSeeMoreButton; }; /** * called when a user clicks on the see more or see all button * @param oEvent * @private */ ObjectPageSubSection.prototype._seeMoreLessControlPressHandler = function (oEvent) { var sCurrentMode = this.getMode(), sTargetMode, aMoreBlocks = this.getMoreBlocks() || []; //we just switch the layoutMode for the underlying blocks if (sCurrentMode === ObjectPageSubSectionMode.Expanded) { sTargetMode = ObjectPageSubSectionMode.Collapsed; } else {/* we are in Collapsed */ sTargetMode = ObjectPageSubSectionMode.Expanded; aMoreBlocks.forEach(function (oBlock) { if (oBlock instanceof BlockBase) { oBlock.setMode(sCurrentMode); oBlock.connectToModels(); } }, this); } this._switchSubSectionMode(sTargetMode); //in case of the last subsection of an objectpage we need to compensate its height change while rerendering) if (this._$spacer.length > 0) { this._$spacer.height(this._$spacer.height() + this.$().height()); } //need to re-render the subsection in order to render all the blocks with the appropriate mode & layout //0000811842 2014 this.rerender(); }; /** * switch the state for the subsection * @param sSwitchToMode * @private */ ObjectPageSubSection.prototype._switchSubSectionMode = function (sSwitchToMode) { sSwitchToMode = this.validateProperty("mode", sSwitchToMode); if (sSwitchToMode === ObjectPageSubSectionMode.Collapsed) { this.setProperty("mode", ObjectPageSubSectionMode.Collapsed, true); this._getSeeMoreButton().setText(library.i18nModel.getResourceBundle().getText("SEE_MORE")); } else { this.setProperty("mode", ObjectPageSubSectionMode.Expanded, true); this._getSeeMoreButton().setText(library.i18nModel.getResourceBundle().getText("SEE_LESS")); } }; /** * set the mode on a control if there is such mode property * @param oBlock * @param sMode * @private */ ObjectPageSubSection.prototype._setBlockMode = function (oBlock, sMode) { if (oBlock instanceof BlockBase) { oBlock.setMode(sMode); } else { jQuery.sap.log.debug("ObjectPageSubSection :: cannot propagate mode " + sMode + " to " + oBlock.getMetadata().getName()); } }; ObjectPageSubSection.prototype._setToFocusable = function (bFocusable) { var sFocusable = '0', sNotFocusable = '-1', sTabIndex = "tabIndex"; if (bFocusable) { this.$().attr(sTabIndex, sFocusable); } else { this.$().attr(sTabIndex, sNotFocusable); } return this; }; ObjectPageSubSection.prototype._getUseTitleOnTheLeft = function () { var oObjectPageLayout = this._getObjectPageLayout(); return oObjectPageLayout.getSubSectionLayout() === ObjectPageSubSectionLayout.TitleOnLeft; }; /** * If this is the first rendering and a layout has been defined by the subsection developer, * We remove it and let the built-in mechanism decide on the layouting aspects * @param aBlocks * @private */ ObjectPageSubSection.prototype._resetLayoutData = function (aBlocks) { aBlocks.forEach(function (oBlock) { if (!this._bRenderedFirstTime && oBlock.getLayoutData()) { oBlock.destroyLayoutData(); jQuery.sap.log.warning("ObjectPageSubSection :: forbidden use of layoutData for block " + oBlock.getMetadata().getName(), "layout will be set by subSection"); } }, this); }; ObjectPageSubSection.prototype.getVisibleBlocksCount = function () { var iVisibleBlocks = 0; (this.getBlocks() || []).forEach(function (oBlock) { if (oBlock.getVisible && !oBlock.getVisible()) { return true; } iVisibleBlocks++; }); (this.getMoreBlocks() || []).forEach(function (oMoreBlock) { if (oMoreBlock.getVisible && !oMoreBlock.getVisible()) { return true; } iVisibleBlocks++; }); return iVisibleBlocks; }; return ObjectPageSubSection; }); }; // end of sap/uxap/ObjectPageSubSection.js if ( !jQuery.sap.isDeclared('sap.uxap.component.ObjectPageLayoutUXDrivenFactory.controller') ) { /*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2016 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ jQuery.sap.declare('sap.uxap.component.ObjectPageLayoutUXDrivenFactory.controller'); // unresolved dependency added by SAPUI5 'AllInOne' Builder jQuery.sap.require('sap.ui.layout.GridData'); // unlisted dependency retained jQuery.sap.require('sap.ui.model.BindingMode'); // unlisted dependency retained jQuery.sap.require('sap.ui.model.Context'); // unlisted dependency retained jQuery.sap.require('sap.ui.base.ManagedObject'); // unlisted dependency retained jQuery.sap.require('sap.ui.core.mvc.Controller'); // unlisted dependency retained sap.ui.define("sap/uxap/component/ObjectPageLayoutUXDrivenFactory.controller",[ "sap/ui/layout/GridData", "sap/ui/model/BindingMode", "sap/uxap/BlockBase", "sap/uxap/ModelMapping", "sap/ui/model/Context", "sap/ui/base/ManagedObject", "sap/ui/core/mvc/Controller" ], function (GridData, BindingMode, BlockBase, ModelMapping, Context, ManagedObject, Controller) { "use strict"; return Controller.extend("sap.uxap.component.ObjectPageLayoutUXDrivenFactory", { /** * injects the header based on configuration * @param {object} oModel model instanse */ connectToComponent: function (oModel) { var bHasPendingRequest = jQuery.isEmptyObject(oModel.getData()); //ensure a 1 way binding otherwise it cause any block property change to update the entire subSections oModel.setDefaultBindingMode(BindingMode.OneWay); var fnHeaderFactory = jQuery.proxy(function () { if (bHasPendingRequest) { oModel.detachRequestCompleted(fnHeaderFactory); } var oHeaderTitleContext = new Context(oModel, "/headerTitle"), oObjectPageLayout = this.getView().byId("ObjectPageLayout"); //create the header title if provided in the config if (oHeaderTitleContext.getProperty("")) { try { //retrieve the header class this._oHeader = this.controlFactory(oObjectPageLayout.getId(), oHeaderTitleContext); oObjectPageLayout.setHeaderTitle(this._oHeader); } catch (sError) { jQuery.sap.log.error("ObjectPageLayoutFactory :: error in header creation from config: " + sError); } } }, this); //if data are not there yet, we wait for them if (bHasPendingRequest) { oModel.attachRequestCompleted(fnHeaderFactory); } else { //otherwise we apply the header factory immediately fnHeaderFactory(); } }, /** * generates a control to be used in actions, blocks or moreBlocks aggregations * known issue: bindings are not applied, the control is built with data only * @param {string} sParentId the Id of the parent * @param {object} oBindingContext binding context * @returns {*} new control */ controlFactory: function (sParentId, oBindingContext) { var oControlInfo = oBindingContext.getProperty(""), oControl, oControlClass, oControlMetadata; try { //retrieve the block class jQuery.sap.require(oControlInfo.Type); oControlClass = jQuery.sap.getObject(oControlInfo.Type); oControlMetadata = oControlClass.getMetadata(); //pre-processing: substitute event handler as strings by their function instance jQuery.each(oControlMetadata._mAllEvents, jQuery.proxy(function (sEventName, oEventProperties) { if (typeof oControlInfo[sEventName] == "string") { oControlInfo[sEventName] = this.convertEventHandler(oControlInfo[sEventName]); } }, this)); //creates the control with control info = create with provided properties oControl = ManagedObject.create(oControlInfo); //post-processing: bind properties on the objectPageLayoutMetadata model jQuery.each(oControlMetadata._mAllProperties, jQuery.proxy(function (sPropertyName, oProperty) { if (oControlInfo[sPropertyName]) { oControl.bindProperty(sPropertyName, "objectPageLayoutMetadata>" + oBindingContext.getPath() + "/" + sPropertyName); } }, this)); } catch (sError) { jQuery.sap.log.error("ObjectPageLayoutFactory :: error in control creation from config: " + sError); } return oControl; }, /** * determine the static function to use from its name * @param {string} sStaticHandlerName the name of the handler * @returns {*|window|window} function */ convertEventHandler: function (sStaticHandlerName) { var fnNameSpace = window, aNameSpaceParts = sStaticHandlerName.split('.'); try { jQuery.each(aNameSpaceParts, function (iIndex, sNameSpacePart) { fnNameSpace = fnNameSpace[sNameSpacePart]; }); } catch (sError) { jQuery.sap.log.error("ObjectPageLayoutFactory :: undefined event handler: " + sStaticHandlerName + ". Did you forget to require its static class?"); fnNameSpace = undefined; } return fnNameSpace; } }); }, /* bExport= */ true); }; // end of sap/uxap/component/ObjectPageLayoutUXDrivenFactory.controller.js if ( !jQuery.sap.isDeclared('sap.uxap.LazyLoading') ) { /*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2016 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ jQuery.sap.declare('sap.uxap.LazyLoading'); // unresolved dependency added by SAPUI5 'AllInOne' Builder jQuery.sap.require('jquery.sap.global'); // unlisted dependency retained jQuery.sap.require('sap.ui.Device'); // unlisted dependency retained jQuery.sap.require('sap.ui.base.Metadata'); // unlisted dependency retained sap.ui.define("sap/uxap/LazyLoading",["jquery.sap.global", "sap/ui/Device", "sap/ui/base/Metadata", "./ObjectPageSubSection"], function (jQuery, Device, Metadata, ObjectPageSubSection) { "use strict"; var LazyLoading = Metadata.createClass("sap.uxap._helpers.LazyLoading", { /** * @private * @param {*} oObjectPageLayout Object Layout instance */ constructor: function (oObjectPageLayout) { this._oObjectPageLayout = oObjectPageLayout; this._$html = jQuery("html"); this._iPreviousScrollTop = 0; //scroll top of the last scroll event this._iScrollProgress = 0; //progress done between the 2 last scroll events this._iPreviousScrollTimestamp = 0; //Timestamp of the last scroll event this._sLazyLoadingTimer = null; this.setLazyLoadingParameters(); } }); /** * Set the lazy loading tuning parameters. */ LazyLoading.prototype.setLazyLoadingParameters = function () { //delay before loading data for visible sub-sections //this delay avoid loading data for every subsections during scroll this.LAZY_LOADING_DELAY = 200; //ms. //lazy loading fine tuning //An extra non visible subsection will be loaded if the the top of this subsection is at //no more than LAZY_LOADING_EXTRA_PAGE_SIZE * page height from the the bottom of the page. this.LAZY_LOADING_EXTRA_PAGE_SIZE = 0.5; //number of subsections which should be preloaded : // - FirstRendering : for first loading // - ScrollToSection : default value when scrolling to a subsection if (this._isPhone()) { this.NUMBER_OF_SUBSECTIONS_TO_PRELOAD = {"FirstRendering": 1, "ScrollToSection": 1}; } else if (this._isTablet()) { //on tablet scrolling may be slow. this.NUMBER_OF_SUBSECTIONS_TO_PRELOAD = {"FirstRendering": 2, "ScrollToSection": 1}; } else if (this._isTabletSize()) { //Desktop with a "tablet" window size this.NUMBER_OF_SUBSECTIONS_TO_PRELOAD = {"FirstRendering": 2, "ScrollToSection": 2}; } else { this.NUMBER_OF_SUBSECTIONS_TO_PRELOAD = {"FirstRendering": 3, "ScrollToSection": 3}; } //Threshold beyond which we consider that user is scrolling fast and thus that lazy loading must be differed. //(percentage of the pageheight). this.LAZY_LOADING_FAST_SCROLLING_THRESHOLD = 5; }; LazyLoading.prototype.lazyLoadDuringScroll = function (iScrollTop, timeStamp, iPageHeight) { var iProgressPercentage, iDelay, bFastScrolling = false; this._iScrollProgress = iScrollTop - this._iPreviousScrollTop; iProgressPercentage = Math.round(Math.abs(this._iScrollProgress) / iPageHeight * 100); if (iProgressPercentage >= this.LAZY_LOADING_FAST_SCROLLING_THRESHOLD) { bFastScrolling = true; } this._iPreviousScrollTop = iScrollTop; this._iPreviousScrollTimestamp = timeStamp || 0; iDelay = (iScrollTop === 0 ) ? 0 : this.LAZY_LOADING_DELAY; //if we are scrolling fast, clear the previous delayed lazy loading call if any //as we don't want to load intermediate subsections which are visible only //during a brief moment during scroll. if (bFastScrolling && this._sLazyLoadingTimer) { jQuery.sap.log.debug("ObjectPageLayout :: lazyLoading", "delayed by " + iDelay + " ms because of fast scroll"); jQuery.sap.clearDelayedCall(this._sLazyLoadingTimer); this._sLazyLoadingTimer = null; } //If there's no delayed lazy loading call, create a new one. if (!this._sLazyLoadingTimer) { this._sLazyLoadingTimer = jQuery.sap.delayedCall(iDelay, this, this.doLazyLoading); } }; LazyLoading.prototype.doLazyLoading = function () { var oHeightParams = this._oObjectPageLayout._getHeightRelatedParameters(), oSectionInfo = this._oObjectPageLayout._oSectionInfo, iScrollTop, iScrollPageBottom, iPageHeight, bShouldStick = this._iPreviousScrollTop >= (oHeightParams.iHeaderContentHeight), // iHeaderContentHeight sExtraSubSectionId, iExtraSubSectionTop = -1, oSubSectionsToLoad = {}, iTimeDifference, bOnGoingScroll, iShift; //calculate the limit of visible sections to be lazy loaded iPageHeight = ( oHeightParams.iScreenHeight /* the total screen height */ - (bShouldStick ? oHeightParams.iAnchorBarHeight : 0) /* minus the part taken by the anchor bar (when sticky)*/ - (bShouldStick ? oHeightParams.iHeaderTitleHeightStickied : 0) /* minus the part taken by the header title (mandatory) */ ); iScrollTop = oHeightParams.iScrollTop; //we consider that the scroll is still ongoing if: // - a scroll event has been received for less than half of the LAZY_LOADING_DELAY (100 ms) // - progress done between the last 2 scroll event is greater than 5 pixels. iTimeDifference = Date.now() - this._iPreviousScrollTimestamp; bOnGoingScroll = (iTimeDifference < (this.LAZY_LOADING_DELAY / 2) ) && (Math.abs(this._iScrollProgress) > 5); // if scroll is ongoing, we shift the pages top and height to: // - avoid loading subsections which will likely no more be visible at the end of scroll // (Next lazyLoading calls will anyway load them if they are still visible at the end of scroll) // - load in advance subsections which will likely be visible at the end of scroll if (bOnGoingScroll) { if (this._iScrollProgress >= 0) { iShift = Math.round(Math.min(this._iScrollProgress * 20, iPageHeight / 2)); } else { iShift = -1 * Math.round(Math.min(Math.abs(this._iScrollProgress) * 20, iPageHeight / 2)); } iScrollTop += iShift; jQuery.sap.log.debug("ObjectPageLayout :: lazyLoading", "Visible page shifted from : " + iShift); } iScrollPageBottom = iScrollTop + iPageHeight; //the bottom limit //don't load subsections which are hardly visible at the top of the page (less than 16 pixels visible) //to avoid having the following subsections moving downward as subsection size will likely increase during loading iScrollTop += 16; //check the visible subsections //only consider subsections not yet loaded jQuery.each(oSectionInfo, jQuery.proxy(function (sId, oInfo) { // on desktop/tablet, find a section, not a subsection if (!oInfo.isSection && !oInfo.loaded && oInfo.sectionReference.getParent().getVisible()) { // 1D segment intersection between visible page and current sub section // C <= B and A <= D -> intersection // A-----B // C---D // C----D // C-D // C-----------D if (oInfo.positionTop <= iScrollPageBottom && iScrollTop < oInfo.positionBottom - 1) { oSubSectionsToLoad[sId] = sId; // Lazy loading will add an extra subsection : // the first (highest) subsection not yet visible (and not yet loaded) // top of this subsection must be close from page bottom (less than 0.5 page : LAZY_LOADING_EXTRA_PAGE_SIZE) } else if (oInfo.positionTop > iScrollPageBottom && oInfo.positionTop < iScrollPageBottom + iPageHeight * this.LAZY_LOADING_EXTRA_PAGE_SIZE && (iExtraSubSectionTop == -1 || oInfo.positionTop < iExtraSubSectionTop)) { iExtraSubSectionTop = oInfo.positionTop; sExtraSubSectionId = sId; } } }, this)); //add the extra subsection if: // - we have found one // - we have no visible subsections to load if (iExtraSubSectionTop != -1 && jQuery.isEmptyObject(oSubSectionsToLoad)) { jQuery.sap.log.debug("ObjectPageLayout :: lazyLoading", "extra section added : " + sExtraSubSectionId); oSubSectionsToLoad[sExtraSubSectionId] = sExtraSubSectionId; } //Load the subsections jQuery.each(oSubSectionsToLoad, jQuery.proxy(function (idx, sSectionId) { jQuery.sap.log.debug("ObjectPageLayout :: lazyLoading", "connecting " + sSectionId); sap.ui.getCore().byId(sSectionId).connectToModels(); oSectionInfo[sSectionId].loaded = true; }, this)); if (bOnGoingScroll) { //bOnGoingScroll is just a prediction, we can't be 100% sure as there's no end-of-scroll event //so we relaunch a new delayed lazy loading to ensure all visible //sections will actually be loaded (no shift) if scroll stops suddenly. this._sLazyLoadingTimer = jQuery.sap.delayedCall(this.LAZY_LOADING_DELAY, this, this.doLazyLoading); } else { if (iExtraSubSectionTop) { //An extra subsection has been found //relaunch a delayed lazy loading call to check if there's another extra subsection to load //We use a long delay (5* LAZY_LOADING_DELAY) to wait for current loading completion. this._sLazyLoadingTimer = jQuery.sap.delayedCall(5 * this.LAZY_LOADING_DELAY, this, this.doLazyLoading); } else { //reset the lazy loading timer this._sLazyLoadingTimer = null; } } }; /** * Load in advance the subsections which will likely be visible once the operation (firstRendering or scrolltoSection) * will be complete. * @private * @param {*} aAllSections all sections * @param {*} sId id of the section * @returns {*} sections to preload */ LazyLoading.prototype.getSubsectionsToPreload = function (aAllSections, sId) { var iSubsectionsToPreLoad, bTargetSubsectionReached; //if no sId, target section is the first section (first rendering). if (sId) { iSubsectionsToPreLoad = this.NUMBER_OF_SUBSECTIONS_TO_PRELOAD.ScrollToSection; bTargetSubsectionReached = false; } else { iSubsectionsToPreLoad = this.NUMBER_OF_SUBSECTIONS_TO_PRELOAD.FirstRendering; bTargetSubsectionReached = true; } var aSectionsToPreload = []; aAllSections.some(function (oSection) { if (!bTargetSubsectionReached && sId) { bTargetSubsectionReached = oSection.getId() == sId; } if (bTargetSubsectionReached && oSection instanceof ObjectPageSubSection) { if (oSection.getVisible() && oSection._getInternalVisible()) { aSectionsToPreload.push(oSection); iSubsectionsToPreLoad--; } } return iSubsectionsToPreLoad <= 0; }); return aSectionsToPreload; }; LazyLoading.prototype._isPhone = function () { return this._$html.hasClass("sapUiMedia-Std-Phone") || Device.system.phone; }; LazyLoading.prototype._isTablet = function () { return Device.system.tablet; }; LazyLoading.prototype._isTabletSize = function () { return this._$html.hasClass("sapUiMedia-Std-Tablet"); }; return LazyLoading; }, /* bExport= */ false); }; // end of sap/uxap/LazyLoading.js if ( !jQuery.sap.isDeclared('sap.uxap.ObjectPageLayout') ) { /*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2016 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ // Provides control sap.uxap.ObjectPageLayout. jQuery.sap.declare('sap.uxap.ObjectPageLayout'); // unresolved dependency added by SAPUI5 'AllInOne' Builder jQuery.sap.require('jquery.sap.global'); // unlisted dependency retained jQuery.sap.require('sap.ui.core.ResizeHandler'); // unlisted dependency retained jQuery.sap.require('sap.ui.core.Control'); // unlisted dependency retained jQuery.sap.require('sap.ui.core.CustomData'); // unlisted dependency retained jQuery.sap.require('sap.ui.Device'); // unlisted dependency retained jQuery.sap.require('sap.ui.core.delegate.ScrollEnablement'); // unlisted dependency retained jQuery.sap.require('sap.uxap.ObjectPageSubSectionLayout'); // unlisted dependency retained sap.ui.define("sap/uxap/ObjectPageLayout",[ "jquery.sap.global", "sap/ui/core/ResizeHandler", "sap/ui/core/Control", "sap/ui/core/CustomData", "sap/ui/Device", "sap/ui/core/delegate/ScrollEnablement", "./ObjectPageSubSection", "./ObjectPageSubSectionLayout", "./LazyLoading", "./ObjectPageLayoutABHelper", "./library" ], function (jQuery, ResizeHandler, Control, CustomData, Device, ScrollEnablement, ObjectPageSubSection, ObjectPageSubSectionLayout, LazyLoading, ABHelper, library) { "use strict"; /** * Constructor for a new ObjectPageLayout. * * @param {string} [sId] id for the new control, generated automatically if no id is given * @param {object} [mSettings] initial settings for the new control * * @class * An ObjectPageLayout is the layout control, used to put together all parts of an Object page - Header, Navigation bar and Sections/Subsections. * @extends sap.ui.core.Control * * @author SAP SE * * @constructor * @public * @alias sap.uxap.ObjectPageLayout * @since 1.26 * @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel */ var ObjectPageLayout = Control.extend("sap.uxap.ObjectPageLayout", /** @lends sap.uxap.ObjectPageLayout.prototype */ { metadata: { library: "sap.uxap", properties: { /** * Determines whether the Navigation bar (Anchor bar) is displayed. */ showAnchorBar: {type: "boolean", defaultValue: true}, /** * Determines whether to show a Popover with Subsection links when clicking on Section links in the Anchor bar. */ showAnchorBarPopover: {type: "boolean", defaultValue: true}, /** * Determines whether the Anchor bar items are displayed in upper case. */ upperCaseAnchorBar: {type: "boolean", defaultValue: true}, /** * Determines the height of the ObjectPage. */ height: {type: "sap.ui.core.CSSSize", defaultValue: "100%"}, /** * Enable lazy loading for the Object page Subsections. */ enableLazyLoading: {type: "boolean", defaultValue: false}, /** * Determines whether Subsection titles are displayed on top or to the left of the Subsection content. */ subSectionLayout: { type: "sap.uxap.ObjectPageSubSectionLayout", defaultValue: ObjectPageSubSectionLayout.TitleOnTop }, /** * Use sap.m.IconTabBar instead of the default Anchor bar */ useIconTabBar: {type: "boolean", group: "Misc", defaultValue: false}, /** * Determines the visibility of the Header content (headerContent aggregation). */ showHeaderContent: {type: "boolean", group: "Misc", defaultValue: true}, /** * Determines whether the to use two column layout for the L screen size. */ useTwoColumnsForLargeScreen: {type: "boolean", group: "Appearance", defaultValue: false}, /** * Determines whether the title, image, markers and selectTitleArrow are shown in the Header content area. */ showTitleInHeaderContent: {type: "boolean", group: "Appearance", defaultValue: false}, /** * Determines whether sections and subsections with importance Low and Medium are hidden even on large screens. * @since 1.32.0 */ showOnlyHighImportance: {type: "boolean", group: "Behavior", defaultValue: false}, /** * Determines whether the page is a child page and renders it with a different design. * Child pages have an additional (darker/lighter) stripe on the left side of their header content area. * @since 1.34.0 */ isChildPage: {type: "boolean", group: "Appearance", defaultValue: false}, /** * Determines whether Header Content will always be expanded on desktop. * @since 1.34.0 */ alwaysShowContentHeader: {type: "boolean", group: "Behavior", defaultValue: false}, /** * Determines whether an Edit button will be shown in Header Content. * @since 1.34.0 */ showEditHeaderButton: {type: "boolean", group: "Behavior", defaultValue: false}, /** * Specifies whether the object page enables flexibility features, such as hiding and adding sections.<br> * For more information about SAPUI5 flexibility, refer to the Developer Guide. * @since 1.34.0 */ flexEnabled: {type: "boolean", group: "Misc", defaultValue: false} }, defaultAggregation: "sections", aggregations: { /** * The sections that make up the Object page content area. */ sections: {type: "sap.uxap.ObjectPageSection", multiple: true, singularName: "section"}, /** * Object page header title - the upper, always static, part of the Object page header. */ headerTitle: {type: "sap.uxap.ObjectPageHeader", multiple: false}, /** * Object page header content - the dynamic part of the Object page header. */ headerContent: {type: "sap.ui.core.Control", multiple: true, singularName: "headerContent"}, /** * Internal aggregation to hold the reference to the AnchorBar. */ _anchorBar: {type: "sap.uxap.AnchorBar", multiple: false, visibility: "hidden"}, /** * Internal aggregation to hold the reference to the IconTabBar. */ _iconTabBar: {type: "sap.m.IconTabBar", multiple: false, visibility: "hidden"}, /** * Internal aggregation to hold the reference to the ObjectPageHeaderContent. */ _headerContent: {type: "sap.uxap.ObjectPageHeaderContent", multiple: false, visibility: "hidden"} }, events: { /** * The event is fired when the Anchor bar is switched from moving to fixed or the other way round. */ toggleAnchorBar: { parameters: { /** * False indicates that the Anchor bar has just detached from the Header and became part of the scrolling area. True means that the Anchor bar has just snapped to the Header. */ fixed: {type: "boolean"} } }, /** * The event is fired when the Edit Header button is pressed */ editHeaderButtonPress: {} }, designTime: true } }); /************************************************************************************* * life cycle management ************************************************************************************/ ObjectPageLayout.prototype.init = function () { // lazy loading this._bFirstRendering = true; this._bDomReady = false; //dom is fully ready to be inspected this._bStickyAnchorBar = false; //status of the header this._iStoredScrollPosition = 0; // anchorbar management this._bInternalAnchorBarVisible = true; this._$opWrapper = []; //dom reference to the header for Dark mode background image scrolling scenario this._$anchorBar = []; //dom reference to the anchorBar this._$headerTitle = []; //dom reference to the header title this._$stickyAnchorBar = []; //dom reference to the sticky anchorBar this._$headerContent = []; //dom reference to the headerContent this._$stickyHeaderContent = []; //dom reference to the stickyHeaderContent // header animation && anchor bar management this._bMobileScenario = false; //are we in a mobile scenario or the desktop one? this._oSectionInfo = {}; //register some of the section info sSectionId:{offset,buttonClone} for updating the anchorbar accordingly this._aSectionBases = []; //hold reference to all sections and subsections alike (for perf reasons) this._sScrolledSectionId = ""; //section id that is currently scrolled this._iScrollToSectionDuration = 600; //ms this._$spacer = []; //dom reference to the bottom padding spacing this.iHeaderContentHeight = 0; // original height of the header content this.iStickyHeaderContentHeight = 0; // original height of the sticky header content this.iHeaderTitleHeight = 0; // original height of the header title this.iHeaderTitleHeightStickied = 0; // height of the header title when stickied (can be different from the collapsed height because of isXXXAlwaysVisible options or text wrapping) this.iAnchorBarHeight = 0; // original height of the anchorBar this.iTotalHeaderSize = 0; // total size of headerTitle + headerContent this._iResizeId = ResizeHandler.register(this, this._onUpdateScreenSize.bind(this)); this._oLazyLoading = new LazyLoading(this); this._oABHelper = new ABHelper(this); }; /** * update the anchor bar content accordingly to the section info and enable the lazy loading of the first visible sections */ ObjectPageLayout.prototype.onBeforeRendering = function () { if (!this.getVisible()) { return; } this._bMobileScenario = library.Utilities.isPhoneScenario(); this._bTabletScenario = library.Utilities.isTabletScenario(); // if we have Header Content on a desktop, check if it is always expanded this._bHContentAlwaysExpanded = this._checkAlwaysShowContentHeader(); this._initializeScroller(); this._storeScrollLocation(); this._getHeaderContent().setContentDesign(this._getHeaderDesign()); this._oABHelper._getAnchorBar().setUpperCase(this.getUpperCaseAnchorBar()); this._applyUxRules(); // If we are on the first true rendering : first time we render the page with section and blocks if (!jQuery.isEmptyObject(this._oSectionInfo) && this._bFirstRendering) { this._preloadSectionsOnBeforeFirstRendering(); this._bFirstRendering = false; } this._bStickyAnchorBar = false; //reset default state in case of re-rendering var oHeaderTitle = this.getHeaderTitle(); if (oHeaderTitle && oHeaderTitle.getAggregation("_expandButton")) { oHeaderTitle.getAggregation("_expandButton").attachPress(this._handleExpandButtonPress, this); } }; ObjectPageLayout.prototype._preloadSectionsOnBeforeFirstRendering = function () { var aToLoad; if (!this.getEnableLazyLoading()) { // In case we are not lazy loaded make sure that we connect the blocks properly... aToLoad = this.getUseIconTabBar() ? [this._oFirstVisibleSection] : this.getSections(); // for iconTabBar, load only the section that corresponds to first tab } else { //lazy loading, so connect first visible subsections var aSectionBasesToLoad = this.getUseIconTabBar() ? this._grepCurrentTabSectionBases() : this._aSectionBases; aToLoad = this._oLazyLoading.getSubsectionsToPreload(aSectionBasesToLoad); } this._connectModelsForSections(aToLoad); }; ObjectPageLayout.prototype._grepCurrentTabSectionBases = function () { var oFiltered = [], oSectionToLoad = this._oCurrentTabSection || this._oFirstVisibleSection; if (oSectionToLoad) { var sSectionToLoadId = oSectionToLoad.getId(); this._aSectionBases.forEach(function (oSection) { if (oSection.getParent().getId() === sSectionToLoadId) { oFiltered.push(oSection); } }); } return oFiltered; }; /************************************************************************************* * header & scroll management ************************************************************************************/ ObjectPageLayout.prototype.onAfterRendering = function () { this._ensureCorrectParentHeight(); this._cacheDomElements(); this._$opWrapper.on("scroll", this._onScroll.bind(this)); //the dom is already ready (re-rendering case), thus we compute the header immediately //in order to avoid flickering (see Incident 1570011343) if (this._bDomReady && this.$().parents(":hidden").length === 0) { this._onAfterRenderingDomReady(); } else { jQuery.sap.delayedCall(ObjectPageLayout.HEADER_CALC_DELAY, this, this._onAfterRenderingDomReady); } }; ObjectPageLayout.prototype._onAfterRenderingDomReady = function () { this._bDomReady = true; this._adjustHeaderHeights(); if (this.getUseIconTabBar()) { this._setCurrentTabSection(this._oStoredSection || this._oFirstVisibleSection); } this._initAnchorBarScroll(); this.getHeaderTitle() && this.getHeaderTitle()._shiftHeaderTitle(); this._setSectionsFocusValues(); this._restoreScrollPosition(); }; ObjectPageLayout.prototype.exit = function () { if (this._oScroller) { this._oScroller.destroy(); this._oScroller = null; } if (this._iResizeId) { ResizeHandler.deregister(this._iResizeId); } }; ObjectPageLayout.prototype.setShowOnlyHighImportance = function (bValue) { var bOldValue = this.getShowOnlyHighImportance(); if (bOldValue !== bValue) { this.setProperty("showOnlyHighImportance", bValue, true); this.getSections().forEach(function (oSection) { oSection._updateImportance(); }); } return this; }; ObjectPageLayout.prototype.setIsHeaderContentAlwaysExpanded = function (bValue) { var bOldValue = this.getAlwaysShowContentHeader(); var bSuppressInvalidate = (Device.system.phone || Device.system.tablet); if (bOldValue !== bValue) { this.setProperty("alwaysShowContentHeader", bValue, bSuppressInvalidate); } return this; }; /** * Overwrite setBusy, because the busyIndicator does not cover the header title, * because the header title has z-index: 2 in order to appear on top of the content * @param {boolean} bBusy * @public */ ObjectPageLayout.prototype.setBusy = function (bBusy) { var $title = this.$("headerTitle"), vResult = Control.prototype.setBusy.call(this, bBusy); $title.length > 0 && $title.toggleClass("sapUxAPObjectPageHeaderTitleBusy", bBusy); return vResult; }; ObjectPageLayout.prototype._initializeScroller = function () { if (this._oScroller) { return; } //Internal Incident: 1482023778: workaround BB10 = use zynga instead of iScroll var bEnforceZynga = (Device.os.blackberry && Device.os.version >= 10.0 && Device.os.version < 11.0); this._oScroller = new ScrollEnablement(this, this.getId() + "-scroll", { horizontal: false, vertical: true, zynga: bEnforceZynga, preventDefault: true, nonTouchScrolling: "scrollbar", scrollbarClass: "sapUxAPObjectPageScroll" }); }; /** * if our container has not set a height, we need to enforce it or nothing will get displayed * the reason is the objectPageLayout has 2 containers with position:absolute, height:100% * @private */ ObjectPageLayout.prototype._ensureCorrectParentHeight = function () { if (this._bCorrectParentHeightIsSet) { return; } /* BCP: 1670054830 - returned the original check here since it was breaking in a case where the object page was embedded in sap.m.Page, the sap.m.Page already had height 100%, but we set it to its content div where the ObjectPage is resulting in the sap.m.Page footer would float above some of the ObjectPage content. Its still a bit strange that we check for the framework controls parent's height, but then we apply height 100% to the direct dom parent. */ if (this.getParent().getHeight && ["", "auto"].indexOf(this.getParent().getHeight()) !== -1) { this.$().parent().css("height", "100%"); } this._bCorrectParentHeightIsSet = true; }; ObjectPageLayout.prototype._cacheDomElements = function () { this._$headerTitle = jQuery.sap.byId(this.getId() + "-headerTitle"); this._$anchorBar = jQuery.sap.byId(this.getId() + "-anchorBar"); this._$stickyAnchorBar = jQuery.sap.byId(this.getId() + "-stickyAnchorBar"); this._$opWrapper = jQuery.sap.byId(this.getId() + "-opwrapper"); this._$spacer = jQuery.sap.byId(this.getId() + "-spacer"); this._$headerContent = jQuery.sap.byId(this.getId() + "-headerContent"); this._$stickyHeaderContent = jQuery.sap.byId(this.getId() + "-stickyHeaderContent"); this._$contentContainer = jQuery.sap.byId(this.getId() + "-scroll"); }; /** * Handles the press of the expand header button * @private */ ObjectPageLayout.prototype._handleExpandButtonPress = function (oEvent) { this._expandCollapseHeader(true); }; /** * Toggles visual rules on manually expand or collapses the sticky header * @private */ ObjectPageLayout.prototype._toggleStickyHeader = function (bExpand) { this._bIsHeaderExpanded = bExpand; this._$headerTitle.toggleClass("sapUxAPObjectPageHeaderStickied", !bExpand); this._toggleHeaderStyleRules(!bExpand); }; /** * Expands or collapses the sticky header * @private */ ObjectPageLayout.prototype._expandCollapseHeader = function (bExpand) { var oHeaderTitle = this.getHeaderTitle(); if (this._bHContentAlwaysExpanded) { return; } if (bExpand && this._bStickyAnchorBar) { // if the title in the header is not always visible but the action buttons are there we have remove the padding of the action buttons if (oHeaderTitle && oHeaderTitle.getIsActionAreaAlwaysVisible() && !oHeaderTitle.getIsObjectTitleAlwaysVisible()) { oHeaderTitle._setActionsPaddingStatus(bExpand); } this._$headerContent.css("height", this.iHeaderContentHeight).children().appendTo(this._$stickyHeaderContent); // when removing the header content, preserve the height of its placeholder, to avoid automatic repositioning of scrolled content as it gets shortened (as its topmost part is cut off) this._toggleStickyHeader(bExpand); } else if (!bExpand && this._bIsHeaderExpanded) { this._$headerContent.css("height", "auto").append(this._$stickyHeaderContent.children()); this._$stickyHeaderContent.children().remove(); this._toggleStickyHeader(bExpand); } }; /************************************************************************************* * Ux rules ************************************************************************************/ /** * updates the objectPageLayout structure based on ux rules * This affects data! * @private * @param {boolean} bInvalidate request the invalidation of the sectionBase that would turn into visible or hidden. This may not be necessary if you are already within a rendering process. */ ObjectPageLayout.prototype._applyUxRules = function (bInvalidate) { var aSections, aSubSections, iVisibleSubSections, iVisibleSection, iVisibleBlocks, bVisibleAnchorBar, bVisibleIconTabBar, oFirstVisibleSection, oFirstVisibleSubSection; aSections = this.getSections() || []; iVisibleSection = 0; bVisibleAnchorBar = this.getShowAnchorBar(); bVisibleIconTabBar = this.getUseIconTabBar(); oFirstVisibleSection = null; this._cleanMemory(); aSections.forEach(function (oSection) { //ignore hidden sections if (!oSection.getVisible()) { return true; } this._registerSectionBaseInfo(oSection); aSubSections = oSection.getSubSections() || []; iVisibleSubSections = 0; oFirstVisibleSubSection = null; aSubSections.forEach(function (oSubSection) { //ignore hidden subSection if (!oSubSection.getVisible()) { return true; } this._registerSectionBaseInfo(oSubSection); iVisibleBlocks = oSubSection.getVisibleBlocksCount(); //rule noVisibleBlock: If a subsection has no visible content the subsection will be hidden. if (iVisibleBlocks === 0) { oSubSection._setInternalVisible(false, bInvalidate); jQuery.sap.log.info("ObjectPageLayout :: noVisibleBlock UX rule matched", "subSection " + oSubSection.getTitle() + " forced to hidden"); } else { oSubSection._setInternalVisible(true, bInvalidate); //if TitleOnTop.sectionGetSingleSubSectionTitle is matched, this will be hidden back oSubSection._setInternalTitleVisible(true, bInvalidate); iVisibleSubSections++; if (!oFirstVisibleSubSection) { oFirstVisibleSubSection = oSubSection; } } }, this); //rule noVisibleSubSection: If a section has no content (or only empty subsections) the section will be hidden. if (iVisibleSubSections == 0) { oSection._setInternalVisible(false, bInvalidate); jQuery.sap.log.info("ObjectPageLayout :: noVisibleSubSection UX rule matched", "section " + oSection.getTitle() + " forced to hidden"); } else { oSection._setInternalVisible(true, bInvalidate); oSection._setInternalTitleVisible(true, bInvalidate); if (!oFirstVisibleSection) { oFirstVisibleSection = oSection; } //rule TitleOnTop.sectionGetSingleSubSectionTitle: If a section as only 1 subsection and the subsection title is not empty, the section takes the subsection title on titleOnTop layout only if (this.getSubSectionLayout() === ObjectPageSubSectionLayout.TitleOnTop && iVisibleSubSections === 1 && oFirstVisibleSubSection.getTitle().trim() !== "") { jQuery.sap.log.info("ObjectPageLayout :: TitleOnTop.sectionGetSingleSubSectionTitle UX rule matched", "section " + oSection.getTitle() + " is taking its single subsection title " + oFirstVisibleSubSection.getTitle()); oSection._setInternalTitle(oFirstVisibleSubSection.getTitle(), bInvalidate); oFirstVisibleSubSection._setInternalTitleVisible(false, bInvalidate); } else { oSection._setInternalTitle("", bInvalidate); } iVisibleSection++; } if (bVisibleIconTabBar) { oSection._setInternalTitleVisible(false, bInvalidate); } }, this); //rule notEnoughVisibleSection: If there is only 1 section overall, the navigation control shall be hidden. if (iVisibleSection <= 1) { bVisibleAnchorBar = false; jQuery.sap.log.info("ObjectPageLayout :: notEnoughVisibleSection UX rule matched", "anchorBar forced to hidden"); //rule firstSectionTitleHidden: the first section title is never visible if there is an anchorBar } else if (oFirstVisibleSection && bVisibleAnchorBar) { oFirstVisibleSection._setInternalTitleVisible(false, bInvalidate); jQuery.sap.log.info("ObjectPageLayout :: firstSectionTitleHidden UX rule matched", "section " + oFirstVisibleSection.getTitle() + " title forced to hidden"); } // the AnchorBar needs to reflect the dom state if (bVisibleAnchorBar) { this._oABHelper._buildAnchorBar(); } this._setInternalAnchorBarVisible(bVisibleAnchorBar, bInvalidate); this._oFirstVisibleSection = oFirstVisibleSection; }; /************************************************************************************* * IconTabBar management ************************************************************************************/ /** * Overrides the setter for the useIconTabBar property * @param bValue * @returns this */ ObjectPageLayout.prototype.setUseIconTabBar = function (bValue) { var bOldValue = this.getUseIconTabBar(); if (bValue != bOldValue) { this._applyUxRules(); // UxRules contain logic that depends on whether we use iconTabBar or not } this.setProperty("useIconTabBar", bValue); return this; }; /** * Sets a new section to be displayed as currently selected tab * @param oSection * @private */ ObjectPageLayout.prototype._setCurrentTabSection = function (oSection) { if (!oSection) { return; } var oSubsection; if (oSection instanceof sap.uxap.ObjectPageSubSection) { oSubsection = oSection; oSection = oSection.getParent(); } else { oSubsection = this._getFirstVisibleSubSection(oSection); } if (this._oCurrentTabSection !== oSection) { this._renderSection(oSection); this._oCurrentTabSection = oSection; } this._oCurrentTabSubSection = oSubsection; }; /** * renders the given section in the ObjectPageContainer html element, without causing re-rendering of the ObjectPageLayout, * used for switching between sections, when the navigation is through IconTabBar * @param oSection * @private */ ObjectPageLayout.prototype._renderSection = function (oSection) { var $objectPageContainer = this.$().find(".sapUxAPObjectPageContainer"), oRm; if (oSection && $objectPageContainer.length) { oRm = sap.ui.getCore().createRenderManager(); oRm.renderControl(oSection); oRm.flush($objectPageContainer[0]);// place the section in the ObjectPageContainer } oRm.destroy(); }; /************************************************************************************* * anchor bar management ************************************************************************************/ ObjectPageLayout.prototype.setShowAnchorBarPopover = function (bValue, bSuppressInvalidate) { this._oABHelper._buildAnchorBar(); this._oABHelper._getAnchorBar().setShowPopover(bValue); return this.setProperty("showAnchorBarPopover", bValue, true /* don't re-render the whole objectPageLayout */); }; ObjectPageLayout.prototype._getInternalAnchorBarVisible = function () { return this._bInternalAnchorBarVisible; }; ObjectPageLayout.prototype._setInternalAnchorBarVisible = function (bValue, bInvalidate) { if (bValue != this._bInternalAnchorBarVisible) { this._bInternalAnchorBarVisible = bValue; if (bInvalidate === true) { this.invalidate(); } } }; ObjectPageLayout.prototype._adjustLayout = function (oEvent, bImmediate, bNeedLazyLoading) { //adjust the layout only if the object page is full ready if (!this._bDomReady) { return; } //postpone until we get requests if (this._iLayoutTimer) { jQuery.sap.log.debug("ObjectPageLayout :: _adjustLayout", "delayed by " + ObjectPageLayout.DOM_CALC_DELAY + " ms because of dom modifications"); jQuery.sap.clearDelayedCall(this._iLayoutTimer); } if (bImmediate) { this._updateScreenHeightSectionBasesAndSpacer(); this._iLayoutTimer = undefined; } else { //need to "remember" if one of the adjustLayout is requesting the lazyLoading this._bNeedLazyLoading = this._bNeedLazyLoading !== undefined || bNeedLazyLoading; this._iLayoutTimer = jQuery.sap.delayedCall(ObjectPageLayout.DOM_CALC_DELAY, this, function () { jQuery.sap.log.debug("ObjectPageLayout :: _adjustLayout", "re-evaluating dom positions"); this._updateScreenHeightSectionBasesAndSpacer(); //in case the layout has changed we need to re-evaluate the lazy loading if (this._bNeedLazyLoading) { this._oLazyLoading.doLazyLoading(); } this._bNeedLazyLoading = undefined; this._iLayoutTimer = undefined; }); } }; /** * adjust the layout but also the ux rules * used for refreshing the overall structure of the objectPageLayout when it as been updated after the first rendering * @private */ ObjectPageLayout.prototype._adjustLayoutAndUxRules = function () { //in case we have added a section or subSection which change the ux rules jQuery.sap.log.debug("ObjectPageLayout :: _adjustLayout", "refreshing ux rules"); /* obtain the currently selected section in the navBar before navBar is destroyed, in order to reselect that section after that navBar is reconstructed */ var sSelectedSectionId = this._getSelectedSectionId(); this._applyUxRules(true); var oSelectedSection = sap.ui.getCore().byId(sSelectedSectionId); /* check if the section that was previously selected is still available, as it might have been deleted, or emptied, or set to hidden in the previous step */ if (oSelectedSection && oSelectedSection.getVisible() && oSelectedSection._getInternalVisible()) { this._setSelectedSectionId(sSelectedSectionId); //reselect the current section in the navBar this._adjustLayout(null, false, true /* requires a check on lazy loading */); return; } /* the section that was previously selected is not available anymore, so we cannot reselect it; in that case we have to select the first visible section instead */ oSelectedSection = this._oFirstVisibleSection; if (oSelectedSection) { this.scrollToSection(oSelectedSection.getId()); } }; ObjectPageLayout.prototype._getSelectedSectionId = function () { var oAnchorBar = this.getAggregation("_anchorBar"), sSelectedSectionId; if (oAnchorBar && oAnchorBar.getSelectedSection()) { sSelectedSectionId = oAnchorBar.getSelectedSection().getId(); } return sSelectedSectionId; }; ObjectPageLayout.prototype._setSelectedSectionId = function (sSelectedSectionId) { var oAnchorBar = this.getAggregation("_anchorBar"), oSelectedSectionInfo = sSelectedSectionId && this._oSectionInfo[sSelectedSectionId]; if (!oSelectedSectionInfo) { return; } if (oAnchorBar && oSelectedSectionInfo.buttonId) { oAnchorBar.setSelectedButton(oSelectedSectionInfo.buttonId); } }; ObjectPageLayout.prototype.isFirstRendering = function () { return this._bFirstRendering; }; /** * clean the oSectionInfo and aSectionBases internal properties * as the oSectionInfo contains references to created objects, we make sure to destroy them properly in order to avoid memory leaks * @private */ ObjectPageLayout.prototype._cleanMemory = function () { var oAnchorBar = this.getAggregation("_anchorBar"); if (oAnchorBar) { oAnchorBar.destroyContent(); } this._oSectionInfo = {}; this._aSectionBases = []; }; /** * register the section within the internal property used for lazy loading and navigation * most of these properties are going to be updated later when the dom will be ready (positions) or when the anchorBar button will be created (buttonId) * @param oSectionBase the section to register * @private */ ObjectPageLayout.prototype._registerSectionBaseInfo = function (oSectionBase) { this._oSectionInfo[oSectionBase.getId()] = { $dom: [], positionTop: 0, positionTopMobile: 0, realTop: 0.0, buttonId: "", isSection: (oSectionBase instanceof library.ObjectPageSection), sectionReference: oSectionBase }; this._aSectionBases.push(oSectionBase); }; /** * Scrolls the Object page to the given Section. * * @param {string} sId The Section ID to scroll to * @param {int} iDuration Scroll duration (in ms). Default value is 0 * @param {int} iOffset Additional pixels to scroll * @public * @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel */ ObjectPageLayout.prototype.scrollToSection = function (sId, iDuration, iOffset) { var oSection = sap.ui.getCore().byId(sId); if (this.getUseIconTabBar()) { this._setCurrentTabSection(oSection); var oToSelect = oSection; if (oToSelect instanceof sap.uxap.ObjectPageSubSection) { oToSelect = oToSelect.getParent(); } this.getAggregation("_anchorBar").setSelectedButton(this._oSectionInfo[oToSelect.getId()].buttonId); } if (this._bIsHeaderExpanded) { this._expandCollapseHeader(false); } iOffset = iOffset || 0; oSection._expandSection(); //call _adjustLayout synchronously to make extra sure we have the right positionTops for all sectionBase before scrolling this._adjustLayout(null, true); iDuration = this._computeScrollDuration(iDuration, oSection); var iScrollTo = this._computeScrollPosition(oSection); //avoid triggering twice the scrolling onto the same target section if (this._sCurrentScrollId != sId) { this._sCurrentScrollId = sId; if (this._iCurrentScrollTimeout) { clearTimeout(this._iCurrentScrollTimeout); this._$contentContainer.parent().stop(true, false); } this._iCurrentScrollTimeout = jQuery.sap.delayedCall(iDuration, this, function () { this._sCurrentScrollId = undefined; this._iCurrentScrollTimeout = undefined; }); this._preloadSectionsOnScroll(oSection); this.getHeaderTitle() && this.getHeaderTitle()._shiftHeaderTitle(); this._scrollTo(iScrollTo + iOffset, iDuration); } }; ObjectPageLayout.prototype._computeScrollDuration = function (iAppSpecifiedDuration, oTargetSection) { var iDuration = parseInt(iAppSpecifiedDuration, 10); iDuration = iDuration >= 0 ? iDuration : this._iScrollToSectionDuration; if (this.getUseIconTabBar() && ((oTargetSection instanceof sap.uxap.ObjectPageSection) || this._isFirstVisibleSubSection(oTargetSection)) && this._bStickyAnchorBar) { // in this case we are only scrolling // a section from expanded to sticky position, // so the scrolling animation in not needed, instead it looks unnatural, so set a 0 duration iDuration = 0; } return iDuration; }; ObjectPageLayout.prototype._computeScrollPosition = function (oTargetSection) { var bFirstLevel = oTargetSection && (oTargetSection instanceof sap.uxap.ObjectPageSection), sId = oTargetSection.getId(); var iScrollTo = this._bMobileScenario || bFirstLevel ? this._oSectionInfo[sId].positionTopMobile : this._oSectionInfo[sId].positionTop; if (this.getUseIconTabBar() && ((oTargetSection instanceof sap.uxap.ObjectPageSection) || this._isFirstVisibleSubSection(oTargetSection)) && !this._bStickyAnchorBar) { // preserve expanded header if no need to stick iScrollTo -= this.iHeaderContentHeight; // scroll to the position where the header is still expanded } return iScrollTo; }; ObjectPageLayout.prototype._preloadSectionsOnScroll = function (oTargetSection) { var sId = oTargetSection.getId(), aToLoad; if (!this.getEnableLazyLoading() && this.getUseIconTabBar()) { aToLoad = (oTargetSection instanceof sap.uxap.ObjectPageSection) ? oTargetSection : oTargetSection.getParent(); this._connectModelsForSections([aToLoad]); } if (this.getEnableLazyLoading()) { //connect target subsection to avoid delay in data loading var oSectionBasesToLoad = this.getUseIconTabBar() ? this._grepCurrentTabSectionBases() : this._aSectionBases; aToLoad = this._oLazyLoading.getSubsectionsToPreload(oSectionBasesToLoad, sId); if (Device.system.desktop) { //on desktop we delay the call to have the preload done during the scrolling animation jQuery.sap.delayedCall(50, this, function () { this._connectModelsForSections(aToLoad); }); } else { //on device, do the preload first then scroll. //doing anything during the scrolling animation may //trouble animation and lazy loading on slow devices. this._connectModelsForSections(aToLoad); } } }; /** * Returns the UI5 ID of the Section that is currently being scrolled. * * @type string * @public * @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel */ ObjectPageLayout.prototype.getScrollingSectionId = function () { return this._sScrolledSectionId; }; /** * Set for reference the destination section of the ongoing scroll * When this one is set, then the page will skip intermediate sections [during the scroll from the current to the destination section] * and will scroll directly to the given section * @param sDirectSectionId - the section to be scrolled directly to */ ObjectPageLayout.prototype.setDirectScrollingToSection = function (sDirectSectionId) { this.sDirectSectionId = sDirectSectionId; }; /** * Get the destination section of the ongoing scroll * When this one is non-null, then the page will skip intermediate sections [during the scroll from the current to the destination section] * and will scroll directly to the given section * @param sDirectSectionId - the section to be scrolled directly to */ ObjectPageLayout.prototype.getDirectScrollingToSection = function () { return this.sDirectSectionId; }; /** * Clear the destination section of the ongoing scroll * When this one is null, then the page will process all intermediate sections [during the scroll to some Y position] * and select each one in sequence */ ObjectPageLayout.prototype.clearDirectScrollingToSection = function () { this.sDirectSectionId = null; }; /** * Scroll to the y position in dom * @param y the position in pixel * @param time the animation time * @private */ ObjectPageLayout.prototype._scrollTo = function (y, time) { if (this._oScroller) { jQuery.sap.log.debug("ObjectPageLayout :: scrolling to " + y); this._oScroller.scrollTo(0, y, time); } return this; }; /** * update the section dom reference * @private */ ObjectPageLayout.prototype._updateScreenHeightSectionBasesAndSpacer = function () { var iLastVisibleHeight, oLastVisibleSubSection, iSpacerHeight, sPreviousSubSectionId, sPreviousSectionId, iHeaderGap = 0; this.iScreenHeight = this.$().height(); if (this.iHeaderContentHeight && !this._bHContentAlwaysExpanded) { iHeaderGap = this.iHeaderTitleHeightStickied - this.iHeaderTitleHeight; } this._aSectionBases.forEach(function (oSectionBase) { var oInfo = this._oSectionInfo[oSectionBase.getId()], $this = oSectionBase.$(), $mobileAnchor, bPromoted = false; if (!oInfo /* sectionBase is visible */ || !$this.length) { return; } oInfo.$dom = $this; //calculate the scrollTop value to get the section title at the bottom of the header //performance improvements possible here as .position() is costly oInfo.realTop = $this.position().top; //first get the dom position = scrollTop to get the section at the window top var bHasTitle = (oSectionBase._getInternalTitleVisible() && (oSectionBase.getTitle().trim() !== "")); var bHasButtons = !oInfo.isSection && oSectionBase.getAggregation("actions").length > 0; if (!oInfo.isSection && !bHasTitle && !bHasButtons) { oInfo.realTop = $this.find(".sapUiResponsiveMargin.sapUxAPBlockContainer").position().top; } //the amount of scrolling required is the distance between their position().top and the bottom of the anchorBar oInfo.positionTop = Math.ceil(oInfo.realTop) - this.iAnchorBarHeight - iHeaderGap; //the amount of scrolling required for the mobile scenario //we want to navigate just below its title //as of UX specs Oct 7, 2014 if (oInfo.isSection) { $mobileAnchor = oSectionBase.$("header"); } else { $mobileAnchor = oSectionBase.$("headerTitle"); } bPromoted = $mobileAnchor.length === 0; //calculate the mobile position if (!bPromoted) { oInfo.positionTopMobile = Math.ceil($mobileAnchor.position().top) + $mobileAnchor.outerHeight() - this.iAnchorBarHeight - iHeaderGap; } else { //title wasn't found (=first section, hidden title, promoted subsection), scroll to the same position as desktop oInfo.positionTopMobile = oInfo.positionTop; } oInfo.sectionReference.toggleStyleClass("sapUxAPObjectPageSubSectionPromoted", bPromoted); //for calculating the currently scrolled section of subsection (and for lazy loading) we also need to know the bottom of the section and subsections //we can't use oInfo.$dom.height() since the margin are not taken into account. //therefore the most reliable calculation is to consider as a bottom, the top of the next section/subsection //on mobile, each section and subsection is considered equally (a section is a very tiny subsection containing only a title) if (this._bMobileScenario) { if (sPreviousSectionId) { //except for the very first section this._oSectionInfo[sPreviousSectionId].positionBottom = oInfo.positionTop; } sPreviousSectionId = oSectionBase.getId(); oLastVisibleSubSection = oSectionBase; } else { //on desktop, we update section by section (each section is resetting the calculation) //on a desktop the previous section bottom is the top of the current section if (oInfo.isSection) { if (sPreviousSectionId) { //except for the very first section this._oSectionInfo[sPreviousSectionId].positionBottom = oInfo.positionTop; this._oSectionInfo[sPreviousSubSectionId].positionBottom = oInfo.positionTop; } sPreviousSectionId = oSectionBase.getId(); sPreviousSubSectionId = null; } else { //on desktop, the previous subsection bottom is the top of the current subsection if (sPreviousSubSectionId) { //except for the very first subSection this._oSectionInfo[sPreviousSubSectionId].positionBottom = oInfo.positionTop; } sPreviousSubSectionId = oSectionBase.getId(); oLastVisibleSubSection = oSectionBase; } } }, this); //calculate the bottom spacer height and update the last section/subSection bottom (with our algorithm of having section tops based on the next section, we need to have a special handling for the very last subSection) if (oLastVisibleSubSection) { iLastVisibleHeight = this._$spacer.position().top - this._oSectionInfo[oLastVisibleSubSection.getId()].realTop; //on desktop we need to set the bottom of the last section as well if (this._bMobileScenario) { this._oSectionInfo[sPreviousSectionId].positionBottom = this._oSectionInfo[sPreviousSectionId].positionTop + iLastVisibleHeight; } else { //update the position bottom for the last subsection this._oSectionInfo[sPreviousSubSectionId].positionBottom = this._oSectionInfo[sPreviousSubSectionId].positionTop + iLastVisibleHeight; this._oSectionInfo[sPreviousSectionId].positionBottom = this._oSectionInfo[sPreviousSubSectionId].positionTop + iLastVisibleHeight; } //calculate the required additional space for the last section only if (iLastVisibleHeight < this.iScreenHeight) {// see if this line can be skipped if (this._isSpacerRequired(oLastVisibleSubSection, iLastVisibleHeight)) { //the amount of space required is what is needed to get the latest position you can scroll to up to the "top" //therefore we need to create enough space below the last subsection to get it displayed on top = the spacer //the "top" is just below the sticky header + anchorBar, therefore we just need enough space to get the last subsection below these elements //the latest position is below the last subsection title in case of a mobile scroll to the last subsection if (this.iHeaderContentHeight || this._bHContentAlwaysExpanded) { // Not always when we scroll the HeaderTitle is in Sticky position so instead of taking out its StickyHeight we have to take out its height and the HeaderGap, // which will be zero when the HeaderTitle is in normal mode iSpacerHeight = this.iScreenHeight - iLastVisibleHeight - this.iHeaderTitleHeight - iHeaderGap - this.iAnchorBarHeight; } else { iSpacerHeight = this.iScreenHeight - iLastVisibleHeight - this.iAnchorBarHeight; } //take into account that we may need to scroll down to the positionMobile, thus we need to make sure we have enough space at the bottom if (this._bMobileScenario) { iSpacerHeight += (this._oSectionInfo[oLastVisibleSubSection.getId()].positionTopMobile - this._oSectionInfo[oLastVisibleSubSection.getId()].positionTop); } } else { iSpacerHeight = 0; } this._$spacer.height(iSpacerHeight + "px"); jQuery.sap.log.debug("ObjectPageLayout :: bottom spacer is now " + iSpacerHeight + "px"); } } }; /* * Determines wheder spacer, after the last subsection, is needed on the screen. * The main reason for spacer to exist is to have enogth space for scrolling to the last section. */ ObjectPageLayout.prototype._isSpacerRequired = function (oLastVisibleSubSection, iLastVisibleHeight) { var oSelectedSection = this.getAggregation("_anchorBar").getSelectedSection(), bIconTabBarWithOneSectionAndOneSubsection = this.getUseIconTabBar() && oSelectedSection && oSelectedSection.getSubSections().length === 1, bOneSectionOneSubsection = this.getSections().length === 1 && this.getSections()[0].getSubSections().length === 1; // When there there is only one element the scrolling is not required so the spacer is redundant. if (bIconTabBarWithOneSectionAndOneSubsection || bOneSectionOneSubsection) { return false; } if (this._bStickyAnchorBar) { // UX Rule: if the user has scrolled to sticky anchorBar, keep it sticky i.e. do not expand the header *automatically* return true; } var bContentFitsViewport = ((this._oSectionInfo[oLastVisibleSubSection.getId()].realTop + iLastVisibleHeight) <= this.iScreenHeight); if (!bContentFitsViewport) { return true; } if (!this._isFirstVisibleSubSection(this._oCurrentTabSubSection)) { return true; } return false; }; ObjectPageLayout.prototype._isFirstVisibleSubSection = function (oSectionBase) { if (oSectionBase) { var oSectionInfo = this._oSectionInfo[oSectionBase.getId()]; if (oSectionInfo) { return oSectionInfo.realTop === (this.iAnchorBarHeight + this.iHeaderContentHeight); } } return false; }; ObjectPageLayout.prototype._getFirstVisibleSubSection = function (oSection) { if (!oSection) { return; } var oFirstSubSection; this._aSectionBases.every(function (oSectionBase) { if (oSectionBase.getParent() && (oSectionBase.getParent().getId() === oSection.getId())) { oFirstSubSection = oSectionBase; return false; } return true; }); return oFirstSubSection; }; /** * init the internal section info {positionTop} * @private */ ObjectPageLayout.prototype._initAnchorBarScroll = function () { this._adjustLayout(null, true); //reset the scroll to top for anchorbar & scrolling management this._sScrolledSectionId = ""; this._onScroll({target: {scrollTop: 0}});//make sure we got the very last scroll event even on slow devices }; /** * Set a given section as the currently scrolled section and update the anchorBar relatively * @param sSectionId the section id * @private */ ObjectPageLayout.prototype._setAsCurrentSection = function (sSectionId) { var oAnchorBar, oSectionBase, bShouldDisplayParentTitle; if (this._sScrolledSectionId === sSectionId) { return; } jQuery.sap.log.debug("ObjectPageLayout :: current section is " + sSectionId); this._sScrolledSectionId = sSectionId; oAnchorBar = this.getAggregation("_anchorBar"); if (oAnchorBar && this._getInternalAnchorBarVisible()) { oSectionBase = sap.ui.getCore().byId(sSectionId); bShouldDisplayParentTitle = oSectionBase && oSectionBase instanceof ObjectPageSubSection && (oSectionBase.getTitle().trim() === "" || !oSectionBase._getInternalTitleVisible() || oSectionBase.getParent()._getIsHidden()); //the sectionBase title needs to be visible (or the user won't "feel" scrolling that sectionBase but its parent) //see Incident 1570016975 for more details if (bShouldDisplayParentTitle) { sSectionId = oSectionBase.getParent().getId(); jQuery.sap.log.debug("ObjectPageLayout :: current section is a subSection with an empty or hidden title, selecting parent " + sSectionId); } if (this._oSectionInfo[sSectionId]) { oAnchorBar.setSelectedButton(this._oSectionInfo[sSectionId].buttonId); this._setSectionsFocusValues(sSectionId); } } }; /** * called when the screen is resize by users. Updates the screen height * @param oEvent * @private */ ObjectPageLayout.prototype._onUpdateScreenSize = function (oEvent) { if (!this._bDomReady) { jQuery.sap.log.info("ObjectPageLayout :: cannot _onUpdateScreenSize before dom is ready"); return; } this._oLazyLoading.setLazyLoadingParameters(); jQuery.sap.delayedCall(ObjectPageLayout.HEADER_CALC_DELAY, this, function () { this._bMobileScenario = library.Utilities.isPhoneScenario(); this._bTabletScenario = library.Utilities.isTabletScenario(); if (this._bHContentAlwaysExpanded != this._checkAlwaysShowContentHeader()) { this.invalidate(); } this._adjustHeaderHeights(); this._adjustLayout(null, true); this._scrollTo(this._$opWrapper.scrollTop(), 0); }); }; /** * called when the user scrolls on the page * @param oEvent * @private */ ObjectPageLayout.prototype._onScroll = function (oEvent) { var iScrollTop = Math.max(oEvent.target.scrollTop, 0), // top of the visible page iPageHeight, oHeader = this.getHeaderTitle(), bShouldStick = iScrollTop >= (this.iHeaderContentHeight - (this.iHeaderTitleHeightStickied - this.iHeaderTitleHeight)), // iHeaderContentHeight minus the gap between the two headerTitle sClosestId, bScrolled = false; //calculate the limit of visible sections to be lazy loaded iPageHeight = this.iScreenHeight; if (bShouldStick && !this._bHContentAlwaysExpanded) { iPageHeight -= (this.iAnchorBarHeight + this.iHeaderTitleHeightStickied); } else { if (bShouldStick && this._bHContentAlwaysExpanded) { iPageHeight = iPageHeight - (this._$stickyAnchorBar.height() + this.iHeaderTitleHeight + this.iStickyHeaderContentHeight); // - this.iStickyHeaderContentHeight } } if (this._bIsHeaderExpanded) { this._expandCollapseHeader(false); } //don't apply parallax effects if there are not enough space for it if (!this._bHContentAlwaysExpanded && ((oHeader && this.getShowHeaderContent()) || this.getShowAnchorBar())) { this._toggleHeader(bShouldStick); //if we happen to have been able to collapse it at some point (section height had increased) //and we no longer are (section height is reduced) and we are at the top of the page we expand it back anyway } else if (iScrollTop == 0 && ((oHeader && this.getShowHeaderContent()) || this.getShowAnchorBar())) { this._toggleHeader(false); } if (!this._bHContentAlwaysExpanded) { this._adjustHeaderTitleBackgroundPosition(iScrollTop); } jQuery.sap.log.debug("ObjectPageLayout :: lazy loading : Scrolling at " + iScrollTop, "----------------------------------------"); //find the currently scrolled section = where position - iScrollTop is closest to 0 sClosestId = this._getClosestScrolledSectionId(iScrollTop, iPageHeight); if (sClosestId) { // check if scroll destination is set in advance // (this is when a particular section is requested from the anchorBar sectionsList and we are now scrolling to reach it) var sDestinationSectionId = this.getDirectScrollingToSection(); if (sClosestId !== this._sScrolledSectionId) { jQuery.sap.log.debug("ObjectPageLayout :: closest id " + sClosestId, "----------------------------------------"); // check if scroll-destination section is explicitly set var sDestinationSectionId = this.getDirectScrollingToSection(); // if scroll-destination section is explicitly set // then we do not want to process intermediate sections (i.e. sections between scroll-start section and scroll-destination sections) // so if current section is not destination section // then no need to proceed further if (sDestinationSectionId && sDestinationSectionId !== sClosestId) { return; } this.clearDirectScrollingToSection(); this._setAsCurrentSection(sClosestId); } else if (sClosestId === this.getDirectScrollingToSection()) { //we are already in the destination section this.clearDirectScrollingToSection(); } } //lazy load only the visible subSections if (this.getEnableLazyLoading()) { //calculate the progress done between this scroll event and the previous one //to see if we are scrolling fast (more than 5% of the page height) this._oLazyLoading.lazyLoadDuringScroll(iScrollTop, oEvent.timeStamp, iPageHeight); } if (oHeader && this.getShowHeaderContent() && this.getShowTitleInHeaderContent() && oHeader.getShowTitleSelector()) { if (iScrollTop === 0) { // if we have arrow from the title inside the ContentHeader and the ContentHeader isn't scrolled we have to put higher z-index to the ContentHeader // otherwise part of the arrow is cut off jQuery.sap.byId(this.getId() + "-scroll").css("z-index", "1000"); bScrolled = false; } else if (!bScrolled) { bScrolled = true; // and we have to "reset" the z-index it when we start scrolling jQuery.sap.byId(this.getId() + "-scroll").css("z-index", "0"); } } }; ObjectPageLayout.prototype._getClosestScrolledSectionId = function (iScrollTop, iPageHeight) { if (this.getUseIconTabBar() && this._oCurrentTabSection) { return this._oCurrentTabSection.getId(); } var iScrollPageBottom = iScrollTop + iPageHeight, //the bottom limit sClosestId; jQuery.each(this._oSectionInfo, function (sId, oInfo) { // on desktop/tablet, skip subsections if (oInfo.isSection || this._bMobileScenario) { //we need to set the sClosest to the first section for handling the scrollTop = 0 if (!sClosestId) { sClosestId = sId; } // current section/subsection is inside the view port if (oInfo.positionTop <= iScrollPageBottom && iScrollTop <= oInfo.positionBottom) { // scrolling position is over current section/subsection if (oInfo.positionTop <= iScrollTop && oInfo.positionBottom >= iScrollTop) { sClosestId = sId; return false; } } } }.bind(this)); return sClosestId; }; /** * toggles the header state * @param bStick boolean true for fixing the header, false for keeping it moving * @private */ ObjectPageLayout.prototype._toggleHeader = function (bStick) { var oHeaderTitle = this.getHeaderTitle(); //switch to stickied if (!this._bHContentAlwaysExpanded && !this._bIsHeaderExpanded) { this._$headerTitle.toggleClass("sapUxAPObjectPageHeaderStickied", bStick); } // if the title in the header is not always visible but the action buttons are there we have to adjust header height and remove the padding of the action buttons if (oHeaderTitle && oHeaderTitle.getIsActionAreaAlwaysVisible() && !oHeaderTitle.getIsObjectTitleAlwaysVisible()) { oHeaderTitle._setActionsPaddingStatus(!bStick); } if (!this._bStickyAnchorBar && bStick) { this._restoreFocusAfter(this._convertHeaderToStickied); oHeaderTitle && oHeaderTitle._adaptLayout(); this._adjustHeaderHeights(); } else if (this._bStickyAnchorBar && !bStick) { this._restoreFocusAfter(this._convertHeaderToExpanded); oHeaderTitle && oHeaderTitle._adaptLayout(); this._adjustHeaderHeights(); } }; /** * Restores the focus after moving the Navigation bar after moving it between containers * @private * @param fnMoveNavBar a function that moves the navigation bar * @returns this */ ObjectPageLayout.prototype._restoreFocusAfter = function (fnMoveNavBar) { var oCore = sap.ui.getCore(), oLastSelectedElement = oCore.byId(oCore.getCurrentFocusedControlId()); fnMoveNavBar.call(this); if (Device.system.phone !== true) { // FIX - can not convert to expanded on windows phone if (!oCore.byId(oCore.getCurrentFocusedControlId())) { oLastSelectedElement && oLastSelectedElement.$().focus(); } } return this; }; /** * Converts the Header to stickied (collapsed) mode * @private * @returns this */ ObjectPageLayout.prototype._convertHeaderToStickied = function () { if (!this._bHContentAlwaysExpanded) { this._$anchorBar.css("height", this.iAnchorBarHeight).children().appendTo(this._$stickyAnchorBar); this._toggleHeaderStyleRules(true); //Internal Incident: 1472003895: FIT W7 MI: Dual color in the header //we need to adjust the header background now in case its size is different if (this.iHeaderTitleHeight != this.iHeaderTitleHeightStickied) { this._adjustHeaderBackgroundSize(); } } return this; }; /** * Converts the Header to expanded (moving) mode * @private * @returns this */ ObjectPageLayout.prototype._convertHeaderToExpanded = function () { if (!this._bHContentAlwaysExpanded) { this._$anchorBar.css("height", "auto").append(this._$stickyAnchorBar.children()); this._toggleHeaderStyleRules(false); } return this; }; /** * Toggles the header styles for between stickied and expanded modes * @private * @returns this */ ObjectPageLayout.prototype._toggleHeaderStyleRules = function (bStuck) { bStuck = !!bStuck; var sValue = bStuck ? "hidden" : "inherit"; this._bStickyAnchorBar = bStuck; this._$headerContent.css("overflow", sValue); this._$headerContent.css("visibility", sValue); this._$anchorBar.css("visibility", sValue); this.fireToggleAnchorBar({fixed: bStuck}); }; // use type 'object' because Metamodel doesn't know ScrollEnablement /** * Returns a sap.ui.core.delegate.ScrollEnablement object used to handle scrolling * * @type object * @public * @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel */ ObjectPageLayout.prototype.getScrollDelegate = function () { return this._oScroller; }; /************************************************************************************************************ * Header specific methods ***********************************************************************************************************/ ObjectPageLayout.prototype.setHeaderTitle = function (oHeaderTitle, bSuppressInvalidate) { oHeaderTitle.addEventDelegate({ onAfterRendering: this._adjustHeaderHeights.bind(this) }); return this.setAggregation("headerTitle", oHeaderTitle, bSuppressInvalidate); }; ObjectPageLayout.prototype._adjustHeaderBackgroundSize = function () { // Update the background image size and position var oHeaderTitle = this.getHeaderTitle(); if (oHeaderTitle && oHeaderTitle.getHeaderDesign() == "Dark") { if (!this._bHContentAlwaysExpanded) { this.iTotalHeaderSize = this.iHeaderTitleHeight + this.iHeaderContentHeight; this._$headerContent.css("background-size", "100% " + this.iTotalHeaderSize + "px"); } else { // The header size in this case contains the header content and the anchor bar, we have to exclude the anchor bar, since no background is applyied to it this.iTotalHeaderSize = this.iHeaderTitleHeight - this._$stickyAnchorBar.height(); // here the sticky header content has to be updated not the content like in the upper case this._$stickyHeaderContent.css("background-size", "100% " + this.iTotalHeaderSize + "px"); } oHeaderTitle.$().css("background-size", "100% " + this.iTotalHeaderSize + "px"); this._adjustHeaderTitleBackgroundPosition(0); } }; ObjectPageLayout.prototype._adjustHeaderTitleBackgroundPosition = function (iScrollTop) { var oHeaderTitle = this.getHeaderTitle(); if (oHeaderTitle && oHeaderTitle.getHeaderDesign() == "Dark") { if (this._bStickyAnchorBar) { oHeaderTitle.$().css("background-position", "0px " + ((this.iTotalHeaderSize - this.iHeaderTitleHeightStickied) * -1) + "px"); } else { if (this._bHContentAlwaysExpanded) { // If the header is always expanded, there is no neeed to scroll the background so we setting it to 0 position oHeaderTitle.$().css("background-position", "0px 0px"); } else { oHeaderTitle.$().css("background-position", "0px " + (this.iHeaderTitleHeight + this.iHeaderContentHeight - this.iTotalHeaderSize - iScrollTop) + "px"); } } } }; ObjectPageLayout.prototype._adjustHeaderHeights = function () { //checking the $headerTitle we prevent from checking the headerHeights multiple times during the first rendering //$headerTitle is set in the objectPageLayout.onAfterRendering, thus before the objectPageLayout is fully rendered once, we don't enter here multiple times (performance tweak) if (this._$headerTitle.length > 0) { var $headerTitleClone = this._$headerTitle.clone(); //read the headerContentHeight --------------------------- this.iHeaderContentHeight = this._$headerContent.height(); //read the sticky headerContentHeight --------------------------- this.iStickyHeaderContentHeight = this._$stickyHeaderContent.height(); //figure out the anchorBarHeight ------------------------ this.iAnchorBarHeight = this._$anchorBar.height(); //prepare: make sure it won't be visible ever and fix width to the original headerTitle which is 100% $headerTitleClone.css({left: "-10000px", top: "-10000px", width: this._$headerTitle.width() + "px"}); //in sticky mode, we need to calculate the size of original header if (this._bStickyAnchorBar) { //read the headerTitleStickied --------------------------- this.iHeaderTitleHeightStickied = this._$headerTitle.height() - this.iAnchorBarHeight; //adjust the headerTitle ------------------------------- $headerTitleClone.removeClass("sapUxAPObjectPageHeaderStickied"); $headerTitleClone.appendTo(this._$headerTitle.parent()); this.iHeaderTitleHeight = $headerTitleClone.is(":visible") ? $headerTitleClone.height() - this.iAnchorBarHeight : 0; } else { //otherwise it's the sticky that we need to calculate //read the headerTitle ----------------------------------- this.iHeaderTitleHeight = this._$headerTitle.is(":visible") ? this._$headerTitle.height() : 0; //adjust headerTitleStickied ---------------------------- $headerTitleClone.addClass("sapUxAPObjectPageHeaderStickied"); $headerTitleClone.appendTo(this._$headerTitle.parent()); this.iHeaderTitleHeightStickied = $headerTitleClone.height(); } //clean dom $headerTitleClone.remove(); //adjust dom element directly depending on the adjusted height // Adjust wrapper top position var iPadding = this.iHeaderContentHeight ? this.iHeaderTitleHeight : this.iHeaderTitleHeightStickied; // if no header content, the top padding has to be larger // so that the static header does not overlap the beginning of the first section this._$opWrapper.css("padding-top", iPadding); this._adjustHeaderBackgroundSize(); jQuery.sap.log.info("ObjectPageLayout :: adjustHeaderHeight", "headerTitleHeight: " + this.iHeaderTitleHeight + " - headerTitleStickiedHeight: " + this.iHeaderTitleHeightStickied + " - headerContentHeight: " + this.iHeaderContentHeight); } else { jQuery.sap.log.debug("ObjectPageLayout :: adjustHeaderHeight", "skipped as the objectPageLayout is being rendered"); } }; /** * Retrieve the current header design that was defined in the headerTitle if available * * @private */ ObjectPageLayout.prototype._getHeaderDesign = function () { var oHeader = this.getHeaderTitle(), sDesign = library.ObjectPageHeaderDesign.Light; if (oHeader != null) { sDesign = oHeader.getHeaderDesign(); } return sDesign; }; /** * Gets only the visible sections * * @private */ ObjectPageLayout.prototype._getVisibleSections = function () { return this.getSections().filter(function (oSection) { return oSection.getVisible() && oSection._getInternalVisible(); }); }; /** * Sets appropriate focus to the sections * * @private */ ObjectPageLayout.prototype._setSectionsFocusValues = function (sSectionId) { var aSections = this._getVisibleSections() || [], $section, sFocusable = '0', sNotFocusable = '-1', sTabIndex = "tabIndex", oSelectedElement, oFirstSection = aSections[0]; aSections.forEach(function (oSection) { $section = oSection.$(); if (sSectionId === oSection.sId) { $section.attr(sTabIndex, sFocusable); oSelectedElement = oSection; oSection._setSubSectionsFocusValues(); } else { $section.attr(sTabIndex, sNotFocusable); oSection._disableSubSectionsFocus(); } }); if (!oSelectedElement && aSections.length > 0) { oFirstSection.$().attr(sTabIndex, sFocusable); oFirstSection._setSubSectionsFocusValues(); oSelectedElement = oFirstSection; } return oSelectedElement; }; /** * get current visibility of the HeaderContent and if it is different from the new one rererender it */ ObjectPageLayout.prototype.setShowHeaderContent = function (bShow) { var bOldShow = this.getShowHeaderContent(); if (bOldShow !== bShow) { if (bOldShow && this._bIsHeaderExpanded) { this._expandCollapseHeader(false); } this.setProperty("showHeaderContent", bShow); this._getHeaderContent().setProperty("visible", bShow); } return this; }; /** * Calls the renderer function that will rerender the ContentHeader when something is changed in the ObjectPageHeader Title * * @private */ ObjectPageLayout.prototype._headerTitleChangeHandler = function () { if (!this.getShowTitleInHeaderContent() || this._bFirstRendering) { return; } var oRm = sap.ui.getCore().createRenderManager(); this.getRenderer()._rerenderHeaderContentArea(oRm, this); oRm.destroy(); }; /** * Maintain ObjectPageHeaderContent aggregation * */ ObjectPageLayout.prototype.getHeaderContent = function () { return this._getHeaderContent().getAggregation("content"); }; ObjectPageLayout.prototype.insertHeaderContent = function (oObject, iIndex, bSuppressInvalidate) { return this._getHeaderContent().insertAggregation("content", oObject, iIndex, bSuppressInvalidate); }; ObjectPageLayout.prototype.addHeaderContent = function (oObject, bSuppressInvalidate) { return this._getHeaderContent().addAggregation("content", oObject, bSuppressInvalidate); }; ObjectPageLayout.prototype.removeAllHeaderContent = function (bSuppressInvalidate) { return this._getHeaderContent().removeAllAggregation("content", bSuppressInvalidate); }; ObjectPageLayout.prototype.removeHeaderContent = function (oObject, bSuppressInvalidate) { return this._getHeaderContent().removeAggregation("content", oObject, bSuppressInvalidate); }; ObjectPageLayout.prototype.destroyHeaderContent = function (bSuppressInvalidate) { return this._getHeaderContent().destroyAggregation("content", bSuppressInvalidate); }; ObjectPageLayout.prototype.indexOfHeaderContent = function (oObject) { return this._getHeaderContent().indexOfAggregation("content", oObject); }; /** * Lazy loading of the _headerContent aggregation * * @private */ ObjectPageLayout.prototype._getHeaderContent = function () { if (!this.getAggregation("_headerContent")) { this.setAggregation("_headerContent", new library.ObjectPageHeaderContent({ visible: this.getShowHeaderContent(), contentDesign: this._getHeaderDesign(), content: this.getAggregation("headerContent") }), true); } return this.getAggregation("_headerContent"); }; ObjectPageLayout.prototype._checkAlwaysShowContentHeader = function () { return !this._bMobileScenario && !this._bTabletScenario && this.getShowHeaderContent() && this.getAlwaysShowContentHeader(); }; ObjectPageLayout.prototype._connectModelsForSections = function (aSections) { aSections = aSections || []; aSections.forEach(function (oSection) { oSection.connectToModels(); }); }; ObjectPageLayout.prototype._getHeightRelatedParameters = function () { return { iHeaderContentHeight: this.iHeaderContentHeight, iScreenHeight: this.iScreenHeight, iAnchorBarHeight: this.iAnchorBarHeight, iHeaderTitleHeightStickied: this.iHeaderTitleHeightStickied, iStickyHeaderContentHeight: this.iStickyHeaderContentHeight, iScrollTop: this._$opWrapper.scrollTop() }; }; ObjectPageLayout.prototype._hasVerticalScrollBar = function () { if (this._$opWrapper.length) { return this._$opWrapper[0].scrollHeight > this._$opWrapper.innerHeight(); } else { return !this.getUseIconTabBar(); } }; ObjectPageLayout.prototype._shiftHeader = function (sDirection, sPixels) { this.$().find(".sapUxAPObjectPageHeaderTitle").css(sDirection, sPixels); }; /** * Checks if a section is the first visible one * @private */ ObjectPageLayout.prototype._isFirstSection = function (oSection) { var aSections = this._getVisibleSections(); if (oSection === aSections[0]) { return true; } return false; }; ObjectPageLayout.prototype._restoreScrollPosition = function () { this._scrollTo(this._iStoredScrollPosition, 0); }; ObjectPageLayout.prototype._storeScrollLocation = function () { this._iStoredScrollPosition = this._oScroller.getScrollTop(); this._oStoredSection = this._oCurrentTabSubSection || this._oCurrentTabSection; this._oCurrentTabSection = null; }; ObjectPageLayout.HEADER_CALC_DELAY = 350; //ms. The higher the safer and the uglier... ObjectPageLayout.DOM_CALC_DELAY = 200; //ms. return ObjectPageLayout; }); }; // end of sap/uxap/ObjectPageLayout.js if ( !jQuery.sap.isDeclared('sap.uxap.ObjectPageHeaderRenderer') ) { /*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2016 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ jQuery.sap.declare('sap.uxap.ObjectPageHeaderRenderer'); // unresolved dependency added by SAPUI5 'AllInOne' Builder sap.ui.define("sap/uxap/ObjectPageHeaderRenderer",["./ObjectPageLayout"], function (ObjectPageLayout) { "use strict"; /** * @class HeaderBase renderer. * @static */ var ObjectPageHeaderRenderer = {}; ObjectPageHeaderRenderer.render = function (oRm, oControl) { var oNavigationBar = oControl.getNavigationBar(), bTitleVisible = (oControl.getIsObjectIconAlwaysVisible() || oControl.getIsObjectTitleAlwaysVisible() || oControl.getIsObjectSubtitleAlwaysVisible() || oControl.getIsActionAreaAlwaysVisible()), oParent = oControl.getParent(), oExpandButton = oControl.getAggregation("_expandButton"), bIsDesktop = sap.ui.Device.system.desktop, bIsHeaderContentVisible = oParent && oParent instanceof ObjectPageLayout && ((oParent.getHeaderContent() && oParent.getHeaderContent().length > 0 && oParent.getShowHeaderContent()) || (oParent.getShowHeaderContent() && oParent.getShowTitleInHeaderContent())); oRm.write("<div"); oRm.writeControlData(oControl); oRm.addClass('sapUxAPObjectPageHeader'); oRm.addClass('sapUxAPObjectPageHeaderDesign-' + oControl.getHeaderDesign()); oRm.writeClasses(); oRm.write(">"); // if an navigationBar has been provided display it if (oNavigationBar) { oRm.write("<div"); oRm.addClass('sapUxAPObjectPageHeaderNavigation'); oRm.writeClasses(); oRm.write(">"); oRm.renderControl(oNavigationBar); oRm.write("</div>"); } // first line oRm.write("<div"); oRm.writeAttributeEscaped("id", oControl.getId() + "-identifierLine"); oRm.addClass('sapUxAPObjectPageHeaderIdentifier'); if (bTitleVisible) { oRm.addClass('sapUxAPObjectPageHeaderIdentifierForce'); } oRm.writeClasses(); oRm.write(">"); if (oParent && oParent instanceof ObjectPageLayout && oParent.getIsChildPage()) { oRm.write("<div"); oRm.addClass('sapUxAPObjectChildPage'); oRm.writeClasses(); oRm.write("></div>"); } // If picturePath is provided show image if (oControl.getObjectImageURI() || oControl.getShowPlaceholder()) { oRm.write("<span "); oRm.addClass('sapUxAPObjectPageHeaderObjectImageContainer'); oRm.addClass('sapUxAPObjectPageHeaderObjectImage-' + oControl.getObjectImageShape()); if (oControl.getIsObjectIconAlwaysVisible()) { oRm.addClass('sapUxAPObjectPageHeaderObjectImageForce'); } oRm.writeClasses(); oRm.write(">"); oRm.write("<span class='sapUxAPObjectPageHeaderObjectImageContainerSub'>"); if (oControl.getObjectImageURI()) { oRm.renderControl(oControl._getInternalAggregation("_objectImage")); if (oControl.getShowPlaceholder()) { this._renderPlaceholder(oRm, oControl, false); } } else { this._renderPlaceholder(oRm, oControl, true); } oRm.write("</span>"); oRm.write("</span>"); } oRm.write("<span "); oRm.writeAttributeEscaped("id", oControl.getId() + "-identifierLineContainer"); oRm.addClass('sapUxAPObjectPageHeaderIdentifierContainer'); oRm.writeClasses(); oRm.write(">"); this._renderObjectPageTitle(oRm, oControl); oRm.write("</span>"); oRm.write("<span"); oRm.writeAttributeEscaped("id", oControl.getId() + "-actions"); oRm.addClass('sapUxAPObjectPageHeaderIdentifierActions'); if (oControl.getIsActionAreaAlwaysVisible()) { oRm.addClass('sapUxAPObjectPageHeaderIdentifierActionsForce'); } if (oControl._getActionsPaddingStatus()) { oRm.addClass("sapUxAPObjectPageHeaderIdentifierActionsNoPadding"); } oRm.writeClasses(); oRm.write(">"); // Render the expand button only if there is a content to expand and we are on desktop if (bIsDesktop && bIsHeaderContentVisible) { oExpandButton.addStyleClass("sapUxAPObjectPageHeaderExpandButton"); oRm.renderControl(oExpandButton); } var aActions = oControl.getActions(); for (var i = 0; i < aActions.length; i++) { var oAction = aActions[i]; oRm.renderControl(oAction); } var oOverflowButton = oControl.getAggregation("_overflowButton"); oRm.renderControl(oOverflowButton); oRm.write("</span>"); oRm.write("</div>"); oRm.write("</div>"); }; /** * Renders the SelectTitleArrow icon. * * @param {sap.ui.core.RenderManager} * oRm the RenderManager that can be used for writing to the render output buffer * * @param {sap.uxap.ObjecPageHeader} * oControl the ObjectPageHeader * * @param {bVisible} if the placeholder will be visible * * @private */ ObjectPageHeaderRenderer._renderPlaceholder = function (oRm, oControl, bVisible, bTitleInContent) { oRm.write("<div"); oRm.addClass('sapUxAPObjectPageHeaderPlaceholder'); oRm.addClass('sapUxAPObjectPageHeaderObjectImage'); if (!bVisible) { oRm.addClass('sapUxAPHidePlaceholder'); } oRm.writeClasses(); oRm.write(">"); oRm.renderControl(oControl._oPlaceholder); oRm.write("</div>"); }; /** * Renders the SelectTitleArrow icon. * * @param {sap.ui.core.RenderManager} * oRm the RenderManager that can be used for writing to the render output buffer * * @param {sap.uxap.ObjecPageHeader} * oControl the ObjectPageHeader * * @private */ ObjectPageHeaderRenderer._renderObjectPageTitle = function (oRm, oControl, bTitleInContent) { var sOHTitle = oControl.getObjectTitle(), bMarkers = (oControl.getShowMarkers() && (oControl.getMarkFavorite() || oControl.getMarkFlagged())), oBreadCrumbs = oControl._getInternalAggregation('_breadCrumbs'); if (!bTitleInContent && oBreadCrumbs && oBreadCrumbs.getLinks().length) { oRm.renderControl(oBreadCrumbs); } oRm.write("<h1"); oRm.addClass('sapUxAPObjectPageHeaderIdentifierTitle'); if (oControl.getIsObjectTitleAlwaysVisible()) { oRm.addClass('sapUxAPObjectPageHeaderIdentifierTitleForce'); } if (bTitleInContent) { oRm.addClass('sapUxAPObjectPageHeaderIdentifierTitleInContent'); } if (oControl.getShowTitleSelector()) { // if we have arrow to render, the subtitle should have smaller top margin oRm.addClass('sapUxAPObjectPageHeaderTitleFollowArrow'); } oRm.writeClasses(); oRm.writeAttributeEscaped("id", oControl.getId() + "-title"); oRm.write(">"); oRm.write("<span"); oRm.addClass("sapUxAPObjectPageHeaderTitleTextWrappable"); oRm.writeClasses(); oRm.writeAttributeEscaped("id", oControl.getId() + "-innerTitle"); oRm.write(">"); // if we have markers or arrow we have to cut the last word and bind it to the markers and arrow so that the icons never occur in one line but are accompanied by the last word of the title. if (bMarkers || oControl.getShowTitleSelector() || oControl.getMarkLocked() || oControl.getMarkChanges()) { var sOHTitleEnd = sOHTitle.substr(sOHTitle.lastIndexOf(" ") + 1); var sOHTitleStart = sOHTitle.substr(0, sOHTitle.lastIndexOf(" ") + 1); if (sOHTitleEnd.length === 1) { sOHTitleEnd = sOHTitle; sOHTitleStart = ''; } oRm.writeEscaped(sOHTitleStart); oRm.write("</span>"); oRm.write("<span"); oRm.addClass('sapUxAPObjectPageHeaderNowrapMarkers'); if (oControl.getMarkLocked() || oControl.getMarkChanges()) { oRm.addClass('sapUxAPObjectPageHeaderMarks'); } oRm.writeClasses(); oRm.write(">"); oRm.writeEscaped(sOHTitleEnd); // if someone has set both Locked and Unsaved Changes icons, then show only Locked icon if (oControl.getMarkLocked()) { this._renderLock(oRm, oControl, bTitleInContent); } else if (oControl.getMarkChanges()) { this._renderMarkChanges(oRm, oControl, bTitleInContent); } this._renderMarkers(oRm, oControl); this._renderSelectTitleArrow(oRm, oControl, bTitleInContent); oRm.write("</span>"); } else { oRm.writeEscaped(sOHTitle); oRm.write("</span>"); } oRm.write("</h1>"); oRm.write("<span"); oRm.addClass('sapUxAPObjectPageHeaderIdentifierDescription'); if (oControl.getIsObjectSubtitleAlwaysVisible() && oControl.getObjectSubtitle()) { oRm.addClass('sapUxAPObjectPageHeaderIdentifierDescriptionForce'); } if (bTitleInContent) { oRm.addClass('sapUxAPObjectPageHeaderIdentifierSubTitleInContent'); } oRm.writeClasses(); oRm.writeAttributeEscaped("id", oControl.getId() + "-subtitle"); oRm.write(">"); oRm.writeEscaped(oControl.getObjectSubtitle()); oRm.write("</span>"); }; /** * Renders the SelectTitleArrow icon. * * @param {sap.ui.core.RenderManager} * oRm the RenderManager that can be used for writing to the render output buffer * * @param {sap.m.ObjectHeader} * oControl the ObjectPageHeader * @param {boolean} * bTitleInContent - if the arrow will be rendered in content or in title * @private */ ObjectPageHeaderRenderer._renderSelectTitleArrow = function (oRm, oControl, bTitleInContent) { if (oControl.getShowTitleSelector()) { // render select title arrow oRm.write("<span"); // Start title arrow container oRm.addClass("sapUxAPObjectPageHeaderTitleArrow"); oRm.writeClasses(); oRm.write(">"); if (bTitleInContent) { oRm.renderControl(oControl._oTitleArrowIconCont); } else { oRm.renderControl(oControl._oTitleArrowIcon); } oRm.write("</span>"); // end title arrow container } }; /** * Renders the Unsaved Changes icon. * * @param {sap.ui.core.RenderManager} * oRm the RenderManager that can be used for writing to the render output buffer * * @param {sap.uxap.ObjectPageHeader} * oControl the ObjectPageHeader * @param {boolean} * bTitleInContent - if the Unsaved changes icon will be rendered in content or in title * @private */ ObjectPageHeaderRenderer._renderMarkChanges = function (oRm, oControl, bTitleInContent) { oRm.write("<span"); oRm.addClass("sapUxAPObjectPageHeaderChangesBtn"); oRm.addClass("sapUiSizeCompact"); oRm.writeClasses(); oRm.write(">"); if (bTitleInContent) { oRm.renderControl(oControl._oChangesIconCont); } else { oRm.renderControl(oControl._oChangesIcon); } oRm.write("</span>"); }; /** * Renders the Lock icon. * * @param {sap.ui.core.RenderManager} * oRm the RenderManager that can be used for writing to the render output buffer * * @param {sap.uxap.ObjectPageHeader} * oControl the ObjectPageHeader * @param {boolean} * bTitleInContent - if the lock will be rendered in content or in title * @private */ ObjectPageHeaderRenderer._renderLock = function (oRm, oControl, bTitleInContent) { oRm.write("<span"); oRm.addClass("sapUxAPObjectPageHeaderLockBtn"); oRm.addClass("sapUiSizeCompact"); oRm.writeClasses(); oRm.write(">"); if (bTitleInContent) { oRm.renderControl(oControl._oLockIconCont); } else { oRm.renderControl(oControl._oLockIcon); } oRm.write("</span>"); }; /** * Renders the favorite and flag icons. * * @param {sap.ui.core.RenderManager} * oRm the RenderManager that can be used for writing to the render output buffer * * @param {sap.m.ObjectHeader} * oControl the ObjectPageHeader * * @private */ ObjectPageHeaderRenderer._renderMarkers = function (oRm, oControl) { var aIcons = []; // load icons based on control state if (oControl.getShowMarkers()) { aIcons.push(oControl._oFavIcon); aIcons.push(oControl._oFlagIcon); this._renderMarkersAria(oRm, oControl); // render hidden aria description of flag and favorite icons // render icons oRm.write("<span"); oRm.addClass("sapMObjStatusMarker"); oRm.writeClasses(); oRm.writeAttributeEscaped("id", oControl.getId() + "-markers"); oRm.writeAttributeEscaped("aria-describedby", oControl.getId() + "-markers-aria"); oRm.write(">"); for (var i = 0; i < aIcons.length; i++) { oRm.renderControl(aIcons[i]); } oRm.write("</span>"); } }; /** * Renders hidden div with ARIA descriptions of the favorite and flag icons. * * @param {sap.ui.core.RenderManager} * oRm the RenderManager that can be used for writing to the render output buffer * * @param {sap.m.ObjectHeader} * oControl the ObjectPageHeader * * @private */ ObjectPageHeaderRenderer._renderMarkersAria = function (oRm, oControl) { var sAriaDescription = ""; // ARIA description message // check if flag mark is set if (oControl.getMarkFlagged()) { sAriaDescription += (oControl.oLibraryResourceBundle.getText("ARIA_FLAG_MARK_VALUE") + " "); } // check if favorite mark is set if (oControl.getMarkFavorite()) { sAriaDescription += (oControl.oLibraryResourceBundle.getText("ARIA_FAVORITE_MARK_VALUE") + " "); } // if there is a description render ARIA node if (sAriaDescription !== "") { // BEGIN ARIA hidden node oRm.write("<div"); oRm.writeAttributeEscaped("id", oControl.getId() + "-markers-aria"); oRm.writeAttribute("aria-hidden", "false"); oRm.addClass("sapUiHidden"); oRm.writeClasses(); oRm.write(">"); oRm.writeEscaped(sAriaDescription); oRm.write("</div>"); // END ARIA hidden node } }; return ObjectPageHeaderRenderer; }, /* bExport= */ true); }; // end of sap/uxap/ObjectPageHeaderRenderer.js if ( !jQuery.sap.isDeclared('sap.uxap.ObjectPageLayoutRenderer') ) { /*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2016 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ jQuery.sap.declare('sap.uxap.ObjectPageLayoutRenderer'); // unresolved dependency added by SAPUI5 'AllInOne' Builder jQuery.sap.require('sap.ui.core.Renderer'); // unlisted dependency retained sap.ui.define("sap/uxap/ObjectPageLayoutRenderer",["sap/ui/core/Renderer", "./ObjectPageHeaderRenderer"], function (Renderer, ObjectPageHeaderRenderer) { "use strict"; /** * @class ObjectPageRenderer renderer. * @static */ var ObjectPageLayoutRenderer = {}; ObjectPageLayoutRenderer.render = function (oRm, oControl) { var aSections, oHeader = oControl.getHeaderTitle(), oAnchorBar = null, bIsHeaderContentVisible = oControl.getHeaderContent() && oControl.getHeaderContent().length > 0 && oControl.getShowHeaderContent(), bIsTitleInHeaderContent = oControl.getShowTitleInHeaderContent() && oControl.getShowHeaderContent(), bRenderHeaderContent = bIsHeaderContentVisible || bIsTitleInHeaderContent; if (oControl.getShowAnchorBar() && oControl._getInternalAnchorBarVisible()) { oAnchorBar = oControl.getAggregation("_anchorBar"); } oRm.write("<div"); oRm.writeControlData(oControl); if (oHeader) { oRm.writeAttributeEscaped("aria-label", oHeader.getObjectTitle()); } oRm.addClass("sapUxAPObjectPageLayout"); oRm.writeClasses(); oRm.addStyle("height", oControl.getHeight()); oRm.writeStyles(); oRm.write(">"); // Header oRm.write("<header "); oRm.writeAttribute("role", "header"); oRm.writeAttributeEscaped("id", oControl.getId() + "-headerTitle"); oRm.addClass("sapUxAPObjectPageHeaderTitle"); oRm.writeClasses(); oRm.write(">"); if (oHeader) { oRm.renderControl(oHeader); } // Sticky Header Content if (bRenderHeaderContent) { this._renderHeaderContentDOM(oRm, oControl, oControl._bHContentAlwaysExpanded, "-stickyHeaderContent"); } // Sticky anchorBar placeholder oRm.write("<div "); oRm.writeAttributeEscaped("id", oControl.getId() + "-stickyAnchorBar"); oRm.addClass("sapUxAPObjectPageStickyAnchorBar"); oRm.addClass("sapUxAPObjectPageNavigation"); oRm.writeClasses(); oRm.write(">"); // if the content is expanded render bars outside the scrolling div this._renderAnchorBar(oRm, oControl, oAnchorBar, oControl._bHContentAlwaysExpanded); oRm.write("</div>"); oRm.write("</header>"); oRm.write("<div "); oRm.writeAttributeEscaped("id", oControl.getId() + "-opwrapper"); oRm.addClass("sapUxAPObjectPageWrapper"); // set transform only if we don't have title arrow inside the header content, otherwise the z-index is not working if (!(oControl.getShowTitleInHeaderContent() && oHeader.getShowTitleSelector())) { oRm.addClass("sapUxAPObjectPageWrapperTransform"); } oRm.writeClasses(); oRm.write(">"); oRm.write("<div "); oRm.writeAttributeEscaped("id", oControl.getId() + "-scroll"); oRm.addClass("sapUxAPObjectPageScroll"); oRm.writeClasses(); oRm.write(">"); // Header Content if (bRenderHeaderContent) { this._renderHeaderContentDOM(oRm, oControl, !oControl._bHContentAlwaysExpanded, "-headerContent"); } // Anchor Bar oRm.write("<section "); oRm.writeAttributeEscaped("id", oControl.getId() + "-anchorBar"); // write ARIA role oRm.writeAttribute("role", "navigaiton"); oRm.addClass("sapUxAPObjectPageNavigation"); oRm.writeClasses(); oRm.write(">"); this._renderAnchorBar(oRm, oControl, oAnchorBar, !oControl._bHContentAlwaysExpanded); oRm.write("</section>"); // Content section oRm.write("<section"); oRm.addClass("sapUxAPObjectPageContainer"); if (!oAnchorBar) { oRm.addClass("sapUxAPObjectPageContainerNoBar"); } oRm.writeClasses(); oRm.write(">"); aSections = oControl.getAggregation("sections"); if (jQuery.isArray(aSections)) { jQuery.each(aSections, function (iIndex, oSection) { oRm.renderControl(oSection); }); } oRm.write("</section>"); // run hook method this.renderFooterContent(oRm, oControl); oRm.write("<div"); oRm.writeAttributeEscaped("id", oControl.getId() + "-spacer"); oRm.write("></div>"); oRm.write("</div>"); // END scroll oRm.write("</div>"); // END wrapper oRm.write("</div>"); // END page }; /** * This method is called to render AnchorBar * * @param {sap.ui.core.RenderManager} oRm the RenderManager that can be used for writing to the render output buffer * @param {sap.ui.core.Control} oControl an object representation of the control that should be rendered */ ObjectPageLayoutRenderer._renderAnchorBar = function (oRm, oControl, oAnchorBar, bRender) { var aSections = oControl.getAggregation("sections"); if (bRender) { if (oControl.getIsChildPage()) { oRm.write("<div "); oRm.writeAttributeEscaped("id", oControl.getId() + "-childPageBar"); if (jQuery.isArray(aSections) && aSections.length > 1) { oRm.addClass('sapUxAPObjectChildPage'); } oRm.writeClasses(); oRm.write("></div>"); } if (oAnchorBar) { oRm.renderControl(oAnchorBar); } } }; /** * This method is called to render header content DOM structure * * @param {sap.ui.core.RenderManager} oRm the RenderManager that can be used for writing to the render output buffer * @param {sap.ui.core.Control} oControl an object representation of the control that should be rendered * @param bRender - shows if the control should be rendered * @param sId - the id of the div that should be rendered * @param bRenderAlways - shows if the DOM of the control should be rendered no matter if the control is rendered inside or not */ ObjectPageLayoutRenderer._renderHeaderContentDOM = function (oRm, oControl, bRender, sId) { oRm.write("<header "); oRm.writeAttributeEscaped("id", oControl.getId() + sId); oRm.addClass("ui-helper-clearfix"); oRm.addClass("sapUxAPObjectPageHeaderDetails"); oRm.addClass("sapUxAPObjectPageHeaderDetailsDesign-" + oControl._getHeaderDesign()); oRm.writeClasses(); oRm.writeAttribute("data-sap-ui-customfastnavgroup", true); oRm.write(">"); // render Header Content control if (bRender) { this.renderHeaderContent(oRm, oControl); } oRm.write("</header>"); }; /** * This hook method is called to render objectpagelayout header content * * @param {sap.ui.core.RenderManager} oRm the RenderManager that can be used for writing to the render output buffer * @param {sap.ui.core.Control} oControl an object representation of the control that should be rendered */ ObjectPageLayoutRenderer.renderHeaderContent = function (oRm, oControl) { oRm.renderControl(oControl._getHeaderContent()); }; /** * This hook method is called to render objectpagelayout footer content * * @param {sap.ui.core.RenderManager} oRm the RenderManager that can be used for writing to the render output buffer * @param {sap.ui.core.Control} oControl an object representation of the control that should be rendered */ ObjectPageLayoutRenderer.renderFooterContent = function (oRm, oControl) { }; /** * This method is called to rerender headerContent * * @param {sap.ui.core.RenderManager} oRm the RenderManager that can be used for writing to the render output buffer * @param {sap.ui.core.Control} oControl an object representation of the control that should be rendered */ ObjectPageLayoutRenderer._rerenderHeaderContentArea = function (oRm, oControl) { var sId = oControl.getId(); this.renderHeaderContent(oRm, oControl); oRm.flush(jQuery.sap.byId(sId + "-headerContent")[0]); }; return ObjectPageLayoutRenderer; }, /* bExport= */ true); }; // end of sap/uxap/ObjectPageLayoutRenderer.js if ( !jQuery.sap.isDeclared('sap.uxap.ObjectPageHeaderContentRenderer') ) { /*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2016 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ jQuery.sap.declare('sap.uxap.ObjectPageHeaderContentRenderer'); // unresolved dependency added by SAPUI5 'AllInOne' Builder sap.ui.define("sap/uxap/ObjectPageHeaderContentRenderer",["./ObjectPageHeaderRenderer", "./ObjectPageLayout"], function (ObjectPageHeaderRenderer, ObjectPageLayout) { "use strict"; /** * @class HeaderContent renderer. * @static */ var ObjectPageHeaderContentRenderer = {}; ObjectPageHeaderContentRenderer.render = function (oRm, oControl) { var oParent = oControl.getParent(), bParentLayout = (oParent instanceof ObjectPageLayout), oHeader = (oParent && bParentLayout) ? oParent.getHeaderTitle() : false, bRenderTitle = (oParent && bParentLayout) ? ((oParent instanceof ObjectPageLayout) && oParent.getShowTitleInHeaderContent()) : false, bRenderEditBtn = bParentLayout && oParent.getShowEditHeaderButton() && oControl.getContent() && oControl.getContent().length > 0; if (bRenderEditBtn) { oRm.write("<div "); oRm.addClass("sapUxAPObjectPageHeaderContentFlexBox"); oRm.addClass("sapUxAPObjectPageHeaderContentDesign-" + oControl.getContentDesign()); if (oHeader) { oRm.addClass('sapUxAPObjectPageContentObjectImage-' + oHeader.getObjectImageShape()); } oRm.writeClasses(); oRm.write(">"); } oRm.write("<div "); oRm.writeControlData(oControl); if (bRenderEditBtn) { oRm.addClass("sapUxAPObjectPageHeaderContentCellLeft"); } else { oRm.addClass("sapUxAPObjectPageHeaderContentDesign-" + oControl.getContentDesign()); if (oHeader) { oRm.addClass('sapUxAPObjectPageContentObjectImage-' + oHeader.getObjectImageShape()); } } oRm.addClass("ui-helper-clearfix"); oRm.addClass("sapUxAPObjectPageHeaderContent"); if (!oControl.getVisible()) { oRm.addClass("sapUxAPObjectPageHeaderContentHidden"); } oRm.writeClasses(); oRm.write(">"); if (bParentLayout && oParent.getIsChildPage()) { oRm.write("<div"); oRm.addClass('sapUxAPObjectChildPage'); oRm.writeClasses(); oRm.write("></div>"); } if (bRenderTitle) { this._renderTitleImage(oRm, oHeader); if (oControl.getContent().length == 0) { oRm.write("<span class=\"sapUxAPObjectPageHeaderContentItem\">"); this._renderTitle(oRm, oHeader); oRm.write("</span>"); } } oControl.getContent().forEach(function (oItem, iIndex) { this._renderHeaderContent(oItem, iIndex, oRm, bRenderTitle, oHeader, oControl); }, this); oRm.write("</div>"); if (bRenderEditBtn) { this._renderEditButton(oRm, oControl); oRm.write("</div>"); // end of "sapUxAPObjectPageHeaderContentFlexBox" div } }; /** * This method is called to render the content * @param {*} oHeaderContent header content * @param {*} iIndex index * @param {*} oRm oRm * @param {*} bRenderTitle render title * @param {*} oHeader header * @param {*} oControl control */ ObjectPageHeaderContentRenderer._renderHeaderContent = function (oHeaderContent, iIndex, oRm, bRenderTitle, oHeader, oControl) { var bHasSeparatorBefore = false, bHasSeparatorAfter = false, oLayoutData = oControl._getLayoutDataForControl(oHeaderContent), bIsFirstControl = iIndex === 0, bIsLastControl = iIndex === (oControl.getContent().length - 1); if (oLayoutData) { bHasSeparatorBefore = oLayoutData.getShowSeparatorBefore(); bHasSeparatorAfter = oLayoutData.getShowSeparatorAfter(); oRm.write("<span "); oRm.addClass("sapUxAPObjectPageHeaderWidthContainer"); oRm.addClass("sapUxAPObjectPageHeaderContentItem"); oRm.addStyle("width", oLayoutData.getWidth()); oRm.writeStyles(); if (bHasSeparatorAfter || bHasSeparatorBefore) { oRm.addClass("sapUxAPObjectPageHeaderSeparatorContainer"); } if (!oLayoutData.getVisibleL()) { oRm.addClass("sapUxAPObjectPageHeaderLayoutHiddenL"); } if (!oLayoutData.getVisibleM()) { oRm.addClass("sapUxAPObjectPageHeaderLayoutHiddenM"); } if (!oLayoutData.getVisibleS()) { oRm.addClass("sapUxAPObjectPageHeaderLayoutHiddenS"); } oRm.writeClasses(); oRm.write(">"); if (bHasSeparatorBefore) { oRm.write("<span class=\"sapUxAPObjectPageHeaderSeparatorBefore\"/>"); } if (bIsFirstControl && bRenderTitle) { // render title inside the first contentItem this._renderTitle(oRm, oHeader); } } else { if (bIsFirstControl && bRenderTitle) { // render title inside the first contentItem oRm.write("<span class=\"sapUxAPObjectPageHeaderContentItem\">"); this._renderTitle(oRm, oHeader); } else { oHeaderContent.addStyleClass("sapUxAPObjectPageHeaderContentItem"); } } oRm.renderControl(oHeaderContent); if (bHasSeparatorAfter) { oRm.write("<span class=\"sapUxAPObjectPageHeaderSeparatorAfter\"/>"); } if (oLayoutData || (bIsFirstControl && bRenderTitle) || bIsLastControl) { oRm.write("</span>"); } }; /** * This method is called to render title and all it's parts if the property showTitleInHeaderContent is set to true * * @param {sap.ui.core.RenderManager} oRm the RenderManager that can be used for writing to the render output buffer * @param {sap.ui.core.Control} oControl an object representation of the control that should be rendered * @param {sap.ui.core.Control} oHeader an object representation of the titleHeader that should be rendered */ ObjectPageHeaderContentRenderer._renderTitleImage = function (oRm, oHeader) { if (oHeader.getObjectImageURI() || oHeader.getShowPlaceholder()) { oRm.write("<span"); oRm.addClass("sapUxAPObjectPageHeaderContentImageContainer"); oRm.addClass("sapUxAPObjectPageHeaderObjectImage-" + oHeader.getObjectImageShape()); oRm.writeClasses(); oRm.write(">"); if (oHeader.getObjectImageURI()) { oRm.renderControl(oHeader._getInternalAggregation("_objectImage")); if (oHeader.getShowPlaceholder()) { ObjectPageHeaderRenderer._renderPlaceholder(oRm, oHeader, false); } } else { ObjectPageHeaderRenderer._renderPlaceholder(oRm, oHeader, true); } oRm.write("</span>"); } }; /** * This method is called to render title and all it's parts if the property showTitleInHeaderContent is set to true * * @param {sap.ui.core.RenderManager} oRm the RenderManager that can be used for writing to the render output buffer * @param {sap.ui.core.Control} oHeader an object representation of the control that should be rendered */ ObjectPageHeaderContentRenderer._renderTitle = function (oRm, oHeader) { ObjectPageHeaderRenderer._renderObjectPageTitle(oRm, oHeader, true); // force title to be visible inside the content header }; /** * This method is called to render the Edit button when the property showEditHeaderButton is set to true * * @param {sap.ui.core.RenderManager} oRm the RenderManager that can be used for writing to the render output buffer * @param {sap.ui.core.Control} oHeader an object representation of the control that should be rendered */ ObjectPageHeaderContentRenderer._renderEditButton = function (oRm, oHeader) { oRm.write("<div class=\"sapUxAPObjectPageHeaderContentCellRight\">"); oRm.renderControl(oHeader.getAggregation("_editHeaderButton")); oRm.write("</div>"); }; return ObjectPageHeaderContentRenderer; }, /* bExport= */ true); }; // end of sap/uxap/ObjectPageHeaderContentRenderer.js
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ /* Functions to handle typelib */ #include "mysys_priv.h" #include <m_string.h> #include <m_ctype.h> #define is_field_separator(X) ((X) == ',' || (X) == '=') int find_type_or_exit(const char *x, TYPELIB *typelib, const char *option) { int res; const char **ptr; if ((res= find_type((char *) x, typelib, FIND_TYPE_BASIC)) <= 0) { ptr= typelib->type_names; if (!*x) fprintf(stderr, "No option given to %s\n", option); else fprintf(stderr, "Unknown option to %s: %s\n", option, x); fprintf(stderr, "Alternatives are: '%s'", *ptr); while (*++ptr) fprintf(stderr, ",'%s'", *ptr); fprintf(stderr, "\n"); exit(1); } return res; } /** Search after a string in a list of strings. Endspace in x is not compared. @param x String to find @param typelib TYPELIB (struct of pointer to values + count) @param flags flags to tune behaviour: a combination of FIND_TYPE_NO_PREFIX FIND_TYPE_ALLOW_NUMBER FIND_TYPE_COMMA_TERM. FIND_TYPE_NO_OVERWRITE can be passed but is superfluous (is always implicitely on). @retval -1 Too many matching values @retval 0 No matching value @retval >0 Offset+1 in typelib for matched string */ int find_type(const char *x, const TYPELIB *typelib, uint flags) { int find,pos; int findpos= 0; /* guarded by find */ const char *i; const char *j; DBUG_ENTER("find_type"); DBUG_PRINT("enter",("x: '%s' lib: 0x%lx", x, (long) typelib)); DBUG_ASSERT(!(flags & ~(FIND_TYPE_NO_PREFIX | FIND_TYPE_ALLOW_NUMBER | FIND_TYPE_NO_OVERWRITE | FIND_TYPE_COMMA_TERM))); if (!typelib->count) { DBUG_PRINT("exit",("no count")); DBUG_RETURN(0); } find=0; for (pos=0 ; (j=typelib->type_names[pos]) ; pos++) { for (i=x ; *i && (!(flags & FIND_TYPE_COMMA_TERM) || !is_field_separator(*i)) && my_toupper(&my_charset_latin1,*i) == my_toupper(&my_charset_latin1,*j) ; i++, j++) ; if (! *j) { while (*i == ' ') i++; /* skip_end_space */ if (! *i || ((flags & FIND_TYPE_COMMA_TERM) && is_field_separator(*i))) DBUG_RETURN(pos+1); } if ((!*i && (!(flags & FIND_TYPE_COMMA_TERM) || !is_field_separator(*i))) && (!*j || !(flags & FIND_TYPE_NO_PREFIX))) { find++; findpos=pos; } } if (find == 0 && (flags & FIND_TYPE_ALLOW_NUMBER) && x[0] == '#' && strend(x)[-1] == '#' && (findpos=atoi(x+1)-1) >= 0 && (uint) findpos < typelib->count) find=1; else if (find == 0 || ! x[0]) { DBUG_PRINT("exit",("Couldn't find type")); DBUG_RETURN(0); } else if (find != 1 || (flags & FIND_TYPE_NO_PREFIX)) { DBUG_PRINT("exit",("Too many possybilities")); DBUG_RETURN(-1); } DBUG_RETURN(findpos+1); } /* find_type */ /** Get name of type nr @note first type is 1, 0 = empty field */ void make_type(char * to, uint nr, TYPELIB *typelib) { DBUG_ENTER("make_type"); if (!nr) to[0]=0; else (void) my_stpcpy(to,get_type(typelib,nr-1)); DBUG_VOID_RETURN; } /* make_type */ /** Get type @note first type is 0 */ const char *get_type(TYPELIB *typelib, uint nr) { if (nr < (uint) typelib->count && typelib->type_names) return(typelib->type_names[nr]); return "?"; } /** Create an integer value to represent the supplied comma-seperated string where each string in the TYPELIB denotes a bit position. @param x string to decompose @param lib TYPELIB (struct of pointer to values + count) @param err index (not char position) of string element which was not found or 0 if there was no error @retval a integer representation of the supplied string */ my_ulonglong find_typeset(char *x, TYPELIB *lib, int *err) { my_ulonglong result; int find; char *i; DBUG_ENTER("find_set"); DBUG_PRINT("enter",("x: '%s' lib: 0x%lx", x, (long) lib)); if (!lib->count) { DBUG_PRINT("exit",("no count")); DBUG_RETURN(0); } result= 0; *err= 0; while (*x) { (*err)++; i= x; while (*x && !is_field_separator(*x)) x++; if (x[0] && x[1]) /* skip separator if found */ x++; if ((find= find_type(i, lib, FIND_TYPE_COMMA_TERM) - 1) < 0) DBUG_RETURN(0); result|= (ULL(1) << find); } *err= 0; DBUG_RETURN(result); } /* find_set */ /** Create a copy of a specified TYPELIB structure. @param root pointer to a MEM_ROOT object for allocations @param from pointer to a source TYPELIB structure @retval pointer to the new TYPELIB structure on successful copy @retval NULL otherwise */ TYPELIB *copy_typelib(MEM_ROOT *root, TYPELIB *from) { TYPELIB *to; uint i; if (!from) return NULL; if (!(to= (TYPELIB*) alloc_root(root, sizeof(TYPELIB)))) return NULL; if (!(to->type_names= (const char **) alloc_root(root, (sizeof(char *) + sizeof(int)) * (from->count + 1)))) return NULL; to->type_lengths= (unsigned int *)(to->type_names + from->count + 1); to->count= from->count; if (from->name) { if (!(to->name= strdup_root(root, from->name))) return NULL; } else to->name= NULL; for (i= 0; i < from->count; i++) { if (!(to->type_names[i]= strmake_root(root, from->type_names[i], from->type_lengths[i]))) return NULL; to->type_lengths[i]= from->type_lengths[i]; } to->type_names[to->count]= NULL; to->type_lengths[to->count]= 0; return to; } static const char *on_off_default_names[]= { "off","on","default", 0}; static TYPELIB on_off_default_typelib= {array_elements(on_off_default_names)-1, "", on_off_default_names, 0}; /** Parse a TYPELIB name from the buffer @param lib Set of names to scan for. @param strpos INOUT Start of the buffer (updated to point to the next character after the name) @param end End of the buffer @note The buffer is assumed to contain one of the names specified in the TYPELIB, followed by comma, '=', or end of the buffer. @retval 0 No matching name @retval >0 Offset+1 in typelib for matched name */ static uint parse_name(const TYPELIB *lib, const char **strpos, const char *end) { const char *pos= *strpos; uint find= find_type(pos, lib, FIND_TYPE_COMMA_TERM); for (; pos != end && *pos != '=' && *pos !=',' ; pos++); *strpos= pos; return find; } /** Parse and apply a set of flag assingments @param lib Flag names @param default_name Number of "default" in the typelib @param cur_set Current set of flags (start from this state) @param default_set Default set of flags (use this for assign-default keyword and flag=default assignments) @param str String to be parsed @param length Length of the string @param err_pos OUT If error, set to point to start of wrong set string NULL on success @param err_len OUT If error, set to the length of wrong set string @details Parse a set of flag assignments, that is, parse a string in form: param_name1=value1,param_name2=value2,... where the names are specified in the TYPELIB, and each value can be either 'on','off', or 'default'. Setting the same name twice is not allowed. Besides param=val assignments, we support the "default" keyword (keyword #default_name in the typelib). It can be used one time, if specified it causes us to build the new set over the default_set rather than cur_set value. @note it's not charset aware @retval Parsed set value if (*errpos == NULL), otherwise undefined */ my_ulonglong find_set_from_flags(const TYPELIB *lib, uint default_name, my_ulonglong cur_set, my_ulonglong default_set, const char *str, uint length, char **err_pos, uint *err_len) { const char *end= str + length; my_ulonglong flags_to_set= 0, flags_to_clear= 0, res; my_bool set_defaults= 0; *err_pos= 0; /* No error yet */ if (str != end) { const char *start= str; for (;;) { const char *pos= start; uint flag_no, value; if (!(flag_no= parse_name(lib, &pos, end))) goto err; if (flag_no == default_name) { /* Using 'default' twice isn't allowed. */ if (set_defaults) goto err; set_defaults= TRUE; } else { my_ulonglong bit= (1ULL << (flag_no - 1)); /* parse the '=on|off|default' */ if ((flags_to_clear | flags_to_set) & bit || pos >= end || *pos++ != '=' || !(value= parse_name(&on_off_default_typelib, &pos, end))) goto err; if (value == 1) /* this is '=off' */ flags_to_clear|= bit; else if (value == 2) /* this is '=on' */ flags_to_set|= bit; else /* this is '=default' */ { if (default_set & bit) flags_to_set|= bit; else flags_to_clear|= bit; } } if (pos >= end) break; if (*pos++ != ',') goto err; start=pos; continue; err: *err_pos= (char*)start; *err_len= (uint)(end - start); break; } } res= set_defaults? default_set : cur_set; res|= flags_to_set; res&= ~flags_to_clear; return res; }
“The data support a notion that many of us have had: that playing a contact sport for a good chunk of your life at a high level is a risk for a variety of neurodegenerative disorders,” said Jeffrey Kutcher, University of Michigan, Ann Arbor. Kutcher did not participate in this study. Growing evidence links sports-related head injuries, mostly concussions, to neurological problems and neurodegeneration later on in life (see ARF related news story). The medical field now recognizes chronic traumatic encephalopathy (CTE) as a major problem among football players, boxers, and other participants in contact sports. Against that backdrop, these new figures do not necessarily come as a huge surprise, said Lehman. Robert Cantu, Co-Director of the Center for the Study of Traumatic Encephalopathy at Boston University, agreed. “The BU center stores more than 100 donated brains, of which 30 are from deceased NFL players, and all had CTE,” Cantu told Alzforum. He was quick to point out that his may not be a representative sample, as the donations came predominantly from players who took their own lives or had severe problems later in life. “But we know CTE is out there, we just don’t know the prevalence and incidence,” he said. Lehman and colleagues tried to address that issue in what Cantu considered pioneering work. The NIOSH researchers focused on more than 3,400 football professionals who played in the NFL between 1959 and 1988. Lehman followed them through 2007, documenting mortality. By then, 334 of them had died at an average age of 54. The good news is that, overall, the NFL retirees were half as likely to die during this period as were members of the general population. “As you can imagine, these are very fit individuals who received excellent medical attention,” said Lehman. Alas, how they died told another story. On standard death certificates, neurodegenerative disease, including Parkinson’s, Alzheimer’s, and amyotrophic lateral sclerosis (ALS), turned up three times as often as underlying and contributing causes of death as it did for non-players. Narrowing that down, deaths related to dementia/AD and ALS were 3.86- and 4.31-fold higher, respectively. Both these diseases share pathologies found in CTE, including deposits of hyperphosphorylated tau and the RNA-binding protein TDP-43 (see ARF related news story). "Most of the existing data aimed at estimating the prevalence of major neurodegenerative diseases (AD, CTE, ALS) are postmortem and unavoidably biased. This study is unusual and important in the inclusion of ‘all-cause’ mortality data,” noted Sam Gandy, Mount Sinai Medical Center, New York, in an e-mail to Alzforum. Other researchers contacted by Alzforum said that while these numbers are high, they are probably underestimates. Doctors often don’t record dementia as a contributing cause of death, especially in 50-year-olds, agreed Lehman (ARF related news story). Cantu noted that people with CTE can be asymptomatic for as long as 20 years, and without biopsy data a diagnosis of neurodegeneration may be missed. CTE was not even a recognized condition when many of these players passed away. Underestimates or not, there are limitations to the study, as Lehman pointed out. Data on injuries and concussions were unavailable, and cause and effect cannot be established in this retrospective analysis. “We can presume impact led to these [mortality] rates being higher, but there are other variables to consider as well, including genetics and lifestyles that might put NFL players at risk, said Kutcher. A hint of the importance of impact comes from breaking down the data by player position. Defensive and offensive linemen fared best, being 1.6 times as likely as a non-NFL player to die of a neurodegenerative disease. That number jumped to 4.74 for players who tackle or are tackled at speed (including linebackers, running backs, quarterbacks, tight ends, and most other positions). The likelihood a physician noted dementia/AD or ALS on a “speed” position player’s death certificate was sixfold higher than normal. "An important follow-up to this study would be to hunt for identifiable familial/genetic risk alleles that might enable the prospective prediction of those at highest risk," wrote Gandy. He noted that the increase in risk in the NFL players is roughly equivalent to that associated with a single ApoE4 allele, but that the combination of an ApoE4 allele and a serious traumatic brain injury with loss of consciousness could increase the risk for AD by 10-fold. Lehman EJ, Hein MJ, Baron SL, Gersic CM. Neurodegenerative causes of death among retired National Football League players. Neurology. 2012. Sep 5.
--- layout: "aws" page_title: "Provider: AWS" sidebar_current: "docs-aws-index" description: |- The Amazon Web Services (AWS) provider is used to interact with the many resources supported by AWS. The provider needs to be configured with the proper credentials before it can be used. --- # AWS Provider The Amazon Web Services (AWS) provider is used to interact with the many resources supported by AWS. The provider needs to be configured with the proper credentials before it can be used. Use the navigation to the left to read about the available resources. ## Example Usage ``` # Configure the AWS Provider provider "aws" { access_key = "${var.aws_access_key}" secret_key = "${var.aws_secret_key}" region = "us-east-1" } # Create a web server resource "aws_instance" "web" { ... } ``` ## Authentication The AWS provider offers flexible means of providing credentials for authentication. The following methods are supported, in this order, and explained below: - Static credentials - Environment variables - Shared credentials file - EC2 Role ### Static credentials ### Static credentials can be provided by adding an `access_key` and `secret_key` in-line in the aws provider block: Usage: ``` provider "aws" { region = "us-west-2" access_key = "anaccesskey" secret_key = "asecretkey" } ``` ###Environment variables You can provide your credentials via `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`, environment variables, representing your AWS Access Key and AWS Secret Key, respectively. `AWS_DEFAULT_REGION` and `AWS_SESSION_TOKEN` are also used, if applicable: ``` provider "aws" {} ``` Usage: ``` $ export AWS_ACCESS_KEY_ID="anaccesskey" $ export AWS_SECRET_ACCESS_KEY="asecretkey" $ export AWS_DEFAULT_REGION="us-west-2" $ terraform plan ``` ###Shared Credentials file You can use an AWS credentials file to specify your credentials. The default location is `$HOME/.aws/credentials` on Linux and OSX, or `"%USERPROFILE%\.aws\credentials"` for Windows users. If we fail to detect credentials inline, or in the environment, Terraform will check this location. You can optionally specify a different location in the configuration by providing `shared_credentials_file`, or in the environment with the `AWS_SHARED_CREDENTIALS_FILE` variable. This method also supports a `profile` configuration and matching `AWS_PROFILE` environment variable: Usage: ``` provider "aws" { region = "us-west-2" shared_credentials_file = "/Users/tf_user/.aws/creds" profile = "customprofile" } ``` ###EC2 Role If you're running Terraform from an EC2 instance with IAM Instance Profile using IAM Role, Terraform will just ask [the metadata API](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html#instance-metadata-security-credentials) endpoint for credentials. This is a preferred approach over any other when running in EC2 as you can avoid hardcoding credentials. Instead these are leased on-the-fly by Terraform which reduces the chance of leakage. You can provide custom metadata API endpoint via `AWS_METADATA_ENDPOINT` variable which expects the endpoint URL including the version and defaults to `http://169.254.169.254:80/latest`. ###Assume role If provided with a role ARN, Terraform will attempt to assume this role using the supplied credentials. Usage: ``` provider "aws" { assume_role { role_arn = "arn:aws:iam::ACCOUNT_ID:role/ROLE_NAME" session_name = "SESSION_NAME" external_id = "EXTERNAL_ID" } } ``` ## Argument Reference The following arguments are supported in the `provider` block: * `access_key` - (Optional) This is the AWS access key. It must be provided, but it can also be sourced from the `AWS_ACCESS_KEY_ID` environment variable, or via a shared credentials file if `profile` is specified. * `secret_key` - (Optional) This is the AWS secret key. It must be provided, but it can also be sourced from the `AWS_SECRET_ACCESS_KEY` environment variable, or via a shared credentials file if `profile` is specified. * `region` - (Required) This is the AWS region. It must be provided, but it can also be sourced from the `AWS_DEFAULT_REGION` environment variables, or via a shared credentials file if `profile` is specified. * `profile` - (Optional) This is the AWS profile name as set in the shared credentials file. * `assume_role` - (Optional) An `assume_role` block (documented below).`Only one `assume_role` block may be in the configuration. * `shared_credentials_file` = (Optional) This is the path to the shared credentials file. If this is not set and a profile is specified, ~/.aws/credentials will be used. * `token` - (Optional) Use this to set an MFA token. It can also be sourced from the `AWS_SESSION_TOKEN` environment variable. * `max_retries` - (Optional) This is the maximum number of times an API call is being retried in case requests are being throttled or experience transient failures. The delay between the subsequent API calls increases exponentially. * `allowed_account_ids` - (Optional) List of allowed AWS account IDs (whitelist) to prevent you mistakenly using a wrong one (and end up destroying live environment). Conflicts with `forbidden_account_ids`. * `forbidden_account_ids` - (Optional) List of forbidden AWS account IDs (blacklist) to prevent you mistakenly using a wrong one (and end up destroying live environment). Conflicts with `allowed_account_ids`. * `insecure` - (Optional) Optional) Explicitly allow the provider to perform "insecure" SSL requests. If omitted, default value is `false` * `dynamodb_endpoint` - (Optional) Use this to override the default endpoint URL constructed from the `region`. It's typically used to connect to dynamodb-local. * `kinesis_endpoint` - (Optional) Use this to override the default endpoint URL constructed from the `region`. It's typically used to connect to kinesalite. * `skip_credentials_validation` - (Optional) Skip the credentials validation via STS API. Useful for AWS API implementations that do not have STS available/implemented. * `skip_requesting_account_id` - (Optional) Skip requesting the account ID. Useful for AWS API implementations that do not have IAM/STS API and/or metadata API. `true` (enabling this option) prevents you from managing any resource that requires Account ID to construct an ARN, e.g. - `aws_db_instance` - `aws_db_option_group` - `aws_db_parameter_group` - `aws_db_security_group` - `aws_db_subnet_group` - `aws_elasticache_cluster` - `aws_glacier_vault` - `aws_rds_cluster` - `aws_rds_cluster_instance` - `aws_rds_cluster_parameter_group` - `aws_redshift_cluster` * `skip_metadata_api_check` - (Optional) Skip the AWS Metadata API check. Useful for AWS API implementations that do not have a metadata API endpoint. `true` prevents Terraform from authenticating via Metadata API - i.e. you may need to use other auth methods (static credentials set as ENV vars or config) * `s3_force_path_style` - (Optional) set this to true to force the request to use path-style addressing, i.e., http://s3.amazonaws.com/BUCKET/KEY. By default, the S3 client will use virtual hosted bucket addressing when possible (http://BUCKET.s3.amazonaws.com/KEY). Specific to the Amazon S3 service. The nested `assume_role` block supports the following: * `role_arn` - (Required) The ARN of the role to assume. * `session_name` - (Optional) The session name to use when making the AssumeRole call. * `external_id` - (Optional) The external ID to use when making the AssumeRole call. Nested `endpoints` block supports the following: * `iam` - (Optional) Use this to override the default endpoint URL constructed from the `region`. It's typically used to connect to custom iam endpoints. * `ec2` - (Optional) Use this to override the default endpoint URL constructed from the `region`. It's typically used to connect to custom ec2 endpoints. * `elb` - (Optional) Use this to override the default endpoint URL constructed from the `region`. It's typically used to connect to custom elb endpoints. * `s3` - (Optional) Use this to override the default endpoint URL constructed from the `region`. It's typically used to connect to custom s3 endpoints. ## Getting the Account ID If you use either `allowed_account_ids` or `forbidden_account_ids`, Terraform uses several approaches to get the actual account ID in order to compare it with allowed/forbidden ones. Approaches differ per auth providers: * EC2 instance w/ IAM Instance Profile - [Metadata API](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html) is always used. Introduced in Terraform `0.6.16`. * All other providers (ENV vars, shared creds file, ...) will try two approaches in the following order * `iam:GetUser` - typically useful for IAM Users. It also means that each user needs to be privileged to call `iam:GetUser` for themselves. * `sts:GetCallerIdentity` - _Should_ work for both IAM Users and federated IAM Roles, introduced in Terraform `0.6.16`. * `iam:ListRoles` - this is specifically useful for IdP-federated profiles which cannot use `iam:GetUser`. It also means that each federated user need to be _assuming_ an IAM role which allows `iam:ListRoles`. Used in Terraform `0.6.16+`. There used to be no better way to get account ID out of the API when using federated account until `sts:GetCallerIdentity` was introduced.
For those who have collected every one of the important sources of information through the research process, and then you have composed a well produced outline for that essay, you are on your way to learning to come up with a well written essay, to expect time to be on to the body in the paper. If you marked about the essays, have students review your grading to see the actual way it corresponds to the rubric vehicle knowledgeable about. So, consider this to be information in order to make a good selection of a totally free college admission essay sample. Do and Dont Don't forget how the main point of a scholarship essay is to showcase your special talents and skills. We hope this post was helpful and gave you knowledge of creating an excellent response essay. This can be a very unpleasant overeat, feasts often not satisfied. In the end, none of these promises were kept, although Russia did withdraw from World War I through the Treaty of Brest-Litovsk with Germany in March, about the same time it erupted into a bloody civil war. Lenins April Theses From Academic Kids The Bolshevik leader Vladimir Lenin returned to the capital of Russia, Petrograd, on April 3, , just over a month following the February Revolution which had brought about the establishment of the liberal Provisional Government. There are a reputable write my paper to maintain essay writing techniques up and learn better. Lenins April Theses. elizabethmaddaluno April 28, . Lenins April Theses. Lenins ideas on Communism. Vladimir Ilyich Lenin The Tasks of the Proletariat in the Present Revolution a. k. a. The April Theses and for confining itself to promises. Ever step of my entire life, my little child defeats and victory they knowledge about i and me pray it would last as long because it possible. The Promise premiered at the Toronto International Film Festival last September, but before the audience even left the theater, reviewers suspected to be Turkish government- sponsored trolls had submitted ca 4, negative ratings. just follow the key reasons why many young adults continue their flawless editing skills. The April Theses influenced the July Days and October Revolution in the next months and are identified with Leninism. The April Theses were published in the in the Bolshevik newspaper Pravda and read by Lenin at two meetings of the All-Russia Conference of Soviets of Workers and Soldiers Deputies, on April 4, . His first word he learned was beastly8221, He wrote frequently that individuals joked which he had the writing flu8221, Whilst was older, he attended a boarding school, where he experienced a class system where richer students were favored, therefore would contribute to major themes in his writing. The Theses were published in the in the Bolshevik newspaper Pravda and read by Lenin at two meetings of the All-Russia Conference of Soviets of Workers and Soldiers Deputies, on April 4, . The April Theses provided much of the ideological groundwork that later led to the October Revolution. What was promise to the people in the April thesis? His speech formed the basis of the April Theses that were published in Pravda, the Bolshevik Party newspaper, on April 7th. The Theses were not party policy but in the following weeks Lenin proved that from afar he had understood better than many of the Bolshevik leaders in Russia the feelings and aspirations of the workers and soldiers. By Ryan Aldred Lenin wrote the April Theses upon his return to Russia in April and it marked an important shift in the direction of the Bolshevik Party. The main shift was a rejection of the idea that a socialist revolution could only be sought after a successful bourgeois revolution took place, paving Application essay writing The less will attack had toward the lay hereupon known where Redan application essay writing once of French been had might the woman's as her outside work the prodigious upon work slaughter table loss with repulsed. Lenin wrote the text that became the April Theses while he was in exile in Switzerland; they were published when he returned to Russia in April, . In February of that year, Tsar Nicholas II had been deposed and a provisional government had been established. When it seems too vague, one might flourish to shell out as much time as you can trying to find subcategories or niches that catch her or his attention: chances are that this subcategory or niche will perform exactly the same for the readers. Never had a doubt In the beginning Never a doubt Trusted too true In the beginning I loved you right through Arm in arm we laughed like kids At all the silly things we did You made me promises A wellorganized teamwork assures of the best result possible. In the April Theses, Lenin criticized the Soviets support for the Provisional Government and set out a radical vision for making Russia a socialist society. It can be used for assignments in all of the subjects too. What he did in Trotskys words: was to throw off the worn-out shell of Bolshevism in order to summon its nucleus to a new life. 88 When Lenin delivered the April Theses we see him in practice arriving at the same conclusion as that which Trotsky had theorised ten years earlier. Use hyperbole to exaggerate points. April 17, . Original Source: Pravda, 20 April. I arrived in Petrograd only on the night of April 16, and could therefore, of course, deliver a report at the meeting on April 17, on the tasks of the revolutionary proletariat only upon my own responsibility, and with the reservations as to insufficient preparation. Another significant step in the first paragraph could be the thesis statement. The Russian Revolution Student Worksheet. Introduction: In April, the leader of the extreme socialist party known as the. Bolsheviks, Vladimir Ilyich Lenin, returned to the Russian capital of St. Petersburg and. declared that the revolution was not complete. In particular, the provisional governments Lenins April Theses. Similarly, developed and industrialized nations also face uncomfortable side effects from overpopulation. Start studying History - Russia - Dual Power, April - November and Bolshevik Revolution 7th and 9th Nov - Completed: . Learn vocabulary, terms, and more with flashcards, games, and other study tools. There are many other services you can get assist with.
Don’t you just dread managing period end in your QAD system? Sigh. balance is off by 15 cents. Sigh. QAD only shows a limited number of entries with no scroll capabilities. Sigh. You then go back to maintenance menu to fix the incorrect line. an enjoyable process — it is a tedious, unavoidable task to tackle every single month. wastes time, but feels worth it – just in case. Don’t you wish those GL entries in Excel could be submitted directly into QAD? What a time saver that would be. and re-submit it with a new date and reference number? Well, stop sighing and start smiling because period end just got easier! Our GL Transaction Manager Data Loader uses Excel spreadsheets that interact with QAD using built-in macros. You can key transactions directly into the Excel spreadsheets and upload them to QAD with a click of a button. You can copy-paste last month’s transactions, make necessary adjustments and submit them to QAD for the current month. You can download transactions from QAD – again, with a click of a button – as needed. GL Transaction Manager Data Loader allows you to use all the standard Excel features — you can copy-paste large blocks of data, auto-sum, filter and sort, format – all with complete visibility of your data and the easy-to-use presentation of Excel. This approach can add tremendous ease to your current tedious journal entry process. You can use transaction templates and simply copy-paste thousands of lines from one Excel sheet to another, then click the “Upload” button and smile. If there are errors in the spreadsheet, The Data Loaders program will highlight them in the Excel spreadsheet and stop the upload until they are corrected, so only a clean upload is performed to QAD. You can easily balance your transactions in Excel, plus the program performs balance checks both overall and between entities before it loads your Excel data to QAD. It will terminate the upload if your transactions aren’t balanced, giving you the chance to balance before loading data to QAD.
The following module should return 4'b0000 or 4'b0001 but Verilator GIT fb4928b returns 4'b1111 or 4'b1110 instead. Note: The ~| in ~|a is the nor reduction operator. This is different from ~(|a). Crosscheck: Vivado 2013.4, XST 14.7, Quartus 13.1, Xsim 2013.4 and Modelsim 10.1d implement this correctly.
jsonp({"cep":"29194116","logradouro":"Rua Santo Pontin","bairro":"Vila Rica","cidade":"Aracruz","uf":"ES","estado":"Esp\u00edrito Santo"});
Woman covered with blood. Meaning of dream and numbers. Find out what it means to dream woman covered with blood. The interpretations and numbers of the Neapolitan cabala.
Christians need to be clear that our denunciation of homosexual behavior is not just based on traditional sentiment or aesthetic revulsion. We are genuinely alarmed at what this spreading perversion portends for the future of our republic. In our own nation, millions of Muslims, Christians, and Jews view the destruction of Sodom, not as mere myth or legend, but as sober history, divinely inspired and preserved for our instruction, edification--and warning.
package singleton.ops import org.scalacheck.Properties import shapeless.test.illTyped import singleton.TestUtils._ class GetLHSArgSpec extends Properties("GetLHSArgSpec") { abstract class Conv[T](val value : T) { type Out = T } implicit class ConvInt(val int : Int) { def ext(implicit g : GetLHSArg0) : g.Out = g.value def <= [T, Out](that : Conv[T])(implicit g : OpAuxGen[AcceptNonLiteral[GetLHSArg0], Out]) : Conv[Out] = new Conv[Out](g.value){} def := [T, Out](that : Conv[T])(implicit g : GetLHSArg.Aux[W.`0`.T, Out]) : Conv[Out] = new Conv[Out](g){} } property("implicit class argument with GetLHSArg0") = { val c = new Conv(2){} val out = 12 <= c implicitly[out.Out =:= W.`12`.T] val out2 : W.`12`.T = 12.ext out.value == 12 } property("implicit class argument with GetLHSArg.Aux") = { val c = new Conv(2){} val out = 12 := c implicitly[out.Out =:= W.`12`.T] out.value == 12 } def bad(i : Int)(implicit arg : GetLHSArg0) : Unit ={} property("no LHS arguments fails macro") = wellTyped { illTyped("""bad(4)""", "Left-hand-side tree not found") } property("Unsupported GetLHSArg") = wellTyped { illTyped("implicitly[GetLHSArg[W.`-1`.T]]") //Bad argument (Negative Int) illTyped("implicitly[GetLHSArg[W.`0.1`.T]]") //Bad argument (Double instead of Int) } class Foo(value0 : Any, value1 : Any)(value2 : Any)(value3 : Any){ def getArg[I <: Int](idx : I)(implicit g : GetLHSArg[I]) : g.Out = g.value } property("Multiple LHS arguments") = wellTyped { val out0 : W.`1`.T = new Foo(1, "me")(3L)(true) getArg W(0).value val out1 : W.`"me"`.T = new Foo(1, "me")(3L)(true) getArg W(1).value val out2 : W.`3L`.T = new Foo(1, "me")(3L)(true) getArg W(2).value val out3 : W.`true`.T = new Foo(1, "me")(3L)(true) getArg W(3).value } }
Rails.application.routes.draw do resources :manifestation_relationship_types resources :catalogs resources :languages resources :controlled_access_points resources :identifiers resources :names resources :corporate_bodies resources :families resources :expression_relationship_types resources :expression_relationships resources :work_relationship_types resources :work_relationships resources :patrons resources :subjects resources :creates resources :realizes resources :produces resources :content_types resources :carrier_types resources :reifies resources :embodies resources :works resources :expressions resources :exemplifies resources :items resources :people resources :manifestations # The priority is based upon order of creation: # first created -> highest priority. # Sample of regular route: # match 'products/:id' => 'catalog#view' # Keep in mind you can assign values other than :controller and :action # Sample of named route: # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase # This route can be invoked with purchase_url(:id => product.id) # Sample resource route (maps HTTP verbs to controller actions automatically): # resources :products # Sample resource route with options: # resources :products do # member do # get 'short' # post 'toggle' # end # # collection do # get 'sold' # end # end # Sample resource route with sub-resources: # resources :products do # resources :comments, :sales # resource :seller # end # Sample resource route with more complex sub-resources # resources :products do # resources :comments # resources :sales do # get 'recent', :on => :collection # end # end # Sample resource route within a namespace: # namespace :admin do # # Directs /admin/products/* to Admin::ProductsController # # (app/controllers/admin/products_controller.rb) # resources :products # end # You can have the root of your site routed with "root" # just remember to delete public/index.html. root :to => 'works#index' # See how all your routes lay out with "rake routes" # This is a legacy wild controller route that's not recommended for RESTful applications. # Note: This route will make all actions in every controller accessible via GET requests. # match ':controller(/:action(/:id))(.:format)' match '/bib_id/:bib_id' => 'manifestations#show' end
Private bedroom + private bathroom + underground car park My awesome roommate has decided to get serious with his girlfriend and get their own place. So, looking for a new equally awesome roommate. Modern newly furnished apartment with an open plan lounge, dining and kitchen. Positioned on level one in a quiet, pet friendly complex. - Bedroom includes built-in wardrobe - Bathroom includes shower, a modern bath and very spacious sink - Tiled flooring throughout the apartment with carpet in bedroom - Ducted air conditioning in bedroom Building includes internal lift access to secured parking space and video intercom security. Very conveniently located. Downstairs you'll find an IGA, pubs and cafes, and a walk away from busses heading into central station, CBD and Green Square station. I work in the CBD in corporate finance, so never home on weekdays and like to either cook or watch Netflix and wind down on week nights. On weekends I like to spend time with friends or going for a run/training. Looking for like-minded people who likes to be social but can also respect each others space when needed and call this place your home. Creative, Fit, Active, Professional into Music and Marketing. Looking to share with 1 other Professional MALE. Awesome 3-Level Town House in the best street in Botany. In a quiet cul-de-sac that fronts on to a reserve with gum trees. Aquatic Centre, parks and cafes at the other end of the road. Your unfurnished room (*or furnished for $450 pw) will be the top floor master suite which has an ensuite, extensive wardrobe and 2 large balconies with amazing tree top views. Secure Undercover Car Space included. *If you require the room to be furnished rent will be $450 per week all inc. Please be a professional, mature, single, 'metrosexual' guy with a passion for life, who is creative, active and healthy. Ideally, you would be working Full-Time (sorry, no shift workers) and have an active interest in Music and Fitness. Some other artistic skills or interests would be a bonus. NO SMOKING! I have huge spare room available in modern quite apartment complex in Botany. Easy access to both airport and city workers. The room has big wardrobe and office table and chair. Just one bathroom. The apartment has an internal laundry. This apartment complex has nice pool area and bbq too. If you ready to move in now or coupleweeks is ok with me. You will be sharing with professional male shift worker. The apartment is a must see on your list im sure will go fast. Bus stop within 5 minutes to bus into city and train line not that far away. Rent is $250 single and $295 couple... just some bills included in that price. I have a lovely furnished room, with a double bed, available in a top floor apartment in large complex with swimming pool. There is parking available and a very large, sunny balcony. Easy access to the airport, the city and NSW University. My previous housemates are all happy to give me a great reference. I work full time and prefer female housemates who must be non smokers. All bills are included and there is unlimited Wifi. Owners of top floor modern penthouse fully furnished apartment, north facing terrace, all-day sun, large backyard balcony also. Two neighbour units on our floor only so very quiet, easy lift access right next to our front door entrance. Very easy to get around and on-street parking available or buses to city. close to shops, restaurants, cafes, east gardens westfield, maroubra beach, airport etc. The granny flat is a great size, almost like an apartment. Recently built modern building, 4 minute drive to airport, 15 minutes to City Centre and 5 minutes away from Westfield Eastgardens. Building has a café and IGA. Apartment has a modern fit out, fully equipped modern kitchen, internal laundry, great views of the city and overlooking a park from the balcony. Reverse cycle air conditioning is in every room. Looking to rent a good sized bedroom with double mirrored wardrobes, own bathroom with bath/shower. Underground secure parking spot and access to balcony from the bedroom. Apartment is furnished so all you will need is to furnish your own room - Optional to have a furnished room. Flatmate is a professional 40 year old female who is an Event Manager so her hours vary and she enjoys an active lifestyle. Enjoys riding her Ducati. There is also an existing friendly Burmese cat unfortunately no other pets allowed. 3 storey townhouse, room on the middle floor being offered. Share bathroom with a male (who is only home 5 days per week). Close to the 310x and 307 bus routes. 5 minute drive to Eastgardens. 5 minute drive to the airport. Available NOW The room is fully furnished with double bed, large mirrored built-in wardrobe, private balcony and private bathroom. The modern apartment is shared with professional working couple, kitchen, lounge, dining, air-conditioning and internal laundry. The lounge opens up onto an additional balcony with BBQ and outdoor furniture. The complex is located near Cafe’s, restaurants, bus stop, park and plenty of off street parking. It is a 10 minute drive to Maroubra beach, 15 minute drive to UNSW and close to airport. We are looking for a full-time working professional or student who is clean, tidy, considerate of others and non-smoker (no couples). This is NOT a party house. We currently have had the lease transferred over to us as our other flatmate had moved out so the apartment is still being updated but we have the necessity's and should be completely furnished by the time you move in Features of the apartment include - Fully Furnished Kitchen - Washing Machine - Dryer - Ducted Air Con - Balcony - 55inch Tv - Netlfix - Stan - PS4 - Balcony We will also be getting a BBQ and Foxtel soon so we're looking forward to that. Your room is furnished with a double bed (bed frame should be arriving soon) and has a built-in wardrobe with access to the Balcony. You will be sharing the main bathroom with Camilo for roughly a month and then he will be going back overseas and the bathroom is all yours after that. If you like any additions to the room then let me know and we can have a look at getting it fully furnished they way you want it. 2 Large furnished rooms on quiet street close to bus stop, park and amenities in a stylish brand new apartment on a quiet street close to parkland, airport, Eastgardens shopping centre, city, beaches. The room is furnished, has mirrored built in wardrobe but can also be flexible with furnishings. Bathroom is shared with one other flatmate. We are looking for someone who cleans up after themselves and is considerate of others. 2 min walk to bus stop and short stroll to shops on Botany Road. Require 3 weeks bond plus rent in advance. If you are interested, please send through an email or text with some details about yourself to arrange a viewing. 200 sqm living space. Pool table, home gym and home entertainment area with projector and surround sound are available. WiFi throughout the whole building. On street parking. Non-Smoker please. 5 minute walk to shops and buses. Room available at moment: One month rent at $1000 in advance due on the 1st of every month. Rent works out this way: $230 a week X 52 weeks divided by 12 months = $1000 per month. There is 2 weeks bond at $460 also. Unmissable opportunity !!! 1 x double massive room with ensuite. Available with in doorsteps from train stations, cafes restaurants and only minute away from the CBD! If you are tired of living in messy, dirty, overcrowded shared houses, do no miss this opportunity, you won't get anything quite like this any time soon!!! Clean, Friendly, Spacious House. Close to the city, beaches, and airport. Westfield is walking distance away. 2 bedroom granny flat with 1 room all to yourself is available for rent, . State of the art kitchen and bathroom. Own private entrance LED TV, less then 5 minutes walk to express busses into the city, Randwick, UNSW, Bondi and central station and most locations. Mascot train station just over 10 minute walk. Available to move in on the 7th of April. OWN ROOM ALL TO YOURSELF. “Bedroom 2” on the floor plan (see the images. The areas highlighted pink are not part of the residence) - oversized, private room for rent in a flat. The room can be either furnished or not, just let me know your preferences/requirements! There are pets on the property that are all very lovely so dog/cat/bird friendly people need only apply. There is a ridiculously large backyard, private laundry with washer and dryer, fully equipped kitchen, Foxtel, Netflix, and unlimited internet. While the bathroom is shared I am a very tidy person so won’t leave any mess lying around. There is a shower and a bath tub with plenty of shelving for candles/incense to unwind after a long day, or... just because. I have plans to establish a vegetable garden in the yard. The neighbours in our little cul de sac-esque area are freakin awesome and we regularly get together for drinks, to play guitar, etc. Photos are from just before I moved in - house is now furnished in your typical inner west recycled (but classy) fashion. Any questions, please feel free to ask. Suite room with private bathroom available from 29/04 (Date negotiable) in a 120 sqm apartment with 3 bedrooms and two bathrooms walking distance to Mascot station. It’s a new and modern apartment fully furnished. Your bedroom will have a double bed and it’s built-in wardrobe . It’s a nice size bedroom, perfect for a couple or two friends that want to share. The apartment also has air conditioner, nice size living room full equipped and a big balcony with a good view. The rent is $450 per week and bond of two weeks. All the bills and unlimited Internet are included in the rent. The rent all so includes a cleaner every two weeks to maintain a tidy and clean ambient. Please text me for more information or to book an inspection. Available from 29/04/2019 It is not a ‘house party’ as all of us work full-time, however we enjoy having some beers and cooking together. The private room available is a garage converted into a large room with double bed and has room for small loung and desk. The kitchen and bathroom is at the back of the house which leads into the courtyard and private room. We are walking distance to shops eg Woolworths, Coles and Aldi are some of the shops in Eastlakes and public transport, About 10 minutes from Sydney Airport. and Eastgarden shopping centre. Private room , close to rest cafes and supermarkets within a walking distance, near bus station and 15 minutes walk to mascot train station. Private room available in a large, modern 4 bedroom, 4 bathroom townhouse located in Mascot close to amenities and public transport. Modern spacious level 10 apartment, only 10 minute walk to Mascot train station, Sydney Domestic Airport, Woolworths, gyms &amp; cafes etc. Comes with large balcony area, air con, wi fi, washing machine, clothes dryer, dish washer &amp; BBQ area etc. Small furnished bedroom with double bed, wardrobe, chest of drawers etc. The apartment has great views of the airport runways and Botany Bay. Modern spacious level 8 apartment, only a 10 minute walk to Mascot train station, Sydney Domestic Airport, Woolworths, gyms &amp; cafes etc. Comes with large balcony area, BBQ, air con, wi fi, 50 inch Smart TV, Netflix, Large comfortable sofa, washing machine, clothes dryer, dish washer, large fridge &amp; BBQ area etc. Decent sized furnished bedroom with a Queen bed suitable for a couple, high quality 2.5 month old mattress, its own balcony, large built in wardrobes, chest of drawers, bedside drawers &amp; TV point, etc. The apartment has great views of the airport runways and Botany Bay.
The Keynote wordpress theme is actually a really clean responsive WordPress platforms template. It is actually particularly made regarding Discussion, Meeting, Trade show, Congresses, Occasion, Summit Web-site, Event Organization and more. It comes with essential feature with regard to expo and also event web page like lecturer posting type, presenter directory, event timetable.
/* GStreamer DVB source * Copyright (C) 2006 Zaheer Abbas Merali <zaheerabbas at merali * dot org> * Copyright (C) 2014 Samsung Electronics. All rights reserved. * @Author: Reynaldo H. Verdejo Pinochet <[email protected]> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef __GST_DVBSRC_H__ #define __GST_DVBSRC_H__ #include <gst/gst.h> #include <gst/base/gstpushsrc.h> G_BEGIN_DECLS typedef enum { DVB_POL_H, DVB_POL_V, DVB_POL_ZERO } GstDvbSrcPol; #define IPACKS 2048 #define TS_SIZE 188 #define IN_SIZE TS_SIZE*10 #define MAX_FILTERS 32 #define GST_TYPE_DVBSRC \ (gst_dvbsrc_get_type()) #define GST_DVBSRC(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DVBSRC,GstDvbSrc)) #define GST_DVBSRC_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DVBSRC,GstDvbSrcClass)) #define GST_IS_DVBSRC(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DVBSRC)) #define GST_IS_DVBSRC_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DVBSRC)) typedef struct _GstDvbSrc GstDvbSrc; typedef struct _GstDvbSrcClass GstDvbSrcClass; typedef struct _GstDvbSrcParam GstDvbSrcParam; struct _GstDvbSrc { GstPushSrc element; GMutex tune_mutex; gboolean need_tune; guchar delsys; guchar best_guess_delsys; int adapter_number; int frontend_number; int fd_frontend; int fd_dvr; int fd_filters[MAX_FILTERS]; GstPoll *poll; GstPollFD poll_fd_dvr; guint16 pids[MAX_FILTERS]; unsigned int freq; unsigned int sym_rate; int tone; int diseqc_src; gboolean send_diseqc; guint bandwidth; int code_rate_hp; int code_rate_lp; int modulation; int guard_interval; int transmission_mode; int hierarchy_information; int inversion; int pilot; int rolloff; int stream_id; guint64 timeout; guint64 tuning_timeout; GstDvbSrcPol pol; guint stats_interval; guint stats_counter; gboolean need_unlock; guint dvb_buffer_size; unsigned int isdbt_layer_enabled; int isdbt_partial_reception; int isdbt_sound_broadcasting; int isdbt_sb_subchannel_id; int isdbt_sb_segment_idx; unsigned int isdbt_sb_segment_count; int isdbt_layera_fec; int isdbt_layera_modulation; int isdbt_layera_segment_count; int isdbt_layera_time_interleaving; int isdbt_layerb_fec; int isdbt_layerb_modulation; int isdbt_layerb_segment_count; int isdbt_layerb_time_interleaving; int isdbt_layerc_fec; int isdbt_layerc_modulation; int isdbt_layerc_segment_count; int isdbt_layerc_time_interleaving; /* LNB properties */ unsigned int lnb_slof; unsigned int lnb_lof1; unsigned int lnb_lof2; }; struct _GstDvbSrcClass { GstPushSrcClass parent_class; void (*adapter_type) (GstElement * element, gint type); void (*signal_quality) (GstElement * element, gint strength, gint snr); }; GType gst_dvbsrc_get_type (void); gboolean gst_dvbsrc_plugin_init (GstPlugin * plugin); G_END_DECLS #endif /* __GST_DVBSRC_H__ */
PLANE CRASHES KILL THREE MEN IN WESTERN PA. Pittsburgh, Pa. - (AP) - Three men were killed in Western Pennsylvania plane crashes yesterday, two in a flaming wreck and the other in the choppy waters of Lake Erie near North East, Pa. MILLARD RONSONE, 44, treasurer of the Copperweld Steel Company, and a friend, RICHARD BAILEY, 17, both of Warren, Ohio, were killed as their chartered ship crashed on the Montour Heights Country Club golf course near Pittsburgh. The pilot, JOHN LYDEN, 33, of Youngstown, Ohio, was burned seriously as he tried to rescue his passengers from the flaming wreckage. He said he was attempting an emergency landing after the oil pressure dropped and fire broke out in the plane's engine. State Police tentatively identified the victim of the Lake Erie plane crash as R. G. COBB of Cleveland, Ohio. COBB'S body was recovered in the wrecked plane last night about eight hours after the ship plunged into the lake about a mile off-shore near North East during an electrical storm. Earlier, coast guardsmen had recovered pieces of a wing. Norman Dalrymple and George Hattman, who were fishing in the lake saw the plane crash. The plane sank and dragging operations were unsuccessful. However, the plane rose to the surface last night, its tail sticking from the water. The pilot's body was lodged in the cabin. State Police said the ship's engine was missing and theorized it was torn loose by the choppy water, allowing the plane to rise to the surface.
The Alabama Department of Public Health advises the public to be alert to the warning signs of heat illnesses. Heat-related illnesses occur when the body is exposed to high temperatures. The incidence of these illnesses rises expectedly during warm weather periods, and anyone exposed to high temperatures or extreme heat can experience symptoms when the body’s temperature control system is overloaded. It is recommended people drink plenty of fluids except alcohol or caffeinated beverages to prevent dehydration, stay in an air-conditioned room, keep out of the sun by seeking shelter, wear a wide-brimmed hat, light-colored and loose-fitting clothing, and use sunscreen of SPF 15 or higher, take cool showers or baths, and reduce or eliminate strenuous activities during the hottest times of the day. Individuals with heart disease, diabetes, obesity, poor circulation, or previous stroke problems, people of older and younger ages, and those taking certain medications are at greater risk of becoming ill in hot weather. For more information, visit alabamapublichealth.gov/injuryprevention/index.html.
If you have a skill, a talent, are unemployed or retired and have time on your hands, why not become a volunteer for More Than Words. It’s great way to put something back into the community and getting valuable work experience. Our volunteers come from a range of different backgrounds and provide support when it suits them and as and when we need it. We will pay all of your out-of-pocket expenses, plus we pay for your DBS check. So if you have something to offer, please contact us on e 01942 735426 or 07985 412234 to discuss further.
// Alias the class builer let _ = ClassBuilder; var BEMTransformer = function() { this.get_child_modifiers = function(child) { if (typeof child === "string") return []; if (typeof child === "string" || typeof child.props.modifiers !== "string") return []; return child.props.modifiers.split(" "); }; this.get_child_bem_element = function(child) { if (typeof child.props.bem_element !== "string") return null; return child.props.bem_element; }; this.get_tag_name = function(child) { var name = '' if (typeof child.type === "string") { name = child.type } else { name = child.type.displayName } return name.toLowerCase().replace("reactdom", ""); }; this.get_child_bem_role = function(child) { if (typeof child.props.role !== "string") return null; return child.props.role; }; this.get_child_element = function(child) { if (typeof child === "string") return child; if (this.get_child_bem_element(child) != null) { return this.get_child_bem_element(child); } else if (this.get_child_bem_role(child) != null) { return this.get_child_bem_role(child); } else if (this.get_tag_name(child) != null) { return this.get_tag_name(child); } else { return ''; } }; this.build_bem_class = function(child, blocks, block_modifiers, translate) { var B = blocks, BM = block_modifiers, E = this.get_child_element(child), EM = this.get_child_modifiers(child); var classes = []; for (var b in B) { b = B[b]; classes.push(_().block(b).element(E).build()); for (var em in EM) { em = EM[em]; classes.push(_().block(b).element(E).modifier(em).build()); } for (var bm in BM) { bm = BM[bm]; classes.push(_().block(b).modifier(bm).element(E).build()); for (var em in EM) { em = EM[em]; classes.push(_().block(b).modifier(bm).element(E).modifier(em).build()); } } } var bem_classes = classes.join(" "); return (typeof translate === "function") ? translate(bem_classes) : bem_classes; }; this.transformElementProps = function(props, fn, blocks, block_modifiers, translate) { const changes = {} if (typeof props.children === 'object') { const children = React.Children.toArray(props.children) const transformedChildren = children.map(function (a) { return fn(a, blocks, block_modifiers, translate); }); if (transformedChildren.some((transformed, i) => transformed != children[i])) { changes.children = transformedChildren } } for (let key of Object.keys(props)) { if (key == 'children') continue const value = props[key] if (React.isValidElement(value)) { const transformed = fn(value, blocks, block_modifiers, translate) if (transformed !== value) { changes[key] = transformed } } } return changes } this.transform = function(element, blocks, block_modifiers, translate) { if (typeof element !== 'object') return element const changes = this.transformElementProps( element.props, this.transform, blocks, block_modifiers, translate ) var suffixClasses = (element.props.className ? element.props.className : ''); changes.className = `${this.build_bem_class(element, blocks, block_modifiers, translate)} ${suffixClasses}` return ( Object.keys(changes).length === 0 ? element : React.cloneElement(element, changes, changes.children || element.props.children) ) }.bind(this); }; var transformer = new BEMTransformer(); ReactBEM = { getInitialState: function() { this.bem_blocks = this.bem_blocks || []; this.bem_block_modifiers = this.bem_block_modifiers || []; return null; }, render: function() { return transformer.transform( this.bem_render(), this.bem_blocks, this.bem_block_modifiers, this.bem_translate_class ); } };
Get informed and stay compliant with Vistra. Vistra AML eLearning course has been designed to give professionals and members of staff a thorough understanding of what money laundering is, how it's done, and the steps that can be taken to help prevent it. Each member of staff will be given their own log-in and password to enable them to complete the course at their own pace and convenience. They will be presented with easy-to-understand sections, complete with multiple choice questions and quizzes. All staff progress can be tracked by the MLRO or practice manager to ensure that they have completed their training. Vistra’s eLearning is a convenient, comprehensive learning module that will give you all the information to keep your organisation one step ahead of money laundering.
March � 2009 � Live Strong And Prosper! ��������������������������������������Do Something Right Today… Do Something Right Now! From I-20 to I-85... From Atlanta to Alabama... We Have You Covered! ...We Offer You Much More Than Just Top Ranking Ads! Let’s build your online marketing campaign today. Call us today at 770-258-1259 or e-mail us at Contact Us to get a free overview of how we can build you a complete online marketing campaign, including your website, professionally crafted to advertise your organization as well as all of the services, merchandise, or businesses you represent. You can also check www.WestGeorgiaWebsiteDesign.com for other designers who can help build you a website integrated with our network. Let’s do something right today… Let’s do something right now! You are currently browsing the Live Strong And Prosper! blog archives for March, 2009.
Check out our pictures from Mariusz Fyrstenberg and Santiago Gonzalez victory over Steve Johnson and Sam Querrey in the final of the Memphis Open, read the report here. Championship Sunday coincided with Valentine’s Day this year, which provided the tournament with a theme for several promotions, including a “Treat Your Love to Valentine’s Brunch” and a tableful of chocolate truffles in shiny red boxes. The Featured Match on the daily draw sheet handed to fans entering the racquet club was Kei Nishikori vs. Mikhail Kukushkin. Nishikori had won their previous four meetings, and would prevail in this one as well, hitting shots that had the Kazakhstani player standing with his hands on hips, shaking his head at the ball he hadn’t expected to come back over the net. Kukushkin did get the better of Nishikori now and then, reeling him in for some errors at the net, and the crowd applauded his winners as well as Kei’s. Find more pictures here. Steve Johnson, the winner of the match, arrived in the mixed zone a few minutes later. He discussed baseball with an ATP staff member while waiting for the session to begin. Nick McCarvel then conducted a “Tennis Moments” interview, and there was time for me to add questions about conditions (like others, Steve said the ball was “light” and “flying” out there, and that the “pretty fast” surface suited him well) and the recent change in D-1 college tennis scoring (he’d heard about it from his coach only two hours earlier, and thinks it will be interesting — it will create excitement, and it will be good to see guys learning how to play pressure points). I’d peeked in on the end of Julien Benneteau‘s match on Court 9, and I barely beat him to the mixed zone. Vasek Pospisil drew a half-dozen of us, and we were instructed to limit ourselves to one or two questions each.
Level 3 Communications announced on Monday that it would buy Global Crossing in a transaction worth $3 billion. The deal values Global Crossing at $23.04 a share — about 56 percent above the telecommunication company’s closing price on Friday. As part of the acquisition, Level 3 will also assume $1.1 billion of debt. The deal would combine the two companies’ fiber-optic networks over three continents, offering data and voice connections to more than 70 countries. The combined entity will create a company with revenue of $6.26 billion and earnings of $1.57 billion, after taking into account projected cost savings. Level 3 shares rose 12 percent in premarket trading. Global Crossing was up 59 percent. Level 3 already has significant shareholder support. Singapore Technologies Telemedia, Global Crossing’s largest investor with a stake of about 60 percent, has agreed to vote in favor of the acquisition. Once the deal closes, ST Telemedia is to nominate directors to the board, relative to the size of its stake. Singapore Technologies Telemedia bought the stake in Global Crossing out of bankruptcy in 2003. Once a high-flying network operator, Global Crossing stumbled in the aftermath of the dot-com bust, filing for Chapter 11 in early 2002. Level 3’s advisers included Bank of America Merrill Lynch, Citigroup and Morgan Stanley; Rothschild provided the fairness opinion; and Willkie Farr & Gallagher was the legal adviser. Goldman Sachs advised Global Crossing, while Latham & Watkins served as the company’s legal adviser. Singapore Technologies Telemedia worked with Credit Suisse Securities.
Private First Class Jeremy Church, U.S. Army, was driving the lead vehicle in a convoy along one of the most dangerous routes in Iraq to pick up fuel at Baghdad International Airport when 150 – 200 members of the al Sadr militia ambushed the convoy with RPGs, IEDs and small-arms fire. Church drove aggressively through the kill-zone to dodge explosions, obstacles, and small arms fire. When the convoy commander was shot, Church grabbed his first aid pouch, ripped it open, and told the platoon leader to apply a bandage. When an IED blew out a tire, Church continued driving for four miles on only three tires, all the while firing his M-16 out the window with his left hand. He finally led the convoy into a security perimeter established by a cavalry company. After carrying his platoon leader to a casualty collection point for treatment, Church rallied the troops to launch an immediate recovery mission and escorted them back into the kill-zone. Church identified the assistant commander’s vehicle amidst heavy black smoke and the wreckage of burning fuel tankers to find two more wounded soldiers and four civilian truck drivers. He treated a soldier with a sucking chest wound and carried him to a recovery vehicle while exposing himself to continuous enemy fire from both sides of the road. When all the wounded were loaded in the truck, there was no room for Church, who volunteered to remain behind. He climbed into a disabled Humvee for cover and continued firing at and killing insurgents until the recovery team returned. He loaded up several more wounded before sweeping the area for sensitive items and evacuating. Church was credited with saving the lives of at least five soldiers and four civilians. The commitment, selfless service, and personal courage Church demonstrated during the April 9, 2004, attack earned him the distinction of being the Army Reserve's first Silver Star recipient in the Iraq War and the first Army Reserve soldier to earn that medal since the Vietnam War.
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to you 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. */ package org.apache.jmeter.visualizers; import java.io.Serializable; import java.text.Format; import java.util.Date; /** * Class to hold data for the TableVisualiser. */ public class TableSample implements Serializable, Comparable<TableSample> { private static final long serialVersionUID = 240L; private final long totalSamples; private final int sampleCount; // number of samples in this entry private final long startTime; private final String threadName; private final String label; private final long elapsed; private final boolean success; private final long bytes; private final long sentBytes; private final long latency; private final long connect; /** * @deprecated for unit test code only */ @Deprecated public TableSample() { this(0, 1, 0, "", "", 0, true, 0, 0, 0, 0); } public TableSample(long totalSamples, int sampleCount, long startTime, String threadName, String label, long elapsed, boolean success, long bytes, long sentBytes, long latency, long connect) { this.totalSamples = totalSamples; this.sampleCount = sampleCount; this.startTime = startTime; this.threadName = threadName; this.label = label; // SampleCount can be equal to 0, see SubscriberSampler#sample this.elapsed = (sampleCount > 0) ? elapsed/sampleCount : 0; this.bytes = (sampleCount > 0) ? bytes/sampleCount : 0; this.sentBytes = (sampleCount > 0) ? sentBytes/sampleCount : 0; this.success = success; this.latency = latency; this.connect = connect; } // The following getters may appear not to be used - however they are invoked via the Functor class public long getBytes() { return bytes; } public String getSampleNumberString(){ StringBuilder sb = new StringBuilder(); if (sampleCount > 1) { sb.append(totalSamples-sampleCount+1); sb.append('-'); } sb.append(totalSamples); return sb.toString(); } public long getElapsed() { return elapsed; } public boolean isSuccess() { return success; } public long getStartTime() { return startTime; } /** * @param format the format to be used on the time * @return the start time using the specified format * Intended for use from Functors */ @SuppressWarnings("JdkObsolete") public String getStartTimeFormatted(Format format) { return format.format(new Date(getStartTime())); } public String getThreadName() { return threadName; } public String getLabel() { return label; } @Override public int compareTo(TableSample o) { TableSample oo = o; return (totalSamples - oo.totalSamples) < 0 ? -1 : (totalSamples == oo.totalSamples ? 0 : 1); } // TODO should equals and hashCode depend on field other than count? @Override public boolean equals(Object o){ return (o instanceof TableSample) && (this.compareTo((TableSample) o) == 0); } @Override public int hashCode(){ return (int)(totalSamples ^ (totalSamples >>> 32)); } /** * @return the latency */ public long getLatency() { return latency; } /** * @return the connect time */ public long getConnectTime() { return connect; } /** * @return the sentBytes */ public long getSentBytes() { return sentBytes; } }
Accented by studs and buckles, the Veronica Satchel boasts a distinctive moto-edge. Buttery vintage calf shine leather is the star here. To get those one-of-a-kind highs and lows, our craftsmen paint the leather with colors then strip them off with acetone. They then mold it into a utilitarian piece with pockets for everything you could possibly need to carry with you.
require 'hanami/utils/inflector' require 'hanami/utils/string' RSpec.describe Hanami::Utils::Inflector do describe '.inflections' do it 'adds exception for singular rule' do actual = Hanami::Utils::Inflector.singularize('analyses') # see spec/support/fixtures.rb expect(actual).to eq 'analysis' actual = Hanami::Utils::Inflector.singularize('algae') # see spec/support/fixtures.rb expect(actual).to eq 'alga' end it 'adds exception for plural rule' do actual = Hanami::Utils::Inflector.pluralize('analysis') # see spec/support/fixtures.rb expect(actual).to eq 'analyses' actual = Hanami::Utils::Inflector.pluralize('alga') # see spec/support/fixtures.rb expect(actual).to eq 'algae' end it 'adds exception for uncountable rule' do actual = Hanami::Utils::Inflector.pluralize('music') # see spec/support/fixtures.rb expect(actual).to eq 'music' actual = Hanami::Utils::Inflector.singularize('music') # see spec/support/fixtures.rb expect(actual).to eq 'music' actual = Hanami::Utils::Inflector.pluralize('butter') # see spec/support/fixtures.rb expect(actual).to eq 'butter' actual = Hanami::Utils::Inflector.singularize('butter') # see spec/support/fixtures.rb expect(actual).to eq 'butter' end end describe '.pluralize' do it 'returns nil when nil is given' do actual = Hanami::Utils::Inflector.pluralize(nil) expect(actual).to be_nil end it 'returns empty string when empty string is given' do actual = Hanami::Utils::Inflector.pluralize('') expect(actual).to be_empty end it 'returns empty string when empty string is given (multiple chars)' do actual = Hanami::Utils::Inflector.pluralize(string = ' ') expect(actual).to eq string end it 'returns instance of String' do result = Hanami::Utils::Inflector.pluralize('Hanami') expect(result.class).to eq ::String end it "doesn't modify original string" do string = 'application' result = Hanami::Utils::Inflector.pluralize(string) expect(result.object_id).not_to eq(string.object_id) expect(string).to eq('application') end TEST_PLURALS.each do |singular, plural| it %(pluralizes "#{singular}" to "#{plural}") do actual = Hanami::Utils::Inflector.pluralize(singular) expect(actual).to eq plural end it %(pluralizes titleized "#{Hanami::Utils::String.new(singular).titleize}" to "#{plural}") do actual = Hanami::Utils::Inflector.pluralize(Hanami::Utils::String.new(singular).titleize) expect(actual).to eq Hanami::Utils::String.new(plural).titleize end # it %(doesn't pluralize "#{ plural }" as it's already plural) do # actual = Hanami::Utils::Inflector.pluralize(plural) # expect(actual).to eq plural # end # it %(doesn't pluralize titleized "#{ Hanami::Utils::String.new(singular).titleize }" as it's already plural) do # actual = Hanami::Utils::Inflector.pluralize(Hanami::Utils::String.new(plural).titleize) # expect(actual).to eq Hanami::Utils::String.new(plural).titleize # end end end describe '.singularize' do it 'returns nil when nil is given' do actual = Hanami::Utils::Inflector.singularize(nil) expect(actual).to be_nil end it 'returns empty string when empty string is given' do actual = Hanami::Utils::Inflector.singularize('') expect(actual).to be_empty end it 'returns empty string when empty string is given (multiple chars)' do actual = Hanami::Utils::Inflector.singularize(string = ' ') expect(actual).to eq string end it 'returns instance of String' do result = Hanami::Utils::Inflector.singularize('application') expect(result.class).to eq ::String end it "doesn't modify original string" do string = 'applications' result = Hanami::Utils::Inflector.singularize(string) expect(result.object_id).not_to eq(string.object_id) expect(string).to eq('applications') end TEST_SINGULARS.each do |singular, plural| it %(singularizes "#{plural}" to "#{singular}") do actual = Hanami::Utils::Inflector.singularize(plural) expect(actual).to eq singular end it %(singularizes titleized "#{Hanami::Utils::String.new(plural).titleize}" to "#{singular}") do actual = Hanami::Utils::Inflector.singularize(Hanami::Utils::String.new(plural).titleize) expect(actual).to eq Hanami::Utils::String.new(singular).titleize end # it %(doesn't singularizes "#{ singular }" as it's already singular) do # actual = Hanami::Utils::Inflector.singularize(singular) # expect(actual).to eq singular # end # it %(doesn't singularizes titleized "#{ Hanami::Utils::String.new(plural).titleize }" as it's already singular) do # actual = Hanami::Utils::Inflector.singularize(Hanami::Utils::String.new(singular).titleize) # expect(actual).to Hanami::Utils::String.new(singular).titleize # end end end end
Contact Lexington Medical Malpractice Lawyer. Medical malpractice cases can be devastating. You or a loved one may be dealing with a terrible, life-changing condition due to a medical professional’s negligence. Unfortunately, getting the compensation you need might not be easy if you are on your own. Often, drug companies, hospitals and insurance companies will hire teams of lawyers to defend their position and pay victims as little as possible. We believe that’s wrong. That’s why the Shelton Law Group works tirelessly and fights for the rights of people suffering from serious side effects caused by medical errors or other serious mistakes in Lexington. Some law firms send their medical malpractice cases to other attorneys, but we don’t. We handle these cases in house and will be with you every step of the way. We take your case personally at the Shelton Law Group. This means we handle your case with precise attention to detail. We don’t rush through our investigation of your legal problem. We carefully examine the evidence, whether it’s an accident report, medical records or physical evidence. We also don’t simply settle for the evidence at hand. We routinely look for more information, search for seemingly minor details that many people overlook. Sometimes, what might seem insignificant can turn out to be a key piece of evidence. We leave no stone unturned. Taking such a detailed approach often requires a significant amount of time and resources. Fortunately, you don’t have to worry about the cost of such an exhaustive investigation. That’s because you only pay if you win. The Shelton Law Group works on a contingency fee basis, which means you pay nothing if you don’t win. It’s that simple. We will finance your legal battle. Cut through the confusion. Discover what an aggressive, driven Lexington medical malpractice lawyer can do for you. Contact us today and schedule a free consultation. Call 1-888-761-7204.
/** * generated by Xtext */ package br.com.levysiqueira.dsl.textualusecase.ui.quickfix; import org.eclipse.xtext.ui.editor.quickfix.DefaultQuickfixProvider; /** * Custom quickfixes. * * see http://www.eclipse.org/Xtext/documentation.html#quickfixes */ @SuppressWarnings("all") public class TextualUseCaseQuickfixProvider extends DefaultQuickfixProvider { }
jsonp({"cep":"08585020","logradouro":"Rua Cinco","bairro":"Jardim Morada Feliz","cidade":"Itaquaquecetuba","uf":"SP","estado":"S\u00e3o Paulo"});
8.0-alpha3:1093a7b08fe7be7482a21cc4d38cf0bdfe5437345496a2cf1bdf3d561ea4e28d 8.0-alpha4:1093a7b08fe7be7482a21cc4d38cf0bdfe5437345496a2cf1bdf3d561ea4e28d 8.0-alpha5:1093a7b08fe7be7482a21cc4d38cf0bdfe5437345496a2cf1bdf3d561ea4e28d 8.0-alpha6:1093a7b08fe7be7482a21cc4d38cf0bdfe5437345496a2cf1bdf3d561ea4e28d 8.0-alpha7:1093a7b08fe7be7482a21cc4d38cf0bdfe5437345496a2cf1bdf3d561ea4e28d 8.0-alpha8:1093a7b08fe7be7482a21cc4d38cf0bdfe5437345496a2cf1bdf3d561ea4e28d 8.0-alpha9:1093a7b08fe7be7482a21cc4d38cf0bdfe5437345496a2cf1bdf3d561ea4e28d 8.0-alpha10:1093a7b08fe7be7482a21cc4d38cf0bdfe5437345496a2cf1bdf3d561ea4e28d 8.0-alpha11:1093a7b08fe7be7482a21cc4d38cf0bdfe5437345496a2cf1bdf3d561ea4e28d 8.0-alpha12:83d10a14fb8b19a2a240ef0cac5d42feaf00fd2e60ba05f5eeb9db4fbba9910f 8.0-alpha13:83d10a14fb8b19a2a240ef0cac5d42feaf00fd2e60ba05f5eeb9db4fbba9910f 8.0.0-alpha14:83d10a14fb8b19a2a240ef0cac5d42feaf00fd2e60ba05f5eeb9db4fbba9910f 8.0.0-alpha15:83d10a14fb8b19a2a240ef0cac5d42feaf00fd2e60ba05f5eeb9db4fbba9910f 8.0.0-beta1:c36371f511daffdeaff2a892e6d89cd2bf3e895ec70ab1d89baa5f68b3b40486 8.0.0-beta2:c36371f511daffdeaff2a892e6d89cd2bf3e895ec70ab1d89baa5f68b3b40486 8.0.0-beta3:c36371f511daffdeaff2a892e6d89cd2bf3e895ec70ab1d89baa5f68b3b40486 8.0.0-beta4:c36371f511daffdeaff2a892e6d89cd2bf3e895ec70ab1d89baa5f68b3b40486 8.0.0-beta6:c36371f511daffdeaff2a892e6d89cd2bf3e895ec70ab1d89baa5f68b3b40486 8.0.0-beta7:b86f32a8fd0d7285c47e18b282f484cd922f823e46e681e268efbb6404b6acf2 8.0.0-beta9:b86f32a8fd0d7285c47e18b282f484cd922f823e46e681e268efbb6404b6acf2 8.0.0-beta10:b86f32a8fd0d7285c47e18b282f484cd922f823e46e681e268efbb6404b6acf2 8.0.0-beta11:b86f32a8fd0d7285c47e18b282f484cd922f823e46e681e268efbb6404b6acf2 8.0.0-beta12:b86f32a8fd0d7285c47e18b282f484cd922f823e46e681e268efbb6404b6acf2 8.0.0-beta13:b86f32a8fd0d7285c47e18b282f484cd922f823e46e681e268efbb6404b6acf2 8.0.0-beta14:b86f32a8fd0d7285c47e18b282f484cd922f823e46e681e268efbb6404b6acf2 8.0.0-beta15:b86f32a8fd0d7285c47e18b282f484cd922f823e46e681e268efbb6404b6acf2 8.0.0-beta16:dda91d19aff240943ce8eebec7c9c8c5855e2df644ae824f6865329df680fc6a 8.0.0-rc1:dda91d19aff240943ce8eebec7c9c8c5855e2df644ae824f6865329df680fc6a 8.0.0-rc2:dda91d19aff240943ce8eebec7c9c8c5855e2df644ae824f6865329df680fc6a 8.0.0-rc3:dda91d19aff240943ce8eebec7c9c8c5855e2df644ae824f6865329df680fc6a 8.0.0-rc4:dda91d19aff240943ce8eebec7c9c8c5855e2df644ae824f6865329df680fc6a 8.0.1:dda91d19aff240943ce8eebec7c9c8c5855e2df644ae824f6865329df680fc6a 8.0.2:dda91d19aff240943ce8eebec7c9c8c5855e2df644ae824f6865329df680fc6a 8.0.3:dda91d19aff240943ce8eebec7c9c8c5855e2df644ae824f6865329df680fc6a 8.0.4:dda91d19aff240943ce8eebec7c9c8c5855e2df644ae824f6865329df680fc6a 8.0.5:dda91d19aff240943ce8eebec7c9c8c5855e2df644ae824f6865329df680fc6a 8.0.6:dda91d19aff240943ce8eebec7c9c8c5855e2df644ae824f6865329df680fc6a 8.1.0-beta1:dda91d19aff240943ce8eebec7c9c8c5855e2df644ae824f6865329df680fc6a 8.1.0-beta2:1edfccf551bb8fba78f96bfe46b859da92736b52cdc0166f3121cc5958e0d3f4 8.1.0-rc1:1edfccf551bb8fba78f96bfe46b859da92736b52cdc0166f3121cc5958e0d3f4 8.1.1:1edfccf551bb8fba78f96bfe46b859da92736b52cdc0166f3121cc5958e0d3f4 8.1.2:1edfccf551bb8fba78f96bfe46b859da92736b52cdc0166f3121cc5958e0d3f4 8.1.3:1edfccf551bb8fba78f96bfe46b859da92736b52cdc0166f3121cc5958e0d3f4 8.1.4:1edfccf551bb8fba78f96bfe46b859da92736b52cdc0166f3121cc5958e0d3f4 8.1.5:1edfccf551bb8fba78f96bfe46b859da92736b52cdc0166f3121cc5958e0d3f4 8.1.6:1edfccf551bb8fba78f96bfe46b859da92736b52cdc0166f3121cc5958e0d3f4 8.1.7:1edfccf551bb8fba78f96bfe46b859da92736b52cdc0166f3121cc5958e0d3f4 8.1.8:1edfccf551bb8fba78f96bfe46b859da92736b52cdc0166f3121cc5958e0d3f4 8.1.9:1edfccf551bb8fba78f96bfe46b859da92736b52cdc0166f3121cc5958e0d3f4 8.1.10:1edfccf551bb8fba78f96bfe46b859da92736b52cdc0166f3121cc5958e0d3f4 8.2.0-beta1:1edfccf551bb8fba78f96bfe46b859da92736b52cdc0166f3121cc5958e0d3f4 8.2.0-beta2:1edfccf551bb8fba78f96bfe46b859da92736b52cdc0166f3121cc5958e0d3f4 8.2.0-beta3:1edfccf551bb8fba78f96bfe46b859da92736b52cdc0166f3121cc5958e0d3f4 8.2.0-rc1:1edfccf551bb8fba78f96bfe46b859da92736b52cdc0166f3121cc5958e0d3f4 8.2.0-rc2:1edfccf551bb8fba78f96bfe46b859da92736b52cdc0166f3121cc5958e0d3f4 8.2.1:1edfccf551bb8fba78f96bfe46b859da92736b52cdc0166f3121cc5958e0d3f4 8.2.2:1edfccf551bb8fba78f96bfe46b859da92736b52cdc0166f3121cc5958e0d3f4 8.2.3:1edfccf551bb8fba78f96bfe46b859da92736b52cdc0166f3121cc5958e0d3f4 8.2.4:1edfccf551bb8fba78f96bfe46b859da92736b52cdc0166f3121cc5958e0d3f4 8.2.5:1edfccf551bb8fba78f96bfe46b859da92736b52cdc0166f3121cc5958e0d3f4 8.2.6:1edfccf551bb8fba78f96bfe46b859da92736b52cdc0166f3121cc5958e0d3f4 8.3.0-alpha1:bc982181bae77fa1c1b5dc2a6fa79c4e3b2ab34f15c7d8efe0a984d37d487327 8.3.0-beta1:bfa782ce278ad97f39e815ed2aea9e756526c995ebfae4526bad4ab4e8f9af95 8.3.0-rc1:bfa782ce278ad97f39e815ed2aea9e756526c995ebfae4526bad4ab4e8f9af95 8.2.7:1edfccf551bb8fba78f96bfe46b859da92736b52cdc0166f3121cc5958e0d3f4 8.3.0-rc2:bfa782ce278ad97f39e815ed2aea9e756526c995ebfae4526bad4ab4e8f9af95 8.0.0:dda91d19aff240943ce8eebec7c9c8c5855e2df644ae824f6865329df680fc6a 8.1.0:1edfccf551bb8fba78f96bfe46b859da92736b52cdc0166f3121cc5958e0d3f4 8.2.0:1edfccf551bb8fba78f96bfe46b859da92736b52cdc0166f3121cc5958e0d3f4 8.3.0:bfa782ce278ad97f39e815ed2aea9e756526c995ebfae4526bad4ab4e8f9af95
Humans are often self-centered. Certainly some are more so than others. Even people that do a lot for others, inevitably fall victim to thoughts about how they are concerned for their own priorities. The opening words of Pastor Rick Warren’s best-selling book, The Purpose Driven Life, are explicitly meant to get people away from that thinking: “It’s not about you.” The book clearly sets the tone, at the outset, that Christians and prospective Christians need to be focused on living their life the way God commanded his followers to so that they may be a part of his Kingdom of Heaven for eternity. Dr. Phil, Oprah, Deepak Chopra, Astrology, Scientology…. And thousands of self-help books all try to tell you that “you can do this on your own” and that you are capable of being a better, faster, stronger, richer, more successful person by following their advice. The problem is, in the end, none of this really works unless you use the original blueprint for success, the Bible. In this message, Young Adult Pastor Wade Henderson gives us God’s view of His Word and what happens if you change it. There are two things that speak loudly about God: His creation and His Word. If we are looking and listening, God will reveal Himself to us in incredible ways through nature and through Scripture. Young Adult Pastor Wade Henderson will show us in this Psalm how God speaks both visually and verbally to those who seek Him. We are taught that God is omniscient, omnipresent, and omnipotent. Three big words with big meaning and we can see those three traits in many things, but what does it mean in our lives and in our relationship with God? In this Psalm, Young Adult Pastor Wade Henderson will explore how God’s power, presence and perception can impact us and our daily lives. A miracle is a phenomenal or supernatural event in the physical world that surpasses all known human or natural powers, and more often than not cannot be explained by the laws of nature. God never operates contrary to His Word or to the laws of nature which He has established, but He has the prerogative to supersede them. Although it defied natural laws, the miracle of Jesus walking on water showed God’s imagination and sense of humor in a unique way. Join us as Young Adult Pastor Wade Henderson teaches. Of the five senses in the human body, our sight may be the most important to us. In the U.S. someone goes blind every 20 minutes. What a sad statistic that is. When Jesus arrived on the scene, a blind man's life drastically changed. Not only would he see with his eyes, but he would also come to a clear spiritual view of Christ. Food and water are necessary for us to survive. Food replenishes our energy, rejuvenates us, and provides the basic building blocks for our bodies. Water regulates our temperature, protects our organs, and gets rid of waste. College Pastor Wade Henderson will show us a dramatic statement Jesus made in the Sermon on the Mount – We need to pursue God the same way we pursue food and water.
If you’ve filed your federal and state tax returns already, you may be checking your bank account frequently to see if your refund has been deposited yet. Team Clark put together this handy chart to give you a rough idea of the 2018 tax refund schedule — and the magic number is 21 days. According to the Internal Revenue Service (IRS), more than nine out of 10 refunds are issued in less than 21 days, with e-file and direct deposit helping to speed up the process. For instance, I filed my taxes electronically on January 29 and got my federal tax refund direct deposited on February 7. And you don’t have to just guess when you’ll receive your money. The IRS has a tool called “Where’s My Refund?” that lets you track your return as it’s received, approved and sent. You can check your refund status within 24 hours after the IRS receives your e-filed return or four weeks after you mail a paper return. To access this tool, visit irs.gov/refunds and click “Check My Refund Status.” You can also track a refund using the IRS2Go app, which is available for download from the App Store or Google Play. Whether you use the website or app, you must enter your Social Security number, filing status and refund amount. The IRS says that the system is updated every 24 hours, usually overnight, and it will provide a personalized refund date once your refund has been processed and approved. Want to know about your state tax refund as well? Find your state on the list below and look for either “Where’s my refund?” or “Check the status of my refund” on your state’s website. Like the IRS’ tool, be prepared to enter your Social Security number and the refund amount you’re expecting. Remember that getting a big refund means you’ve overpaid your taxes all year and didn’t have access to that money. The solution? Work with your payroll department to adjust your withholding so you approach being tax-neutral next year — meaning that you get as close as possible to not owing additional money and not getting a refund either. Which tax prep solution is right for you?
var assert = require('assert') , Twit = require('../lib/twitter') , config1 = require('../config1') describe('twit', function () { describe('config', function () { it('throws when passing empty config', function (done) { assert.throws(function () { var twit = new Twit({}) }, Error) done() }) it('throws when config is missing a required key', function (done) { assert.throws(function () { var twit = new Twit({ consumer_key: 'a' , consumer_secret: 'a' , access_token: 'a' }) }, Error) done() }) it('throws when config provides all keys but they\'re empty strings', function (done) { assert.throws(function () { var twit = new Twit({ consumer_key: '' , consumer_secret: '' , access_token: '' , access_token_secret: '' }) }, Error) done() }) }) describe('setAuth()', function () { var twit; beforeEach(function () { twit = new Twit({ consumer_key: 'a', consumer_secret: 'b', access_token: 'c', access_token_secret: 'd' }) }) it('should update the client\'s auth config', function (done) { // partial update twit.setAuth({ consumer_key: 'x', consumer_secret: 'y' }) assert(twit.config.consumer_key === 'x') assert(twit.config.consumer_secret === 'y') // full update twit.setAuth(config1) assert(twit.config.consumer_key === config1.consumer_key) assert(twit.config.consumer_secret === config1.consumer_secret) assert(twit.config.access_token === config1.access_token) assert(twit.config.access_token_secret === config1.access_token_secret) twit.get('account/verify_credentials', { twit_options: { retry: true } }, function (err, reply, response) { assert(!err, err); assert(response.headers['x-rate-limit-limit']) done() }) }) it('should create a new auth object', function () { var oldAuth = twit.auth; twit.setAuth({ consumer_key: 'a', consumer_secret: 'b' }) assert(twit.auth && twit.auth !== oldAuth) }) }) });
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import TYPE_CHECKING import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class RouteFiltersOperations(object): """RouteFiltersOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. :type models: ~azure.mgmt.network.v2020_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ models = _models def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer self._config = config def _delete_initial( self, resource_group_name, # type: str route_filter_name, # type: str **kwargs # type: Any ): # type: (...) -> None cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) api_version = "2020-05-01" accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}'} # type: ignore def begin_delete( self, resource_group_name, # type: str route_filter_name, # type: str **kwargs # type: Any ): # type: (...) -> LROPoller[None] """Deletes the specified route filter. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param route_filter_name: The name of the route filter. :type route_filter_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: raw_result = self._delete_initial( resource_group_name=resource_group_name, route_filter_name=route_filter_name, cls=lambda x,y,z: x, **kwargs ) kwargs.pop('error_map', None) kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}'} # type: ignore def get( self, resource_group_name, # type: str route_filter_name, # type: str expand=None, # type: Optional[str] **kwargs # type: Any ): # type: (...) -> "_models.RouteFilter" """Gets the specified route filter. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param route_filter_name: The name of the route filter. :type route_filter_name: str :param expand: Expands referenced express route bgp peering resources. :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RouteFilter, or the result of cls(response) :rtype: ~azure.mgmt.network.v2020_05_01.models.RouteFilter :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilter"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) api_version = "2020-05-01" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') if expand is not None: query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = self._deserialize('RouteFilter', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}'} # type: ignore def _create_or_update_initial( self, resource_group_name, # type: str route_filter_name, # type: str route_filter_parameters, # type: "_models.RouteFilter" **kwargs # type: Any ): # type: (...) -> "_models.RouteFilter" cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilter"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) api_version = "2020-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(route_filter_parameters, 'RouteFilter') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize('RouteFilter', pipeline_response) if response.status_code == 201: deserialized = self._deserialize('RouteFilter', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}'} # type: ignore def begin_create_or_update( self, resource_group_name, # type: str route_filter_name, # type: str route_filter_parameters, # type: "_models.RouteFilter" **kwargs # type: Any ): # type: (...) -> LROPoller["_models.RouteFilter"] """Creates or updates a route filter in a specified resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param route_filter_name: The name of the route filter. :type route_filter_name: str :param route_filter_parameters: Parameters supplied to the create or update route filter operation. :type route_filter_parameters: ~azure.mgmt.network.v2020_05_01.models.RouteFilter :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either RouteFilter or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2020_05_01.models.RouteFilter] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilter"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, route_filter_name=route_filter_name, route_filter_parameters=route_filter_parameters, cls=lambda x,y,z: x, **kwargs ) kwargs.pop('error_map', None) kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): deserialized = self._deserialize('RouteFilter', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}'} # type: ignore def update_tags( self, resource_group_name, # type: str route_filter_name, # type: str parameters, # type: "_models.TagsObject" **kwargs # type: Any ): # type: (...) -> "_models.RouteFilter" """Updates tags of a route filter. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param route_filter_name: The name of the route filter. :type route_filter_name: str :param parameters: Parameters supplied to update route filter tags. :type parameters: ~azure.mgmt.network.v2020_05_01.models.TagsObject :keyword callable cls: A custom type or function that will be passed the direct response :return: RouteFilter, or the result of cls(response) :rtype: ~azure.mgmt.network.v2020_05_01.models.RouteFilter :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilter"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) api_version = "2020-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self.update_tags.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'TagsObject') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = self._deserialize('RouteFilter', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}'} # type: ignore def list_by_resource_group( self, resource_group_name, # type: str **kwargs # type: Any ): # type: (...) -> Iterable["_models.RouteFilterListResult"] """Gets all route filters in a resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RouteFilterListResult or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2020_05_01.models.RouteFilterListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) api_version = "2020-05-01" accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') request = self._client.get(url, query_parameters, header_parameters) else: url = next_link query_parameters = {} # type: Dict[str, Any] request = self._client.get(url, query_parameters, header_parameters) return request def extract_data(pipeline_response): deserialized = self._deserialize('RouteFilterListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) return pipeline_response return ItemPaged( get_next, extract_data ) list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters'} # type: ignore def list( self, **kwargs # type: Any ): # type: (...) -> Iterable["_models.RouteFilterListResult"] """Gets all route filters in a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RouteFilterListResult or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2020_05_01.models.RouteFilterListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) api_version = "2020-05-01" accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') request = self._client.get(url, query_parameters, header_parameters) else: url = next_link query_parameters = {} # type: Dict[str, Any] request = self._client.get(url, query_parameters, header_parameters) return request def extract_data(pipeline_response): deserialized = self._deserialize('RouteFilterListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) return pipeline_response return ItemPaged( get_next, extract_data ) list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/routeFilters'} # type: ignore
/*** @title: Colour Picker @version: 2.0 @author: Andreas Lagerkvist @date: 2008-09-16 @url: http://andreaslagerkvist.com/jquery/colour-picker/ @license: http://creativecommons.org/licenses/by/3.0/ @copyright: 2008 Andreas Lagerkvist (andreaslagerkvist.com) @requires: jquery, jquery.colourPicker.css, jquery.colourPicker.gif @does: Use this plug-in on a normal <select>-element filled with colours to turn it in to a colour-picker widget that allows users to view all the colours in the drop-down as well as enter their own, preferred, custom colour. Only about 1k compressed. @howto: jQuery('select[name="colour"]').colourPicker({ico: 'my-icon.gif', title: 'Select a colour from the list'}); Would replace the select with 'my-icon.gif' which, when clicked, would open a dialogue with the title 'Select a colour from the list'. You can close the colour-picker without selecting a colour by clicking anywhere outside the colour-picker box. Here's a handy PHP-function to generate a list of "web-safe" colours: [code] function gwsc() { $cs = array('00', '33', '66', '99', 'CC', 'FF'); for($i=0; $i<6; $i++) { for($j=0; $j<6; $j++) { for($k=0; $k<6; $k++) { $c = $cs[$i] .$cs[$j] .$cs[$k]; echo "<option value=\"$c\">#$c</option>\n"; } } } } [/code] Use it like this: <select name="colour"><?php gwsc(); ?></select>. @exampleHTML: <p> <label> Pick a colour<br /> <select name="colour"> <option value="ffffff">#ffffff</option> <option value="ffccc9">#ffccc9</option> <option value="ffce93">#ffce93</option> <option value="fffc9e">#fffc9e</option> <option value="ffffc7">#ffffc7</option> <option value="9aff99">#9aff99</option> <option value="96fffb">#96fffb</option> <option value="cdffff">#cdffff</option> <option value="cbcefb">#cbcefb</option> <option value="cfcfcf">#cfcfcf</option> <option value="fd6864">#fd6864</option> <option value="fe996b">#fe996b</option> <option value="fffe65">#fffe65</option> <option value="fcff2f">#fcff2f</option> <option value="67fd9a">#67fd9a</option> <option value="38fff8">#38fff8</option> <option value="68fdff">#68fdff</option> <option value="9698ed">#9698ed</option> <option value="c0c0c0">#c0c0c0</option> <option value="fe0000">#fe0000</option> <option value="f8a102">#f8a102</option> <option value="ffcc67">#ffcc67</option> <option value="f8ff00">#f8ff00</option> <option value="34ff34">#34ff34</option> <option value="68cbd0">#68cbd0</option> <option value="34cdf9">#34cdf9</option> <option value="6665cd">#6665cd</option> <option value="9b9b9b">#9b9b9b</option> <option value="cb0000">#cb0000</option> <option value="f56b00">#f56b00</option> <option value="ffcb2f">#ffcb2f</option> <option value="ffc702">#ffc702</option> <option value="32cb00">#32cb00</option> <option value="00d2cb">#00d2cb</option> <option value="3166ff">#3166ff</option> <option value="6434fc">#6434fc</option> <option value="656565">#656565</option> <option value="9a0000">#9a0000</option> <option value="ce6301">#ce6301</option> <option value="cd9934">#cd9934</option> <option value="999903">#999903</option> <option value="009901">#009901</option> <option value="329a9d">#329a9d</option> <option value="3531ff">#3531ff</option> <option value="6200c9">#6200c9</option> <option value="343434">#343434</option> <option value="680100">#680100</option> <option value="963400">#963400</option> <option value="986536" selected="selected">#986536</option> <option value="646809">#646809</option> <option value="036400">#036400</option> <option value="34696d">#34696d</option> <option value="00009b">#00009b</option> <option value="303498">#303498</option> <option value="000000">#000000</option> <option value="330001">#330001</option> <option value="643403">#643403</option> <option value="663234">#663234</option> <option value="343300">#343300</option> <option value="013300">#013300</option> <option value="003532">#003532</option> <option value="010066">#010066</option> <option value="340096">#340096</option> </select> </label> </p> @exampleJS: jQuery('#jquery-colour-picker-example select').colourPicker({ ico: WEBROOT + 'aFramework/Modules/Base/gfx/jquery.colourPicker.gif', title: false }); ***/ jQuery.fn.colourPicker = function (conf) { // Config for plug var config = jQuery.extend({ id: 'jquery-colour-picker', // id of colour-picker container ico: 'ico.gif', // SRC to colour-picker icon title: 'Pick a colour', // Default dialogue title inputBG: true, // Whether to change the input's background to the selected colour's speed: 500, // Speed of dialogue-animation openTxt: 'Open colour picker' }, conf); // Inverts a hex-colour var hexInvert = function (hex) { var r = hex.substr(0, 2); var g = hex.substr(2, 2); var b = hex.substr(4, 2); return 0.212671 * r + 0.715160 * g + 0.072169 * b < 0.5 ? 'ffffff' : '000000' }; // Add the colour-picker dialogue if not added var colourPicker = jQuery('#' + config.id); if (!colourPicker.length) { colourPicker = jQuery('<div id="' + config.id + '"></div>').appendTo(document.body).hide(); // Remove the colour-picker if you click outside it (on body) jQuery(document.body).click(function(event) { if (!(jQuery(event.target).is('#' + config.id) || jQuery(event.target).parents('#' + config.id).length)) { colourPicker.hide(config.speed); } }); } // For every select passed to the plug-in return this.each(function () { // Insert icon and input var select = jQuery(this); var icon = jQuery('<a href="#"><img src="' + config.ico + '" alt="' + config.openTxt + '" /></a>').insertAfter(select); var input = jQuery('<input type="text" name="' + select.attr('name') + '" value="' + select.val() + '" size="6" />').insertAfter(select); var loc = ''; // Build a list of colours based on the colours in the select jQuery('option', select).each(function () { var option = jQuery(this); var hex = option.val(); var title = option.text(); loc += '<li><a href="#" title="' + title + '" rel="' + hex + '" style="background: #' + hex + '; colour: ' + hexInvert(hex) + ';">' + title + '</a></li>'; }); // Remove select select.remove(); // If user wants to, change the input's BG to reflect the newly selected colour if (config.inputBG) { input.change(function () { input.css({background: '#' + input.val(), color: '#' + hexInvert(input.val())}); }); input.change(); } // When you click the icon icon.click(function () { // Show the colour-picker next to the icon and fill it with the colours in the select that used to be there var iconPos = icon.offset(); var heading = config.title ? '<h2>' + config.title + '</h2>' : ''; colourPicker.html(heading + '<ul>' + loc + '</ul>').css({ position: 'absolute', left: iconPos.left + 'px', top: iconPos.top + 'px' }).show(config.speed); // When you click a colour in the colour-picker jQuery('a', colourPicker).click(function () { // The hex is stored in the link's rel-attribute var hex = jQuery(this).attr('rel'); input.val(hex); // If user wants to, change the input's BG to reflect the newly selected colour if (config.inputBG) { input.css({background: '#' + hex, color: '#' + hexInvert(hex)}); } // Trigger change-event on input input.change(); // Hide the colour-picker and return false colourPicker.hide(config.speed); return false; }); return false; }); }); };
Home Cemetery Indexes The Denver Riverside Cemetery database of African-American cemetery records, 1876-2004. Riverside Cemetery African-American burials, 1876-2004. The Denver Riverside Cemetery database of African-American cemetery records, 1876-2004. Title Riverside Cemetery African-American burials, 1876-2004. Creator Denver Black Genealogy Search Group. Summary Index to the African American burials at the Riverside Cemetery in Denver, Colorado. Index includes: Name of the deceased, birth, death and burial dates, age at time of death, burial location within the cemetery, next of kin, and mortuary. Subject Cemeteries--Colorado--Denver.; African Americans--Colorado--Denver--Genealogy.; Denver (Colo.)--Vital records.; Denver (Colo.)--Genealogy.; Riverside Cemetery (Denver, Colo.). Title The Denver Riverside Cemetery database of African-American cemetery records, 1876-2004. Post a Comment for The Denver Riverside Cemetery database of African-American cemetery records, 1876-2004.
{-# LANGUAGE NoMonomorphismRestriction #-} module Backend.InductiveGraph.Proto1 where import Backend.InductiveGraph.Draw import Backend.InductiveGraph.DrawTIKZ import Backend.InductiveGraph.InductiveGraph import Backend.InductiveGraph.PrintLatex import Backend.InductiveGraph.Probability import Data.Graph.Inductive.Graph import Language.Operators import Utils.Plot s1 = var "S_1" m1 = var "S_2" m2 = var "S_3" m3 = var "S_4" f :: String -> Float f "S_1" = 0.5 f "S_2" = 0.5 f "S_3" = 0.5 f "S_4" = 0.5 v1 = s1 .& m1 .+ m2 v2 = s1 .+ m2 .+ m3 v3 = s1 .+ m3 vl = ["S_1", "S_2", "S_3", "S_4"] vl123 = ["S_1", "S_2", "S_3", "S_4"] vl23 = ["S_1", "S_3", "S_4"] vl3 = ["S_1", "S_4"] drawp vl e = drawPdfInfoSheet e vl (Just f) drawnp e = drawPdfInfoSheet e vl Nothing dir = "/Users/zaccaria/development/github/org-crypto/polimi-casca/docs/general-ideas/bdd/images" writePdfs :: IO () writePdfs = do drawnp (s1 .| m1) (dir ++ "/s1_p_m1.pdf") drawnp (s1 .+ m1) (dir ++ "/s1_x_m1.pdf") drawnp (s1 .& m1 .+ m2) (dir ++ "/s1_t_m1_x_m2.pdf") drawnp (s1 .& m1) (dir ++ "/s1_t_m1.pdf") drawp vl (s1 .& m1) (dir ++ "/s1_t_m1_r.pdf") drawp vl (s1 .+ m1) (dir ++ "/s1_x_m1_r.pdf") drawp vl (s1 .| m1) (dir ++ "/s1_p_m1_r.pdf") drawp vl (v1) (dir ++ "/v1_r.pdf") drawp vl23 (v2) (dir ++ "/v2_r.pdf") drawp vl3 (v3) (dir ++ "/v3_r.pdf") drawp vl (v1 .<> v2) (dir ++ "/v1_m_v2_r.pdf") drawp vl (v2 .<> v3) (dir ++ "/v2_m_v3_r.pdf") drawp vl (v1 .<> v3) (dir ++ "/v1_m_v3_r.pdf") drawp vl (v1 .<> v2 .<> v3) (dir ++ "/v1_m_v2_m_v3_r.pdf") drawp vl (s1 .& m1 .+ m1) (dir ++ "/s1_t_m1_x_m1_r.pdf") drawp vl (s1 .& m1 .| m1) (dir ++ "/s1_t_m1_p_m1_r.pdf")
The Cracking Monkey is a food brand based in the Philippines that cultivates, harvests and sells sprouted Pili nuts still in their shell. Packed in reusable cotton sacks, The Cracking Monkey is also the only Pili nut product in the market that features a unique and patented way of cracking the nut shell by use of a pre-cut notch and stainless lever that comes free in every bag. Discover the Pili nut, a fruit of the Pili tree that thrives in the volcanic regions of Bicol in the Philippines. For years it was relatively unheard of overseas but is now gaining popularity for it’s nutritional value and health benefits. In the Philippines the nut is usually roasted and sweetend as a snack or used in recipes that call for nuts. But to harness the maximum benefits of this super food, the nut is best consumed after pre-sprouting and eaten straight out of it’s shell. Highest content of Vitamin E of all nuts. Excellent source of Magnesium and Manganese. Contains Iron, Calcium, Potassium, Zinc, Protein and Fiber. All the good fats for your health. Gluten free. Dairy free. Vegan friendly. Non-processed. No preservatives or additives. Free of chemicals. GMO free. Toxic free. Healthy snack for the whole family. Even in the Philippines where the pili nut is grown and harvested you would be hard pressed to find the pili nut being sold in stores still in their shells. Usually you get them out of their shells roasted, salted or candied. Why? Because pili nuts are one of the toughest nuts to crack, the regular nut cracker just won’t do the job. In the Philippines, people use a bolo or machete to break into the tough shell. But naturally, you get the best taste and nutrients from these nuts when they are freshly cracked from their shell. Thus The Cracking Monkey Pili Nuts was created. For the first time you can now enjoy your pili nuts the natural way straight from its shell with The Cracking Monkey’s patented “notch and lever” system. No processing or roasting just pili nuts naturally pre-sprouted to enhance their nutritional value. We source our pili nuts from farmers in the volcanic rich soils of Bicol, Camarines Island. The nuts undergo our proprietary process of natural pre-sprouting to enhance flavor and nutritional content. Our artisans make precise cuts on each nuts so you could easily open them with our patented lever system. Each nut gets stamped to remind you that this was made by a plant, and not in a plant. to make the world HEALTHIER. Crack your pili nuts with the lever included free in every bag. The Cracking Monkey is a trademark of The Rising Pili Nuts, Inc. You are eating a natural food product with the most minimal process we could come up with, this means, you need to eat it the way our ancestors used to eat their foods: Inspect every nut you crack, smell it, sense it, feel it before you eat it. This will not only give you a great experience but it will also ensure you do not end up eating a bad nut, it happens as there is no way for us to know which nuts are good and which ones are bad, by bad we mean a nut that did not develop inside the shell or that somehow by Mother Nature’s infinite wisdom, is faulty. Follow these important guidelines, they are also in the package and take special care with children and the elderly. Copyright © 2018 The Cracking Monkey. All Rights Reserved.
/* * Copyright 2011 Google Inc. * * 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. */ package com.google.appengine.eclipse.core.properties.ui; import com.google.appengine.eclipse.core.AppEngineCorePlugin; import com.google.appengine.eclipse.core.AppEngineCorePluginLog; import com.google.appengine.eclipse.core.datatools.SqlConnectionExtensionPopulator; import com.google.appengine.eclipse.core.properties.GoogleCloudSqlProperties; import com.google.gdt.eclipse.core.StatusUtilities; import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.IStatus; import org.eclipse.debug.internal.ui.SWTFactory; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jface.dialogs.StatusDialog; import org.eclipse.swt.SWT; import org.eclipse.swt.events.ModifyEvent; import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Text; import org.osgi.service.prefs.BackingStoreException; /** * Dialog box to configure the Google Cloud SQL Service for test or prod. */ public class GoogleCloudSqlConfigure extends StatusDialog { private static final int TEXT_WIDTH = 220; private boolean isProd; private IProject project; private IJavaProject javaProject; private Text instanceName; private Text databaseName; private Text databaseUser; private Text databasePassword; public GoogleCloudSqlConfigure(Shell parent, IJavaProject javaProject, boolean isProd) { super(parent); this.project = javaProject.getProject(); this.javaProject = javaProject; this.isProd = isProd; } /* * (non-Javadoc) * * @see org.eclipse.jface.dialogs.Dialog#create() */ @Override public void create() { super.create(); getShell().setText("Configure Google Cloud SQL instance"); } private void addControls(Composite composite) { Label instanceNameLabel = new Label(composite, SWT.NONE); instanceNameLabel.setText("Instance name"); instanceNameLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); instanceName = new Text(composite, SWT.BORDER); instanceName.setLayoutData(new GridData(TEXT_WIDTH, SWT.DEFAULT)); Label databaseNameLabel = new Label(composite, SWT.NONE); databaseNameLabel.setText("Database name"); databaseNameLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); databaseName = new Text(composite, SWT.BORDER); databaseName.setLayoutData(new GridData(TEXT_WIDTH, SWT.DEFAULT)); Label databaseUserLabel = new Label(composite, SWT.NONE); databaseUserLabel.setText("Database username"); databaseUserLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); databaseUser = new Text(composite, SWT.BORDER); databaseUser.setLayoutData(new GridData(TEXT_WIDTH, SWT.DEFAULT)); Label databasePasswordLabel = new Label(composite, SWT.NONE); databasePasswordLabel.setText("Database password"); databasePasswordLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); databasePassword = new Text(composite, SWT.BORDER | SWT.PASSWORD); databasePassword.setLayoutData(new GridData(TEXT_WIDTH, SWT.DEFAULT)); } private void addEventHandlers() { instanceName.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent e) { validateFields(); } }); databaseName.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent e) { validateFields(); } }); databaseUser.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent e) { validateFields(); } }); databasePassword.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent e) { validateFields(); } }); } /* * (non-Javadoc) * * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets .Composite) */ @Override protected Control createDialogArea(Composite parent) { Composite composite = SWTFactory.createComposite( (Composite) super.createDialogArea(parent), 2, 1, SWT.HORIZONTAL); addControls(composite); addEventHandlers(); initializeControls(); updateStatus(StatusUtilities.newInfoStatus( "Please enter database details", AppEngineCorePlugin.PLUGIN_ID)); return composite; } private void initializeControls() { if (isProd) { instanceName.setText(GoogleCloudSqlProperties.getProdInstanceName(project)); databaseName.setText(GoogleCloudSqlProperties.getProdDatabaseName(project)); databaseUser.setText(GoogleCloudSqlProperties.getProdDatabaseUser(project)); databasePassword.setText(GoogleCloudSqlProperties.getProdDatabasePassword(project)); } else { instanceName.setText(GoogleCloudSqlProperties.getTestInstanceName(project)); databaseName.setText(GoogleCloudSqlProperties.getTestDatabaseName(project)); databaseUser.setText(GoogleCloudSqlProperties.getTestDatabaseUser(project)); databasePassword.setText(GoogleCloudSqlProperties.getTestDatabasePassword(project)); } } /* * (non-Javadoc) * * @see org.eclipse.jface.dialogs.Dialog#okPressed() */ @Override protected void okPressed() { validateFields(); try { if (isProd) { GoogleCloudSqlProperties.setProdDatabaseName(project, databaseName.getText().trim()); GoogleCloudSqlProperties.setProdDatabasePassword( project, databasePassword.getText().trim()); GoogleCloudSqlProperties.setProdDatabaseUser(project, databaseUser.getText().trim()); GoogleCloudSqlProperties.setProdInstanceName(project, instanceName.getText().trim()); SqlConnectionExtensionPopulator.populateCloudSQLBridgeExtender( javaProject, SqlConnectionExtensionPopulator.ConnectionType.CONNECTION_TYPE_PROD); GoogleCloudSqlProperties.setProdIsConfigured(project, true); } else { GoogleCloudSqlProperties.setTestDatabaseName(project, databaseName.getText().trim()); GoogleCloudSqlProperties.setTestDatabasePassword( project, databasePassword.getText().trim()); GoogleCloudSqlProperties.setTestDatabaseUser(project, databaseUser.getText().trim()); GoogleCloudSqlProperties.setTestInstanceName(project, instanceName.getText().trim()); SqlConnectionExtensionPopulator.populateCloudSQLBridgeExtender( javaProject, SqlConnectionExtensionPopulator.ConnectionType.CONNECTION_TYPE_TEST); GoogleCloudSqlProperties.setTestIsConfigured(project, true); } } catch (BackingStoreException e) { AppEngineCorePluginLog.logError(e, "Unable to store Google Cloud SQL configurations"); } super.okPressed(); } private void validateFields() { IStatus status = StatusUtilities.OK_STATUS; if (instanceName.getText().trim().equals("")) { status = StatusUtilities.newErrorStatus("Enter instance name.", AppEngineCorePlugin.PLUGIN_ID); } else if (databaseName.getText().trim().equals("")) { status = StatusUtilities.newErrorStatus("Enter database name.", AppEngineCorePlugin.PLUGIN_ID); } updateStatus(status); } /* * (non-Javadoc) * * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets .Composite) */ @Override protected Control createDialogArea(Composite parent) { Composite composite = SWTFactory.createComposite( (Composite) super.createDialogArea(parent), 2, 1, SWT.HORIZONTAL); addControls(composite); addEventHandlers(); initializeControls(); updateStatus(StatusUtilities.newInfoStatus( "Please enter database details", AppEngineCorePlugin.PLUGIN_ID)); return composite; } /* * (non-Javadoc) * * @see org.eclipse.jface.dialogs.Dialog#okPressed() */ @Override protected void okPressed() { validateFields(); try { if (isProd) { GoogleCloudSqlProperties.setProdDatabaseName(project, databaseName.getText().trim()); GoogleCloudSqlProperties.setProdDatabasePassword( project, databasePassword.getText().trim()); GoogleCloudSqlProperties.setProdDatabaseUser(project, databaseUser.getText().trim()); GoogleCloudSqlProperties.setProdInstanceName(project, instanceName.getText().trim()); SqlConnectionExtensionPopulator.populateCloudSQLBridgeExtender( javaProject, SqlConnectionExtensionPopulator.ConnectionType.CONNECTION_TYPE_PROD); GoogleCloudSqlProperties.setProdIsConfigured(project, true); } else { GoogleCloudSqlProperties.setTestDatabaseName(project, databaseName.getText().trim()); GoogleCloudSqlProperties.setTestDatabasePassword( project, databasePassword.getText().trim()); GoogleCloudSqlProperties.setTestDatabaseUser(project, databaseUser.getText().trim()); GoogleCloudSqlProperties.setTestInstanceName(project, instanceName.getText().trim()); SqlConnectionExtensionPopulator.populateCloudSQLBridgeExtender( javaProject, SqlConnectionExtensionPopulator.ConnectionType.CONNECTION_TYPE_TEST); GoogleCloudSqlProperties.setTestIsConfigured(project, true); } } catch (BackingStoreException e) { AppEngineCorePluginLog.logError(e, "Unable to store Google Cloud SQL configurations"); } super.okPressed(); } }
WHAT: Metropolitan State University of Denver’s Fire and Emergency Services students will educate residents of Grace Apartments, a Mercy Housing community, on the primary issues around citizen preparedness. Approximately 125 residents, the majority consisting of refugees or immigrants, are expected to participate. Student volunteers will train residents using basic home-safety tools and strategies such as CPR administration, live fire extinguisher usage demonstrations, exit drills, and other basic fire prevention and safety tips. Students have raised funds and secured donations to purchase and install fire and carbon monoxide detectors in needed areas. WHY: The students identified the need for fire prevention and safety training at Grace Apartments from feedback from other community organizations that have performed similar education programs. Students taking MSU Denver’s Applications of Fire Research course designed this project as a professional development opportunity, and to encourage civic awareness and citizen preparedness. Students will receive academic credit for the project. The Fire and Emergency Services Program at MSU Denver is the only place-based bachelor’s program within the state of Colorado that is certified at the federal level by the Fire and Emergency Services of Higher Education program offered by the Federal Emergency Management Agency’s U.S. Fire Administration. The program offers curriculum highly desired by most fire chiefs as it extends beyond the range of firefighting and emergency medical technician services into organizational and interpersonal communications. The degree is currently offered as a pilot omnibus program through MSU Denver’s Individualized Degree Program in conjunction with the Human Services Department. Courses currently offered include: Fire and Emergency Services Administration; Community Risk Reduction for Fire and Emergency Services; Applications of Fire Research; Political and Legal Foundations for Fire Protection and Fire Prevention Organization. With the continued support from five Denver metro-area fire departments and the community, MSU Denver’s Fire Science pilot program has potential to become a permanent offering at the University.
// Copyright 2021 Google LLC // // 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. /** * SiteServiceInterface.java * * This file was auto-generated from WSDL * by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter. */ package com.google.api.ads.admanager.axis.v202105; public interface SiteServiceInterface extends java.rmi.Remote { /** * Creates new {@link Site} objects. * * * @param sites the sites to create * * @return the created sites with their IDs filled in */ public com.google.api.ads.admanager.axis.v202105.Site[] createSites(com.google.api.ads.admanager.axis.v202105.Site[] sites) throws java.rmi.RemoteException, com.google.api.ads.admanager.axis.v202105.ApiException; /** * Gets a {@link SitePage} of {@link Site} objects that satisfy * the given {@link Statement#query}. * The following fields are supported for filtering: * * <table> * <tr> * <th scope="col">PQL Property</th> <th scope="col">Object Property</th> * </tr> * <tr> * <td>{@code id}</td> * <td>{@link Site#id}</td> * </tr> * <tr> * <td>{@code url}</td> * <td>{@link Site#url}</td> * </tr> * <tr> * <td>{@code childNetworkCode}</td> * <td>{@link Site#childNetworkCode}</td> * </tr> * <tr> * <td>{@code approvalStatus}</td> * <td>{@link Site#approvalStatus}</td> * </tr> * <tr> * <td>{@code active}</td> * <td>{@link Site#active}</td> * </tr> * </table> * * * @param filterStatement a Publisher Query Language statement used to * filter a set of sites * * @return the sites that match the given filter */ public com.google.api.ads.admanager.axis.v202105.SitePage getSitesByStatement(com.google.api.ads.admanager.axis.v202105.Statement filterStatement) throws java.rmi.RemoteException, com.google.api.ads.admanager.axis.v202105.ApiException; /** * Performs actions on {@link Site} objects that match the given * {@link Statement#query}. * * * @param siteAction the action to perform * * @param filterStatement a Publisher Query Language statement used to * filter a set of sites * * @return the result of the action performed */ public com.google.api.ads.admanager.axis.v202105.UpdateResult performSiteAction(com.google.api.ads.admanager.axis.v202105.SiteAction siteAction, com.google.api.ads.admanager.axis.v202105.Statement filterStatement) throws java.rmi.RemoteException, com.google.api.ads.admanager.axis.v202105.ApiException; /** * Updates the specified {@link Site} objects. * * <p>The {@link Site#childNetworkCode} can be updated in order * to 1) change the child network, 2) * move a site from O&O to represented, or 3) move a site from * represented to O&O. * * * @param sites the sites to update * * @return the updated sites */ public com.google.api.ads.admanager.axis.v202105.Site[] updateSites(com.google.api.ads.admanager.axis.v202105.Site[] sites) throws java.rmi.RemoteException, com.google.api.ads.admanager.axis.v202105.ApiException; }
Food, Tasty Cruise Ship Food! If you’ve never been aboard a cruise ship, no doubt you’ve heard about one of the most talked about topics regarding cruises. As you’ve probably heard before, the food on a cruise is one of the highlights of this type of vacation, with delicious food included in the package. The food is plentiful and tasty and it’s definitely something that we looked forward to every single day of our 8 day cruise on the Carnival Breeze. We had 3 days at sea and on those days, we could choose the breakfast buffet or a sit down brunch in the main dining room. We did the brunch at least twice and it was so nice and leisurely. I ordered blueberry pancakes and bacon one morning and it didn’t disappoint. Fresh orange juice and other juices were available as well and of course, lots of coffee. Another breakfast offering, eggs Benedict were delicious too. On the days we were heading out on an excursion, we made sure to eat a filling breakfast and the omelette station was my favorite. I chose omelettes filled with veggies and a little bacon to hold me over until late lunch. Those guys know how to make an omelette! In the main dining room, our waiter, Cesar, was so on top of things and made us feel so spoiled and pampered. One of the best things about a cruise? You’re not cooking meals. And having food cooked and ready to eat is such a nice way to enjoy a vacation. There was even entertainment from our wait staff a few nights on the cruise. We sat at the same small table for 2 every night and enjoyed our nightly meals in the Blush restaurant. With the multi-colored lights for ambience and white tablecloth service, it was very relaxing. Here is a sampling of the meals I had on the cruise. I tried to take pictures of most of it so that you could see the offerings and wide variety of foods. There was always an appetizer choice, main entree, and dessert to choose from every night, so it was fun to read the menu to see what was being prepared that evening. Fruit was plentiful too, for breakfast especially. I got my fill of seafood, as you can imagine, that is offered daily. I’ve already mentioned Guy’s Burger Joint on the Lido deck and it was truly one of the highlights for us. We couldn’t get enough of these burgers and hand cut fries! Here’s someone’s plate that I snapped from the burger joint. We certainly were fed well on a daily basis and the opportunity to overeat is real. I had to pace myself. A fish entree for dinner. I tried a little of everything, from seafood to beef meals. I usually chose the seafood most of the time, since that is one of my favorite things in the world. One night, we made reservations and stopped in at the specialty Italian Restaurant on board, Cucina del Capitano. There were 2 restaurants that had an up-charge to try and this was one of them. It was a $15 charge to eat all of this delicious Italian food and we loved every bit of it. I chose a pasta dish. With Caprese salad as an appetizer. Breads were brought out and presented on a breadboard. More delicious meals from the main dining room, lobster night is always a festive treat. There is a slight uncharge now for lobster. We especially loved the shrimp cocktail too, along with tasty salads. Shrimp cocktail was a nice start to the meal. One of the things that most cruise ships have stopped is the midnight buffet. I remember that from my first Carnival cruise, but it seems that over the years, this practice has ceased on cruise ships. It’s just as well. Who could possibly still be hungry at midnight after eating all day long? Not me! The Breeze did offer a chocolate dessert buffet one afternoon that was an extravaganza and very good. We made sure to get in on that! And every evening in the main dining room, a choice of desserts were served, like this flan with caramel popcorn. Truly some interesting combinations. This was my plate from the dessert buffet, I had to try a few things. The chocolate molten cake was a specialty dessert and one they are known for. It was to die for! We truly enjoyed dessert every single night. When it’s there, you eat dessert! That’s why so many people love cruising, the food is plentiful and so good. This was a sweet roll with raspberry icing, so good! And one of my all-time fave desserts, Creme Brûlée. Bread pudding with cream sauce. I love a good bread pudding! And a cheesecake with raspberry sauce. If this didn’t make you hungry, I don’t know what would! We so thoroughly enjoyed our meals and desserts all the way through the cruise. I didn’t even mention the pizza, but there was a wonderful pizza place on board, that served pizza non-stop. Made in a brick oven, the taste was superb and so authentic and we loved that place! We had pizza a few times for lunch or a snack too, so even though there is no longer a Midnight buffet, the pizza buffet was open 24 hours a day, offering mushroom, pepperoni and my favorite, Marghareita. Oh, and I can’t forget the soft serve ice cream and yogurt. With flavors of vanilla, chocolate, and strawberry, there were ice cream cones and little dessert bowls out for 24 hour service of soft-serve and believe me, we took advantage of that too. Not a day went by that we didn’t get an ice cream cone…or 2!! Such a treat! The food is truly one of the most loved parts of a cruise and if you haven’t been, give cruising a try! I highly recommend it for so many reasons and the food is at least 1/2 of those reasons.
Apparently, Whole 30 isn’t a fad at all! It is quite a popular dietary lifestyle that fits anyone’s activity level and age. I am excited to be sharing with you a wonderful list of easy-to-make and healthy Whole 30 appetizers. Everyone will love their flavor and how good they are for them.
// Copyright 2014 Citra Emulator Project // Licensed under GPLv2 or any later version // Refer to the license.txt file included. #pragma once #include <memory> #include "common/common_types.h" #include "core/arm/arm_interface.h" #include "core/arm/skyeye_common/armdefs.h" class ARM_DynCom final : virtual public ARM_Interface { public: ARM_DynCom(PrivilegeMode initial_mode); ~ARM_DynCom(); void SetPC(u32 pc) override; u32 GetPC() const override; u32 GetReg(int index) const override; void SetReg(int index, u32 value) override; u32 GetCPSR() const override; void SetCPSR(u32 cpsr) override; u64 GetTicks() const override; void AddTicks(u64 ticks) override; void ResetContext(Core::ThreadContext& context, u32 stack_top, u32 entry_point, u32 arg); void SaveContext(Core::ThreadContext& ctx) override; void LoadContext(const Core::ThreadContext& ctx) override; void PrepareReschedule() override; void ExecuteInstructions(int num_instructions) override; private: std::unique_ptr<ARMul_State> state; };
If you enjoy nature documentaries narrated by Sir David Attenborough, we’ve got some great news for you, because Netflix announced an 8-part series titled Our Planet is coming to the streaming service. Netflix says the eight-episode series was filmed over the course of four years by a 600-member crew in 50 countries, spanning across the Arctic and continents like Africa and South America. It will focus on various endangered habitats and species. The series is a collaboration with Silverback Films, the company led by the man who produced The Blue Planet and Planet Earth, and conservation group the World Wildlife Fund (W.W.F.). Our Planet will hit Netflix on April 5th, 2019.
Dinah is raped by Shechem, who seeks to make her his wife. When his father, Hamor, pleads on his behalf, the sons of Jacob convinced Shechem’s family to be circumcised so that they could slay all of them while they were laid up after the surgery. When Jacob discovers this, he rebukes them but says nothing more until he is on his deathbed. Similarly, when Reuben takes up with Bilhah, his father’s concubine, Jacob says nothing at the time. God tells Jacob to go to Bethel and make an altar there, and so he tells his family to put away their idols, purify themselves and change their clothes (similar to Ex 19:10-11). After this, God tells Jacob that his name is now Israel and promises him the land. Rachel has her second son, whom she names Ben-oni, which could mean the son of her sorrow or the son of her strength, but Jacob calls him Benjamin, son of my right hand. Rachel dies, with her eyes toward Bethlehem. Jer 31:15 refers to this in a prophecy that would be fulfilled with the slaughter of the innocents.
Discussion in 'Scripting' started by jindogae, Jan 6, 2019. I'm new to this site so not sure if this is the correct place to post this. After attempting to (re)activate office 2013 ProPlus on a Win10 X64 system a command prompt keeps appearing on every system boot. I have no idea where it comes from or how it suddenly appeared, and I have no idea of how to stop (delete) it from happening. The top of the prompt says bhrudwfi while the path refers to an exe file, sqwbsrtb.exe. When it first appeared it was considered a trojan by HitmanPro and has supposedly been deleted but as indicated the prompt appears on every reboot. Any thoughts, ideas, suggestions are welcomed. What did you use for your activation? Some strange file from a warez site? MSToolkit, which I've used in the past without any issues. Post SHA-1 of your Office 2013 install image, if you didn't use an activator my guess is you used a non-genuine image slipstreamed with xtra "tools" Hi. I used Microsoft Toolkit 2.5 which I've used for several years on both mine and my daughters' systems. And have been running Office 2013 since it's inception without any issues until now when it took at least a dozen attempts to (re)activate Office. I have looked for a 'clean' copy of the ltests toolkit but without success, and I believe it is no longer being developed. Create AV engine exception rule for above tool and use "Settings -> LocalHost Bypass -> Use TAP Adapter"
You know all of those ‘you-tubers made me buy it’ videos you see? Well, I am exactly the same. I have jumped wholeheartedly on the copper bandwagon. I salivate at anything marble. I jump for joy when I see something in bamboo and I practically have shares in IKEA picture shelves. As you may already… Read More Office Tour: Copper, Bamboo and a few ‘shelfie’s’.
using GalaSoft.MvvmLight; using GalaSoft.MvvmLight.CommandWpf; using GalaSoft.MvvmLight.Threading; using HtmlAgilityPack; using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Drawing; using System.Linq; using System.Net; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Input; using System.Windows.Interop; using System.Windows.Media.Imaging; namespace GauntletHelper { public class MainWindowViewModel : ViewModelBase { #region Binding public ObservableCollection<string> Factions { get; private set; } public ObservableCollection<Tuple<string, int>> FactionRatings { get; private set; } public string Url { get { return DuelystData.URL; } } public bool ProgressRunning { get { return progressRunning; } set { progressRunning = value; RaisePropertyChanged("ProgressRunning"); } } private bool progressRunning = false; public string ProgressText { get { return progressText; } set { progressText = value; RaisePropertyChanged("ProgressText"); } } private string progressText = string.Empty; #endregion public OverlayWindowViewModel OverlayWindow { get; set; } private DuelystData data = new DuelystData(); public MainWindowViewModel() { Factions = new ObservableCollection<string>(); FactionRatings = new ObservableCollection<Tuple<string, int>>(); DownloadData(); OverlayWindow = new OverlayWindowViewModel(data); } private async void DownloadData() { ProgressRunning = true; ProgressText = "Downloading and parsing data..."; await Task.Run(() => { data.GetData(); DispatcherHelper.RunAsync(() => { foreach (var faction in data.Factions) { Factions.Add(faction.Key); FactionRatings.Add(new Tuple<string, int>(faction.Key, faction.Value)); } }); }); ProgressRunning = false; ProgressText = "Select faction in top left to enable helper."; } } }
Remember those horrid changes to the regulations that govern the Energy Employees Occupational Illness Compensation Program (EEOICP) the Department of Labor (DOL) proposed in 2015? DOL received hundreds of comments from organizations like ANWAG, unions, the Advisory Board on Toxic Substances and Worker Health (board), and individuals objecting to the changes. DOL rejected virtually every comment and suggestion, including those from the board. The Final Rules are set to take effect on April 9, 2019. Did I mention that the rules are horrible? There is no doubt in my mind that they are. They prevent some workers from coverage; a worker needs to get permission from DOL to change doctors; the rules make it harder to qualify for wage-loss for an occupational illness. And, if you think it takes a long time now to get approved for medical services, the new rules will only make it harder and longer. These are just a few examples of the wrongness of the changes to the regulations. Professional Case Management (PCM) filed a lawsuit hoping to prevent DOL from implementing the changes. The suit asks that DOL work with the stakeholders in good faith to develop regulations which will reflect the congressional intent to properly care for these workers. PCM is the largest home health care company and the first to provide services to the sick workers. That sounds like a commercial doesn’t it? I’ve worked with and eventually for PCM, through Cold War Patriots, for over ten years. Over the years, my respect for PCM’s commitment to the workers has increased but never so much as today. It couldn’t have been easy for PCM to make the decision to file legal challenges to the changes in the regulations. Filing a lawsuit against the U.S. government is a daunting prospect and one taken when there is no other option. I, for one, am very thankful they have the courage to take this drastic step. Before this lawsuit was filed ANWAG and PCM sent separate letters to DOL Secretary Acosta asking that he repeal the final rules. Senator Tom Udall (D-NM) also asked Secretary Acosta to seriously consider ANWAG’s request. While this is promising, DOL’s past track record does not demonstrate a willingness to enter into a positive and productive relationship with the stakeholders. Their treatment of the board, which was created to advise the Secretary on certain issues related to the program, is a prime example. The board members are highly qualified and knowledgeable about EEOICP. If DOL digs in its heels resisting some of the board’s recommendations, https://bit.ly/2JkZQmE, how likely is it they will repeal the changes to the rules just because ANWAG asked? This is where you come in. We need your help and it will only take a few minutes of your time. Email Secretary Acosta at [email protected] or call him toll-free at 866-301-0070 and ask him to fulfill his duties to the claimants and withdraw the Final Rules which govern the Energy Employees Occupational Illness Compensation Program. For decades, the U.S. government fought workers who filed in state workers’ compensation programs so much that it was virtually impossible to receive medical and monetary compensation for illnesses which arose from exposure to radiation and other toxic substances at the Department of Energy’s nuclear weapons facilities. In 2000, Congress recognized the unjust treatment of these workers and created EEOICP. Now DOL wants to make it just as hard to receive compensation as it was before EEOICP. These changes will affect both current and future claimants. Please help us out by calling Secretary Acosta. Let’s return this program to what Congress wanted for the sick workers. With your help, I know we can get this done. To stay updated on the progress of the lawsuit please visit, http://www.coldwarpatriots.org/dolchange. This moderated blog provides a forum to discuss EEOICPA and how it can be improved. We encourage you to share your comments, ideas, and concerns. We review comments before posting them. We expect participants to treat each other with respect. We will not post comments that contain vulgar language, personal attacks of any kind, unsupported accusations, or targeting of specific individuals or groups. We will not post off-topic or promotional comments. Please do not include personal information about yourself or other people. Comments may be denied or removed for any reason. Each blog and posted comment is the opinion of an individual and does not necessarily reflect ANWAG's opinion and neither ANWAG nor EECAP assume any liability for them. Bloggers' opinions may change over time as more information comes to light.
Image Title: Great Ideas For Kitchen Breakfast Bars With Regard To Bar Inspirations 2. Post Title: Kitchen Breakfast Bar. Filename: great-ideas-for-kitchen-breakfast-bars-with-regard-to-bar-inspirations-2.jpg. Image Dimension: 675 x 513 pixels. Images Format: jpg/jpeg. Publisher/Author: Brody Ruecker. Uploaded Date: Sunday - January 06th. 2019 05:13:07 AM. Category: Architecture. Image Source: archdaily.com. Small Kitchens With Breakfast Bars 80 Kitchen Bar Ideas Remodel 14. Great Ideas For Kitchen Breakfast Bars Within Bar Plan 5. Kitchen Breakfast Bar Ideas Inspiration Howdens Joinery Pertaining To 18. Great Ideas For Kitchen Breakfast Bars With Regard To Bar Inspirations 2. Kitchen Breakfast Bar Totem Construction Newmarket Builders Throughout Prepare 16. 20 Ingenious Breakfast Bar Ideas For The Social Kitchen With Regard To Prepare 0. Small Kitchens With Breakfast Bars Home Finishing Pinterest Pertaining To Kitchen Bar Idea 12. Modern Bulthaup Kitchen With Breakfast Bar And Stools Stock Photo Pertaining To Design 19. Kitchen Breakfast Bar Table Modern Stefan Abrams Enjoy With Regard To Decorations 7. 20 Ingenious Breakfast Bar Ideas For The Social Kitchen In Plans 8.
You could never download wacky sound bites on Napster—just wacky music—but I can provide you with a free, illegal sampling of musicians’ utterances right here on Crapster. The following quotes were elicited by my trenchant questioning at Clive Davis‘s pre-Grammy bash at the Regent Wall Street, but please don’t tell the authorities. As we interviewed the serene songstress between trophy grabs, we were jolted out of all the gratitude by noticing Nelly‘s onstage pyrotechnics (Great White anyone?), an even scarier scenario than *NSync‘s pasty tribute to the Bee Gees. But thankfully no one was hurt (by *NSync, that is), and I cottoned to sensible Norah more than ever when she told us she had no idea who designed her dress—”It was given to me and I like it and it fit.” How refreshingly un-victimy—but I think we can all be in “agreeance” (gee, thanks, Fred Durst, for damaging the anti-war campaign with weird grammar) that Michelle Branch still hasn’t turned around. Now, if I can do an Elmore Leonard and jump chronologically backward, let me tell you about the gala show Clive Davis put on at his event (culminating with Davis himself singing “Happy Birthday” to Drew Barrymore—a real Grammy moment). Of the professional performers, Davis discovery DeGraw came off very Billy Joel‘s-voice-in-John Mayer‘s-body. Similarly, the talented Heather Headley sounded like she was channeling Whitney Houston‘s old career. Rod Stewart—despite that bout with throat cancer, a new cold, and a scratchy voice to begin with—did well on standards, not taking them seriously enough that you’d cringe. And the fab Aretha Franklin barely acknowledged Alicia Keys onstage, making me wonder if Keys’s mic didn’t work thanks to some backstage tampering by the Queen of Soul. But I left happy (if hungry)—and that brings us right back to the present, where I’m still hungry, thank you. There was no trophy—or food—but lots of honor for writer-director Alexander Payne when MOMA feted him at the Gramercy Theater, though “the bard of Omaha” admitted he’s battled studio ignorance almost as long as Melissa Etheridge has looked for the shoreline. “They always hire you based on films they never would have financed because they were new and different,” said citizen Payne. “Then you tell them what you want to do next and they say, ‘We can’t do that because it’s too new and different!’ ” Living proof of this stymieing syndrome surfaced when Payne’s onstage interviewer—a movie exec—admitted he once turned down Citizen Ruth because “we didn’t have any money,” and besides, it was, you know, too new and different. Aborting an abortion comedy! Sick! A rehearsal room meet-and-greet with the cast of Nine—the old and different musical based on Fellini’s 8 1/2—was crawling with productive (and reproductive) women, though all I noticed was star Antonio Banderas with his cutely bee-stung lips and tousled hair. But politely enough, I started out by talking to the gals, not a Michelle Branch among them. “It’s my first Greek part,” said Saundra Santiago, who plays Stephanie Necrophorus. “It’s interesting because I was married to a Greek, but I couldn’t take it anymore.” (I couldn’t take My Big Fat Greek Wedding either.) Latina extraordinaire Chita Rivera told me she loved doing a cameo in the Chicago movie: “I thought I looked like Cher!” And downtown darling Nell Campbell turns up in Nine too, telling me, “I play a half-naked lesbian. It’s 16 women and Antonio Banderas—it could have been a recipe for disaster.” It’s certainly Melanie Griffith‘s worst nightmare—but it’s all worked out fine so far. Oh, Banderas? Stammeringly, I asked him if his filmmaker character cheats on wifey because he’s creatively lost and is looking for inspiration in female body parts. “No, you can be full of creativity and still do that,” he told me, suavely. “He has to realize human beings can’t be manipulated the way he thinks.” I didn’t hear a word he said, but it sounded pretty good to me. The least manipulated person around is that college basketball player who, in a real-life Alexander Payne movie, is controversially turning her back on the flag to protest the war. All the idiots running around screeching, “But people fought for that flag!” forget that they fought to protect democracy—i.e., the right to turn your back on the flag—and the girl doesn’t want anyone fighting, anyway! We stuffed ourselves with foot-longs at the opening-night party at the Supper Club, while downtown at the gay cruise bar SBNY, Fred Durst—who we’re all in agreeance is straight—had just been spotted hanging with friends. I guess sleeping with Britney can do that to you.
Please find our list of services below for all of your heating and cooling needs. Comfort Zone takes our design services to the next level. Our entire in-house team are experts within the ever changing construction industry. Our approach to system design ensures that every component is carefully balanced and works together for maximum health and energy efficiency. We understand that in many circumstances as you are planning to build your home, plans and layout may change. We can easily adapt to your needs and modify our design to follow suit. Our team is fully licensed in the installation and design of all types of residential ventilation systems. As members of the Heating, Refrigeration and Air Conditioning Institute of Canada, we are qualified to provide Residential Heat Loss/Heat Gain calculations, Air Systems and Duct Designs for new construction projects and existing homes. Whether you require new construction or retro-fit installation, Comfort Zone’s professionalism and quality will ensure that all regulations, safety standards, and warranty requirements are honoured. We use top of the line equipment and testing methods to ensure your investment is properly installed and functioning efficiently to deliver you maximum energy savings. From furnaces, central air conditioners, heat pumps, ducting and geothermal systems, Comfort Zone is your trusted source for providing the most reliable and reputable heating and air conditioning products on the market. Comfort Zone offers a variety of unit cleaning options. Whether your equipment is brand new, or an older model our regular cleaning service will provide you with maximum energy efficiency and top performance. Comfort Zone offers true 24-hour demand repair service. Our technicians will professionally diagnose the issue, explain the repair process and have your unit back up and running as quickly as possible. We understand that the loss of heating or cooling equipment can be an emergency situation. Our skilled technicians have the highest sense of urgency and will have your unit restored as quickly as possible. We service all major brands, regardless of whether it was purchased through Comfort Zone. We offer a wide variety of cleaning and service maintenance plans. Our team of service technicians will inspect your system for worn parts and clean the internal components to make sure you are prepared for a new season. Proactively checking and servicing your equipment will not only provide you peace of mind but will ensure that you enjoy many years of reliable, trouble-free service from your investment. With a Comfort Zone annual maintenance inspection, you can reduce monthly costs by increasing energy efficiency, prevent costly repairs and protect the health and safety of your family. Includes our annual cleaning and inspection service. Should a repair be required, you receive a 20% discount on parts and labour. The ultimate standard of protection. Our Platinum Plan includes your annual cleaning and maintenance check along with 100% labor coverage and 100% part costs up to a maximum of $695. If your equipment is covered under a 10-year warranty program, we can give you additional peace of mind. New products still need annual cleanings and check-ups. Failure to properly maintain your system could result in voiding your warranty should something go wrong. Our club member plan provides an annual cleaning and maintenance check. Should you need to call us for additional servicing, you receive a reduced rate of $49.00 for our trip charge. Our commercial rooftop maintenance plans give a 20% discount on labour and parts. Should you need to call one of our expert technicians, you will be given priority service and a discounted rate of $49+ HST for the trip charge. All rooftop maintenance plans are billed monthly with a preauthorized debit agreement and include tax. Includes a Spring AND Fall maintenance check and cleaning along with a filter change. Your choice of a Spring OR Fall maintenance and cleaning visit with filter change.
I started some of these images last week, but only really got round to posting them today – mostly due to the feeling of a stressful and upsetting weekend thanks to my jaw playing up. Anyhow, back onto the pictures! I’ve had the idea of painting something flower-esque onto the yellow, pinky coloured painted canvas. But, keeping in the theme of abstract I was wondering how I could paint flowers without dipping into the realm of realism. So it has been a case of practising with my Coloursoft crayons – which I adore no end – and seeing what sort of shapes and colour combinations that I could come up with; and I think I’ve got something that I can put onto the canvas and be happy with now. So, I am looking forward to getting the paints out again and giving it a go. However the other two canvas’ hadn’t been quite so accommodating when it comes to giving me ideas for what to put on them. I was convinced that flowers (Or there about) was the answer for the three of them. Then it dawned on me that the effect I was looking for for the blue and white one was something water-based when actually trying to paint it. So, I got to thinking what else could be done on it. What else do I like? Then I saw the fish tank in the corner of the living room and had that eureka moment! So today the fish were what I practised with; which was actually rather nice to do. I just need to figure out the composition of them both and I’m good to go. And have a bit more of a think what to do with the darker of the three canvas. If anyone has any ideas then please, let me know what you think?
// This file auto generated by plugin for ida pro. Generated code only for x64. Please, dont change manually #pragma once #include <common/common.h> START_ATF_NAMESPACE enum CouponError { no_ready_receive_coupon = 0x1, no_more_coupon_today = 0x2, all_coupon_is_charged = 0x3, no_more_inven_input_space = 0x4, item_data_error = 0x5, }; END_ATF_NAMESPACE
Key Words: Oil dispersant, Toxicity, pH, L. vannamei, LC50. J. Bio. Env. Sci. 10(6), 201-208, June 2017. Oil spillage accidents lead the use of oil dispersants to break oil into small droplets to prevent oil coming ashore. Meanwhile, recent and rapid drop in surface pH could have devastating consequences to marine environment. However, their combined effects on marine species have not been experimentally evaluated. This study evaluated the toxicity of oil dispersant in the shrimp Litopenaeusvannameiunder pH 6.5 and 8.5. Healthy post larvae L. vannameiwere exposed to dispersant solution at concentration of 0%, 3%, 6%, 12% and 24% for 72 hours to determine mortality. Probit analysis was used to determine LC50, while the PAH of dispersant solution was characterized using GCMS method. The dispersant had negative effects to L. vannamei and that toxicity of dispersant increased over time and exposure concentration. The 72-h LC50 were equivalent to 191.18 mgL-1 and 553 mgL-1 for pH 6.5 and 8.5 respectively in which that dispersant is practically non-toxic to the shrimps. However, the combination of dispersant and lower pH increases the mortality of the shrimp; thus ocean acidificationmay increase dispersant accumulation in the L. vannamei tissue via surface contacting. Adams J, Sweezey M, Hodson PV. 2014. Oil and oil dispersant do not cause synergistic toxicity to fish embryos. Environmental Toxicology and Chemistry 33, 107–114. Almeda R, Hyatt C, Buskey EJ. 2014. Toxicity of dispersant Corexit 9500A and crude oil to marine microzooplankton. Ecotoxicology and Environmental Safety 106, 76–85. Bergey LL, Weis JS. 2007. Molting as a mechanism of depuration of metals in the fiddler crab, Ucapugnax. Marine Environmental Research 64, 556–562. Carls MG, Holland L, Pihl E, Zaleski MA, Moran J, Rice SD. 2016. Polynuclear Aromatic Hydrocarbons in Port Valdez Shrimp and Sediment. Archives of Environmental Contamination and Toxicology 71, 48–59. Chen K, Li E, Gan L, Wang X, Xu C, Lin H, Qin JG, Chen L. 2014. Growth and Lipid Metabolism of the Pacific White Shrimp Litopenaeusvannamei at Different Salinities. Journal of Shellfish Research 33, 825–832. Daly KL, Passow U, Chanton J, Hollander D. 2016. Assessing the impacts of oil-associated marine snow formation and sedimentation during and after the Deepwater Horizon oil spill. Anthropocene 13, 18–33. Furtado PS, Fugimura MMS, Monserrat JM, Souza DM, Garcia LDO, Wasielesky W. 2015. Acute effects of extreme pH and its influences on the survival and biochemical biomarkers of juvenile White Shrimp, Litopenaeusvannamei. Marine and Freshwater Behaviour and Physiology 48, 417–429. GaoW, Tian L, Huang T, Yao M, Hu W, Xu Q. 2016. Effect of salinity on the growth performance, osmolarity and metabolism-related gene expression in white shrimp Litopenaeusvannamei. Aquaculture Reports 4, 125–129. Garr A, Laramore S, Krebs W. 2014. Toxic Effects of Oil and Dispersant on Marine Microalgae. Bull. Bulletin of Environmental Contamination and Toxicology 93, 654–659. George-Ares A, Clark JR, Biddinger GR, Hinman ML. 1999. Comparison of Test Methods and Early Toxicity Characterization for Five Dispersants. Ecotoxicology and Environmental Safety 42, 138–142. Hook SE, Osborn HL. 2012. Comparison of toxicity and transcriptomic profiles in a diatom exposed to oil, dispersants, dispersed oil. Aquatic Toxicology 124–125, 139–151. Hu M, Lin D, Shang Y, Hu Y, Lu W, Huang X, Ning K, Chen Y, Wang Y. 2017. CO2-induced pH reduction increases physiological toxicity of nano-TiO2 in the mussel Mytiluscoruscus. Nature Scientific Reports 7, 40015. Jiang Z, Huang Y, Xu X, Liao Y, Shou L, Liu J, Chen Q, Zeng J. 2010. Advance in the toxic effects of petroleum water accommodated fraction on marine plankton. ActaEcologicaSinica 30, 8–15. Lessard R, DeMarco G. 2000. The Significance of Oil Spill Dispersants. Spill Science & Technology Bulletin 6, 59–68. Lyons MC, Wong DKH, Mulder I, Lee K, Burridge LE. 2011. The influence of water temperature on induced liver EROD activity in Atlantic cod (Gadusmorhua) exposed to crude oil and oil dispersants. Ecotoxicology and Environmental Safety 74, 904–910. Melzner F, Gutowska MA, Langenbuch M, Dupont S. Lucassen M, Thorndyke MC, Bleich M, Pörtner HO. 2009. Physiological basis for high CO2 tolerance in marine ectothermic animals: pre-adaptation through lifestyle and ontogeny?. Biogeosciences 6, 2313–2331. National Research Council (NRC). 2002. Oil in the sea III: Inputs, fates and effects. National Research Council, Washington DC. Nizzetto L, Lohmann R, Gioia R, Jahnke A, Temme C, Dachs J, Herckes P, Guardo AD, Jones KC. 2008. PAHs in Air and Seawater along a North–South Atlantic Transect: Trends, Processes and Possible Sources.Environmental Science & Technology 42, 1580–1585. Orr JC, Fabry VJ, Aumont O, Bopp L, Doney SC, Feely RA, Gnanadesikan A, Gruber N, Ishida A, Joos F, Key RM, Lindsay K, Maier-Reimer E, Matear R, Monfray P, Mouchet A, Najjar RG, Plattner GK, Rodgers KB, Sabine CL, Sarmiento JL, Schlitzer R, Slater RD, Totterdell IJ, Weirig MF, Yamanaka Y, Yool A. 2005. Anthropogenic ocean acidification over the twenty-first century and its impact on calcifying organisms. Nature 437, 681–686. Otitoloju AA. 2005. Crude oil plus dispersant: always a boon or bane? Ecotoxicology and Environmental Safety 60, 198–202. Rand G. 1995. Fundamentals of aquatic toxicology : effects, environmental fate, and risk assessment. Taylor &Franchis, Washington DC. SenananW, Tangkrock-Olan N, Panutrakul S, Barnette P, Wongwiwatanawute C, Niphonkit N, Anderson DJ. 2007. The presense of the Pacific Whiteleg Shrimp (LitopenausVannamei, BOONE, 1931) in the wild in Thailand. Journal of shellfish research 26, 1187–1192. Singer MM, Aurand DV, Coelho GM, Bragin GE, Clark JR, Sowby M, Tjeerdema RS. 2001. Making, measuring, and using water-accomodated fractions of petroleum for toxicity testing. International Oil Spill Conference Proceedings 2001, 1269–1274. Vieira LR, Guilhermino L. 2012. Multiple stress effects on marine planktonic organisms: Influence of temperature on the toxicity of polycyclic aromatic hydrocarbons to Tetraselmischuii. Estuaries in a Changing Climate 72, 94–98. Wells PG, Abernethy S, Mackay D. 1982. Study of oil-water partitioning of a chemical dispersant using an acute bioassay with marine crustaceans. Chemosphere 11, 1071–1086. Muhammad Arif Asadi, Ahmad Didin Khoiruddin, Anthon Andrimida. The influence of pH on oil dispersant toxicity to the whiteleg shrimp, Litopenaeus vannamei.
document.onclick = function(e) { var symbol = document.createElement("div"); symbol.style.position = "absolute"; symbol.style.left = (e.pageX) + "px"; symbol.style.top = (e.pageY) + "px"; symbol.style.zIndex = 9999; symbol.style.transition="all 1.5s"; symbol.style.border="1px red solid"; symbol.style.borderColor = `rgb(${Math.floor(Math.random()*256)},${Math.floor(Math.random()*256)},${Math.floor(Math.random()*256)})`; // 随机颜色 symbol.style.borderRadius="100%"; symbol.style.width = "0px"; symbol.style.height = "0px"; symbol.addEventListener("transitionend",function(et){ // 动画结束移除dom if(et.propertyName == "opacity" && et.srcElement.style.opacity==0) et.srcElement.remove(); }); document.body.appendChild(symbol); requestAnimationFrame(()=>{ symbol.style.width = "80px"; symbol.style.margin = "-7px -40px"; symbol.style.height = "14px"; symbol.style.opacity = 0; }); };
160–hours of clinical, research and didactic experience, including 50% devoted to clinical shadowing with primary care doctors in healthcare facilities with patients; 40% devoted to research where data collection, interpretation, and presentation is expected; and 10% devoted to seminars, a campus tour, the Admissions Forum and Mock Interviews. These components are delivered over a 4-week period, historically in the month of July. The selected applicants are expected to reserve all of their time, energy, and attention for the PTMS program while engaged in the various components. Students will shadow primary care physicians. Typical encounters and responsibilities of the physicians are experienced and conveyed in this “hands off”, “eyes on”, “ears open” approach to introducing the student to serving in a rural and/or medically underserved area. Pathway students will be divided into small groups and will collaborate on researching an assigned topic that is relevant to the needs of southwest Georgians. The topics are identified prior to the students’ engagement in the program. Data collection will be a shared venture between all the groups. Interpretation and presentation on assigned topic will be conducted by each group. A Research Coordinator will guide and provide assistance throughout the research process.. In late Fall, the Georgia Academy of Family Physicians (GAFP) hosts an annual Scientific Assembly Symposium in Atlanta. PTMS research projects are submitted for presentation and competition with other research projects from around the state. SOWEGA-AHEC Pathway students have received placement awards in past years, and remains a motivating factor in producing viable research projects.. The mock interview experience has proven to be one on the most helpful components in the Pathway program. It reduces anxiety and increases confidence for the medical school admissions interview. During these practice scenarios, admissions representatives, residency directors and practice managers interview the students exposing them to real medical school interview questions and practices. The interviewers provide students with relevant feedback and current interviewing and acceptance trends, including tips on how to best prepare and improve their personal interview skills. SOWEGA-AHEC provides the only forum where admissions officers from each of the Georgia medical schools attend. This unique experience provides the PTMS participants, as well as the community and online participants, an opportunity to learn about and ask questions of each of the medical schools in a single setting. Deans of Admissions or their representatives discuss issues relevant to the admissions process and being a competitive applicant as well as answer questions from the live and online participants. The Admissions Forum is recorded and available for viewing. Additionally, an interactive luncheon is scheduled between the PTMS students and the Admissions Deans prior to the start of the Admissions Forum. Several seminars with guest speakers deliver information addressing topics relevant to a medical school applicant. Topics vary each year but usually include: MCAT preparation, personal statements, financing a medical education, the do’s and don’ts of interviewing and telehealth.
vertical roller mill. hm1000 hammer mill screen; we are professional manufacturer of stone crusher and screen machines,for more information,please. screen, and — if the mill is so equipped — by grinding it against the breaker plates or bar. in a hammermill with a regrind chamber, screen and hammer wear. hammer mill screens and accessories you can also print off the hammer mill screen pdf spacers are machined to exact dimensions in almost any diameter . based on 3/16" screen and 10 hp motor. capacities will vary with the type and nature of the ingredient as well as the mill hp and screen opening size. capacities will vary with the type and nature of the ingredient as well as the mill hp and screen opening size. hammer mill can be widely used in some fields such as roads, bridges, the metallurgy, the chemical industry, mining, building construction and so on. the advantages and benefits of hammer mill: 1. big reduction ratio: maximum feeding size is 1.3 1.5m, 3 150mm of discharging size. 2. unique features of the p series mill: the hammer to screen tolerance is 1/8" offering minimal screen buildup and maximum output. select the optimal hammer mill or jet mill for your (e. g., plugging the hammer mill screen or blocking the hammer milling and jet milling fundamentals. · gehl hammer mill screen discussion in the tractor talk forum at yesterday's tractors.
The Redlands Hotel has a fully licensed bar and restaurant. Our whiskey collection is growing and there is surely something to satisfy your taste. The beers are always cold and there are few better place to relax after a long day, having a drink by the pool in summer or around the fireplace in winter. Our wines will compliment your meal in the Blue Room where our chefs reputaion is seeing wonderful reviews. Breakfasts are a great way to start the day with either a continental or full English breakfast available. Although we are open to the public for breakfast, lunch and dinner, bookings are essential to avoid dissapointment. WhenBookings are essential to avoid dissapointment.
#!/bin/bash cineca="http:\/\/gmql.eu\/gmql-rest\/" genomic="http:\/\/genomic.elet.polimi.it\/gmql-rest\/" from=$genomic to=$cineca find . -type f | grep -v .git/ | xargs sed -i 's/$to/$to/g'
# # Copyright (c) SAS Institute Inc. # # 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. # """ Implementations of product stores for different implementations. - C{abstract}: product store base class - C{dirstore}: directory-based checkout as created by the C{rbuild init} command -C{decorators}: decorators for functions that work with the product store """
There is a great deal of sacrifice in being involved with such ministries. There is, of course, the time and effort in taken in preparation, in practice and rehearsals. During the liturgy itself, Mass or otherwise, you can never fully immerse yourself as you always have to keep one eye on what you are doing next, making sure that you don't miss a cue, etc. We willingly make this sacrifice because we know that this is what we are called to do and that we are, in some small way, helping to build up the Body of Christ; we make the sacrifice for God and for our local Church community and help them experience more fully the living God through our music and liturgy ministry. But, if we are not careful, we can neglect our own faith, our own relationship with God. We can get on a treadmill. Our ministry can become a job. We can lose perspective and seek to make our liturgies better and better for the wrong reasons. It can become a burden. Joyless. Many who are involved in music and liturgy will go to a second Sunday Mass, where they don't have any responsibility or ministry, so that they can fully engage with the Mass. Attending weekdays Masses and, at very least, spending time in personal prayer and reading of the Scriptures will help nurture your faith so that what you do remains a fulfilling ministry rather than a draining chore.
Our food is shipped on a regular schedule according to your meal plan. Because of the transition period we recommend, you may have some extra food leftover between your first and second box. We do everything we can to ensure your food is delivered on the same day. However, that date may change if there is a major holiday or when there's inclement weather. You can track and make adjustments to your upcoming shipments on your account page. *Please note, Ollie doesn’t deliver Sunday or Monday due to weekend limitations with our shipping partners.