├── .bowerrc ├── .gitignore ├── LICENSE ├── Outlook-Add-in-RepoReport.yml ├── README-localized ├── README-es-es.md ├── README-fr-fr.md ├── README-ja-jp.md ├── README-pt-br.md ├── README-ru-ru.md └── README-zh-cn.md ├── README.md ├── appread ├── app.module.js ├── app.routes.js ├── home │ ├── home.controller.js │ └── home.html ├── index.html └── services │ └── data.service.js ├── bower.json ├── content ├── Office.css ├── fabric.components.css ├── fabric.components.min.css ├── fabric.components.rtl.css ├── fabric.components.rtl.min.css ├── fabric.css ├── fabric.min.css ├── fabric.rtl.css └── fabric.rtl.min.css ├── gulpfile.js ├── jsconfig.json ├── manifest.xml ├── package.json ├── repo report screenshot.PNG ├── scripts ├── MicrosoftAjax.js ├── jquery.fabric.js └── jquery.fabric.min.js └── tsd.json /.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "/bower_components" 3 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | bower_components/ 2 | node_modules/ 3 | .vscode/ 4 | npm-debug.log -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Microsoft Corporation 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /Outlook-Add-in-RepoReport.yml: -------------------------------------------------------------------------------- 1 | ### YamlMime:Sample 2 | sample: 3 | - name: 'Outlook add-in: Repo report' 4 | path: '' 5 | description: Repo Report is an Outlook add-in, made with Angular, that scans your emails for public GitHub repository links and displays information about the ones it finds. 6 | readme: '' 7 | generateZip: FALSE 8 | isLive: TRUE 9 | technologies: 10 | - Office Add-in 11 | azureDeploy: '' 12 | author: martellaj 13 | platforms: [] 14 | languages: 15 | - angular.js 16 | extensions: 17 | products: 18 | - Outlook 19 | scenarios: [] 20 | -------------------------------------------------------------------------------- /README-localized/README-es-es.md: -------------------------------------------------------------------------------- 1 | --- 2 | page_type: sample 3 | products: 4 | - office-outlook 5 | - office-365 6 | languages: 7 | - javascript 8 | extensions: 9 | contentType: samples 10 | technologies: 11 | - Add-ins 12 | platforms: 13 | - CSS 14 | - AngularJS 15 | createdDate: 10/15/2015 12:44:12 PM 16 | --- 17 | # Repo Report 18 | **Repo Report** es un complemento de Outlook creado con Angular que examina correos electrónicos para identificar vínculos públicos de repositorios de GitHub y muestra información sobre los que encuentra. 19 | 20 | ![Repo Report screenshot](./repo report screenshot.PNG) 21 | 22 | ## Requisitos previos 23 | * [NPM](https://www.npmjs.com/),el administrador de paquetes de nodos, es necesario para instalar las dependencias de desarrollo. 24 | * [Bower](http://bower.io/) es necesario para instalar las dependencias de FrontEnd. 25 | * [Gulp](http://gulpjs.com/) se utiliza como ejecutor de tareas, incluyendo dar servicio a la aplicación en un servidor de desarrollo. 26 | * Una cuenta de Office 365. Si no tiene una, puede[unirse al Programa de Desarrolladores de Office 365 y obtener una suscripción gratuita de 1 año a Office 365](https://aka.ms/devprogramsignup). 27 | 28 | ## Configurar el complemento 29 | 1. Clone este repositorio. 30 | 2. Ejecute `npm install` para instalar tanto las dependencias de npm como las de Bower. 31 | 3. Ejecute `gulp serve-static` para iniciar el servidor de desarrollo. 32 | 4. Vaya a [mail.office365.com](http://mail.office365.com) e inicie sesión con su cuenta de Office 365. 33 | 5. Haga clic en el icono de engranaje en la esquina superior derecha y elija *Administrar complementos*. 34 | 6. Haga clic en el icono de signo más y luego elija *Agregar desde un archivo*. 35 | 7. Vaya a esta carpeta del repositorio y elija *manifest.xml*. 36 | 8. Luego complete el asistente (*Siguiente*, *Instalar*, *Aceptar*) para que el complemento esté disponible en su cuenta de Office 365. 37 | 9. Por último, tendrá que abrir la [aplicación](https://localhost:8443/appread/index.html) en un explorador y confiar en el certificado para `localhost:8443`. El complemento no se ejecutará si su equipo no confía en el. 38 | 39 | ## Ejecutar el complemento 40 | 1. Después de instalar el complemento, vaya a [mail.office365.com](mail.office365.com). 41 | 2. Elija un correo electrónico (es posible que primero deba enviarse uno a usted mismo) que tenga al menos un vínculo a un repositorio público de GitHub. *¡El complemento solo se activa si se encuentra una dirección URL de destino!* 42 | 3. Haga clic en *Repo Report*, que se encuentra directamente por encima del cuerpo del mensaje de correo electrónico para ver el complemento en acción. 43 | 44 | ## Preguntas y comentarios 45 | Nos encantaría recibir sus comentarios sobre este ejemplo. Puede enviarnos sus preguntas y sugerencias a través de la sección [Problemas](https://github.com/OfficeDev/Outlook-Add-in-RepoReport/issues) de este repositorio. 46 | 47 | ## Recursos adicionales 48 | * [Generador de Yeoman](https://github.com/OfficeDev/generator-office): Generador de Yeoman para la creación de proyectos relacionados con Microsoft Office (incluyendo complementos). Este proyecto se compiló utilizándolo. 49 | * [Office UI Fabric](https://github.com/OfficeDev/Office-UI-Fabric/): El marco de trabajo front-end para crear experiencias en Office 365. Este proyecto lo usa para obtener la apariencia y el aspecto de Office. 50 | * [dev.office.com](http://dev.office.com): Encuentre documentación, ejemplos y otra información útil relevante para el desarrollo de Office. 51 | * [Activación de expresiones regulares](https://msdn.microsoft.com/en-us/library/office/fp142135.aspx): Para que los complementos se activen en un formato de dirección URL específico, utilizamos expresiones regulares. 52 | 53 | ## Copyright 54 | Copyright (c) 2015 Microsoft. Todos los derechos reservados. 55 | 56 | 57 | Este proyecto ha adoptado el [Código de conducta de código abierto de Microsoft](https://opensource.microsoft.com/codeofconduct/). Para obtener más información, vea [Preguntas frecuentes sobre el código de conducta](https://opensource.microsoft.com/codeofconduct/faq/) o póngase en contacto con [opencode@microsoft.com](mailto:opencode@microsoft.com) si tiene otras preguntas o comentarios. 58 | -------------------------------------------------------------------------------- /README-localized/README-fr-fr.md: -------------------------------------------------------------------------------- 1 | --- 2 | page_type: sample 3 | products: 4 | - office-outlook 5 | - office-365 6 | languages: 7 | - javascript 8 | extensions: 9 | contentType: samples 10 | technologies: 11 | - Add-ins 12 | platforms: 13 | - CSS 14 | - AngularJS 15 | createdDate: 10/15/2015 12:44:12 PM 16 | --- 17 | # Repo Report 18 | **Repo Report** est un complément Outlook, créé avec Angular, qui analyse vos courriers électroniques à la recherche de liens du référentiel GitHub public et affiche des informations sur ceux qu’il détecte. 19 | 20 | ![Repo Report screenshot](./repo report screenshot.PNG) 21 | 22 | ## Conditions préalables 23 | * [npm](https://www.npmjs.com/), Node Package Manager, est nécessaire pour installer des dépendances de développement. 24 | * [Bower](http://bower.io/) est nécessaire pour installer des dépendances frontales. 25 | * [Gulp](http://gulpjs.com/) est utilisée en tant qu'exécuteur de tâches, y compris l'utilisation de l’application sur un serveur de développement. 26 | * Un compte Office 365. Si vous n’en avez pas, vous pouvez [participer au programme pour les développeurs Office 365 et obtenir un abonnement gratuit d’un an à Office 365](https://aka.ms/devprogramsignup). 27 | 28 | ## Configurer le complément 29 | 1. Clonez ce référentiel. 30 | 2. Exécutez `npm install` pour installer les dépendances npm et Bower. 31 | 3. Exécutez `gulp serve-static` pour lancer le serveur de développement. 32 | 4. Accédez à [mail.office365.com](http://mail.office365.com) et connectez-vous avec votre compte Office 365. 33 | 5. Cliquez sur l’icône d’engrenage en haut à droite, puis choisissez *Gérer les compléments*. 34 | 6. Cliquez sur l’icône plus, puis sélectionnez *Ajouter à partir d’un fichier*. 35 | 7. Parcourez ce dossier de référentiel et sélectionnez *manifest.xml*. 36 | 8. Terminez l’Assistant (*Suivant*, *Installer*, *OK*) pour rendre le complément disponible dans votre compte Office 365. 37 | 9. Enfin, vous devez ouvrir l'[application](https://localhost:8443/appread/index.html) dans un navigateur et faire confiance au certificat pour `localhost:8443`. Le complément ne s’exécute pas si votre ordinateur ne l’approuve pas. 38 | 39 | ## Exécution du complément 40 | 1. Une fois le complément installé, accédez à [mail.office365.com](mail.office365.com). 41 | 2. Choisissez un message électronique (vous devrez probablement vous en envoyer la première fois) qui possède au moins un lien vers un référentiel GitHub public. *Le complément est activé uniquement si une URL cible est détectée.* 42 | 3. Cliquez sur *Repo Report* se trouvant directement au-dessus du corps du message pour voir le complément à l'œuvre. 43 | 44 | ## Questions et commentaires 45 | Nous aimerions connaître votre opinion sur cet exemple. Vous pouvez nous faire part de vos questions et suggestions dans la rubrique [Problèmes](https://github.com/OfficeDev/Outlook-Add-in-RepoReport/issues) de ce référentiel. 46 | 47 | ## Ressources supplémentaires 48 | * [Générateur Yeoman](https://github.com/OfficeDev/generator-office) : Générateur Yeoman pour la création de projets relatifs à Microsoft Office (y compris les compléments). Ce projet a été créé à l’aide de celui-ci. 49 | * [Office UI Fabric](https://github.com/OfficeDev/Office-UI-Fabric/) : Infrastructure frontale permettant de créer des expériences pour Office 365. Ce projet l’utilise pour obtenir « l’apparence » d’Office. 50 | * [dev.office.com](http://dev.office.com) : trouvez de la documentation, des exemples et d’autres informations utiles relatives au développement d’Office. 51 | * [Activation d'expression régulière](https://msdn.microsoft.com/en-us/library/office/fp142135.aspx) : elle est utilisée pour obtenir des compléments à activer dans un format d’URL spécifique lors de l'utilisation d'expressions régulières. 52 | 53 | ## Copyright 54 | Copyright (c) 2015 Microsoft. Tous droits réservés. 55 | 56 | 57 | Ce projet a adopté le [code de conduite Open Source de Microsoft](https://opensource.microsoft.com/codeofconduct/). Pour en savoir plus, reportez-vous à la [FAQ relative au code de conduite](https://opensource.microsoft.com/codeofconduct/faq/) ou contactez [opencode@microsoft.com](mailto:opencode@microsoft.com) pour toute question ou tout commentaire. 58 | -------------------------------------------------------------------------------- /README-localized/README-ja-jp.md: -------------------------------------------------------------------------------- 1 | --- 2 | page_type: sample 3 | products: 4 | - office-outlook 5 | - office-365 6 | languages: 7 | - javascript 8 | extensions: 9 | contentType: samples 10 | technologies: 11 | - Add-ins 12 | platforms: 13 | - CSS 14 | - AngularJS 15 | createdDate: 10/15/2015 12:44:12 PM 16 | --- 17 | # Repo Report 18 | **Repo Report** は Angular で開発された Outlook のアドインで、メールをスキャンして公開 GitHub リポジトリのリンクを探し、見つかったリンクの情報を表示します。 19 | 20 | ![Repo Report screenshot](./repo report screenshot.PNG) 21 | 22 | ## 前提条件 23 | * [npm](https://www.npmjs.com/) (ノード パッケージ マネージャー) は、開発の依存関係をインストールするのに必要です。 24 | * [Bower](http://bower.io/) は、フロントエンドの依存関係をインストールするのに必要です。 25 | * [Gulp](http://gulpjs.com/) は、開発サーバーにアプリケーションをサービスするなど、タスク ランナーとして使用されます。 26 | * Office 365 アカウント。お持ちでない場合は、[Office 365 Developer プログラムに参加して、Office 365 の 1 年間無料のサブスクリプションを取得](https://aka.ms/devprogramsignup)できます。 27 | 28 | ## アドインを構成する 29 | 1. このリポジトリの複製を作成します。 30 | 2. `npm install` を実行し、npm と Bower の両方の依存関係をインストールします。 31 | 3. `gulp serve-static` を実行し、開発用サーバーを起動します。 32 | 4. [mail.office365.com](http://mail.office365.com) に移動し、Office 365 アカウントでサインインします。 33 | 5. 右上隅にある歯車アイコンをクリックし、 [*アドインの管理*] を選択します。 34 | 6. プラス記号のアイコンをクリックし、[*ファイルから追加*] を選択します。 35 | 7. このリポジトリ フォルダーを参照し、[*manifest.xml*] を選択します。 36 | 8. [*次へ*]、[*インストール*]、[*OK*] の順に選択してウィザードを完了し、アドインが Office 365 アカウントで使用できるようにします。 37 | 9. 最後に、[アプリ](https://localhost:8443/appread/index.html)をブラウザーで開き、`localhost:8443` の証明書を信頼する必要があります。この証明書がコンピューターにより信頼されない場合、アドインは実行されません。 38 | 39 | ## アドインを実行する 40 | 1. アドインをインストールしたら、[mail.office365.com](mail.office365.com) に移動します。 41 | 2. パブリック GitHub リポジトリへのリンクが少なくとも 1 つ含まれているメール (ほとんどの場合、最初に自分宛に 1 通送信する必要があります) を選択します。*アドインは、対象 URL が検出された場合にのみ有効になります。* 42 | 3. メール本文のすぐ上にある [*Repo Report*] をクリックし、アドインの動作を確認します。 43 | 44 | ## 質問とコメント 45 | このサンプルに関するフィードバックをお寄せください。質問や提案は、このリポジトリの「[問題](https://github.com/OfficeDev/Outlook-Add-in-RepoReport/issues)」セクションで送信できます。 46 | 47 | ## その他のリソース 48 | * [Yeoman ジェネレーター](https://github.com/OfficeDev/generator-office) - Microsoft Office 関連のプロジェクト (アドインなど) を構築するための Yeoman ジェネレーターです。このプロジェクトは、Yeoman ジェネレーターを使って構築されました。 49 | * [Office UI Fabric](https://github.com/OfficeDev/Office-UI-Fabric/) - Office 365 のエクスペリエンスを構築するためのフロント エンドのフレームワークです。Office の外観と操作性を持たせるために、このプロジェクトでも使用されています。 50 | * [dev.office.com](http://dev.office.com) - Office 開発に関連するドキュメント、サンプル、およびその他の役に立つ情報が見つかります。 51 | * [正規表現アクティブ化](https://msdn.microsoft.com/en-us/library/office/fp142135.aspx) - アドインを特定の URL 形式でアクティブ化させるために、正規表現を使用しています。 52 | 53 | ## 著作権 54 | Copyright (c) 2015 Microsoft.All rights reserved. 55 | 56 | 57 | このプロジェクトでは、[Microsoft オープン ソース倫理規定](https://opensource.microsoft.com/codeofconduct/)が採用されています。詳細については、「[倫理規定の FAQ](https://opensource.microsoft.com/codeofconduct/faq/)」を参照してください。また、その他の質問やコメントがあれば、[opencode@microsoft.com](mailto:opencode@microsoft.com) までお問い合わせください。 58 | -------------------------------------------------------------------------------- /README-localized/README-pt-br.md: -------------------------------------------------------------------------------- 1 | --- 2 | page_type: sample 3 | products: 4 | - office-outlook 5 | - office-365 6 | languages: 7 | - javascript 8 | extensions: 9 | contentType: samples 10 | technologies: 11 | - Add-ins 12 | platforms: 13 | - CSS 14 | - AngularJS 15 | createdDate: 10/15/2015 12:44:12 PM 16 | --- 17 | # Relatório do repositório 18 | **Repo Report** é um suplemento do Outlook, criado com Angular, que verifica emails em busca de links de repositório público do GitHub e exibe informações sobre os que encontra. 19 | 20 | ![Captura de tela do relatório do repositório] (captura de tela do relatório/repo. PNG) 21 | 22 | ## Pré-requisitos 23 | * [NPM](https://www.npmjs.com/), Gerenciador de pacotes de nó, é necessário para instalar dependências do desenvolvedor. 24 | * [Bower](http://bower.io/) é necessário para instalar as dependências de frontend. 25 | * o [Gulp](http://gulpjs.com/) é usado como um executor de tarefas, incluindo a disponibilização do aplicativo em um servidor de desenvolvimento. 26 | * Uma conta do Office 365. Caso não tenha nenhuma delas, [participar do Programa para Desenvolvedores do Office 365 e obter uma assinatura gratuita de 1 ano do Office 365](https://aka.ms/devprogramsignup). 27 | 28 | ## Configurar o suplemento 29 | 1. Clone este repositório. 30 | 2. Execute `NPM instalar` para instalar as dependências do NPM e do Bower. 31 | 3. Execute `Gulp` estática para iniciar o servidor de desenvolvimento. 32 | 4. Vá para [mail.office365.com](http://mail.office365.com) e entre com sua conta do Office 365. 33 | 5. Escolha o ícone de engrenagem no canto superior direito e escolha *Gerenciar Suplementos. 34 | 6. Clique no ícone de adição e, em seguida, escolha *adicionar de um arquivo*. 35 | 7. Navegue até essa pasta do repositório e escolha *manifest. xml*. 36 | 8. Em seguida, conclua o assistente (*próximo*, *instalar*, *OK*) para disponibilizar o suplemento em sua conta do Office 365. 37 | 9. Por fim, você precisará abrir o [aplicativo ](https://localhost:8443/appread/index.html) em um navegador e confiar no certificado para `localhost: 8443`. O suplemento não será executado se o seu computador não confiar. 38 | 39 | ## Execute o suplemento 40 | 1. Depois de instalar o suplemento, vá para [mail.office365.com](mail.office365.com). 41 | 2. Escolha um email (provavelmente, você precisa enviar uma primeiro) com pelo menos um link para um repositório do GitHub público. *O suplemento só será ativado se uma URL de destino for encontrada!* 42 | 3. Clique *relatório do repositório* localizado diretamente acima do corpo do email para ver o suplemento em ação. 43 | 44 | ## Perguntas e comentários 45 | Gostaríamos de saber sua opinião sobre este exemplo. Você pode enviar perguntas e sugestões na seção [Problemas](https://github.com/OfficeDev/Outlook-Add-in-RepoReport/issues) deste repositório. 46 | 47 | ## Recursos adicionais 48 | * [Gerador do Yeoman](https://github.com/OfficeDev/generator-office) - Gerador do Yeoman para compilar projetos relacionados do Microsoft Office (incluindo suplementos). Esse projeto foi criado usando-o. 49 | * [Office UI Fabric](https://github.com/OfficeDev/Office-UI-Fabric/) - A estrutura de front-end para criar experiências para o Office 365. Esse projeto usa esse recurso para obter uma aparência do Office. 50 | * [dev.office.com](http://dev.office.com)-encontre a documentação, os exemplos e outras informações úteis relevantes para o desenvolvimento do Office. 51 | * [Ativação de expressão regular](https://msdn.microsoft.com/en-us/library/office/fp142135.aspx) para que os suplementos sejam ativados em um formato de URL específico, usamos expressões regulares. 52 | 53 | ## Direitos autorais 54 | Copyright © 2015 Microsoft. Todos os direitos reservados. 55 | 56 | 57 | Este projeto adotou o [Código de Conduta do Código Aberto da Microsoft](https://opensource.microsoft.com/codeofconduct/). Para saber mais, confira [Perguntas frequentes sobre o Código de Conduta](https://opensource.microsoft.com/codeofconduct/faq/) ou contate [opencode@microsoft.com](mailto:opencode@microsoft.com) se tiver outras dúvidas ou comentários. 58 | -------------------------------------------------------------------------------- /README-localized/README-ru-ru.md: -------------------------------------------------------------------------------- 1 | --- 2 | page_type: sample 3 | products: 4 | - office-outlook 5 | - office-365 6 | languages: 7 | - javascript 8 | extensions: 9 | contentType: samples 10 | technologies: 11 | - Add-ins 12 | platforms: 13 | - CSS 14 | - AngularJS 15 | createdDate: 10/15/2015 12:44:12 PM 16 | --- 17 | # Отчет по репозиториям 18 | **Отчет по репозиториям** — это надстройка Outlook, созданная с помощью Angular, которая ищет в ваших электронных сообщениях ссылки на общедоступные репозитории GitHub и показывает сведения о своих находках. 19 | 20 | ![Repo Report screenshot](./repo report screenshot.PNG) 21 | 22 | ## Необходимые компоненты 23 | * [npm](https://www.npmjs.com/) Node Package Manager необходим, чтобы установить зависимости разработчика. 24 | * [Bower](http://bower.io/) требуется для установки внешних зависимостей. 25 | * [Gulp](http://gulpjs.com/) используется в средстве выполнения задач, в том числе для обслуживания приложения на сервере разработки. 26 | * Учетная запись Office 365. Если у вас его нет, вы можете [Присоединиться к программе для разработчиков Office 365 и получить бесплатную годовую подписку на Office 365](https://aka.ms/devprogramsignup). 27 | 28 | ## Настройка надстройки 29 | 1. Клонируйте этот репозиторий. 30 | 2. Запустите `npm install`, чтобы установить зависимости npm и Bower. 31 | 3. Запустите сервер разработки с помощью `gulp serve-static`. 32 | 4. Перейдите в [mail.office365.com](http://mail.office365.com) и войдите в систему с помощью своей учетной записи Office 365. 33 | 5. Щелкните значок шестеренки в правом верхнем углу, а затем выберите *Управление надстройками*. 34 | 6. Щелкните значок "плюс" и выберите *Добавить из файла*. 35 | 7. Перейдите к этой папке репозитория и выберите *manifest.xml*. 36 | 8. Завершите работу мастера (*Следующий*, *Установить*,*ОК*), чтобы сделать надстройку доступной в вашей учетной записи Office 365. 37 | 9. Наконец, необходимо открыть [приложение ](https://localhost:8443/appread/index.html) в браузере, а также довериться сертификату `localhost:8443`. Эту надстройку не удастся запустить, если ваш компьютер не доверяет ей. 38 | 39 | ## Запуск надстройки 40 | 1. После установки надстройки перейдите в [mail.office365.com](mail.office365.com). 41 | 2. Выберите сообщение (можете отправить его себе) с хотя бы одной ссылкой на общедоступный репозиторий GitHub. *Надстройка активируется только если найден целевой URL-адрес!* 42 | 3. Чтобы посмотреть надстройку в действии, нажмите кнопку *Отчет по репозиториям* над текстом сообщения. 43 | 44 | ## Вопросы и комментарии 45 | Мы будем рады узнать ваше мнение об этом примере. Вы можете отправлять нам вопросы и предложения в разделе [Проблемы](https://github.com/OfficeDev/Outlook-Add-in-RepoReport/issues) этого репозитория. 46 | 47 | ## Дополнительные ресурсы 48 | * [Yeoman generator](https://github.com/OfficeDev/generator-office) - Yeoman генератор для создания проектов, касающихся Microsoft Office (в том числе надстроек). Этот проект был создан с его использованием. 49 | * [Office UI Fabric](https://github.com/OfficeDev/Office-UI-Fabric/) — клиентская платформа, позволяющая создавать решения для Office 365. Она используется в этом проекте для получения внешнего вида и функций Office. 50 | * [dev.office.com](http://dev.office.com) — поиск документации, примеров и других полезных сведений, относящихся к разработке приложений Office. 51 | * [Regular expression activation](https://msdn.microsoft.com/en-us/library/office/fp142135.aspx) — чтобы активировать надстройки с определенным форматом URL-адреса, мы использовали регулярные выражения. 52 | 53 | ## Авторские права 54 | (c) Корпорация Майкрософт (Microsoft Corporation), 2015. Все права защищены. 55 | 56 | 57 | Этот проект соответствует [Правилам поведения разработчиков открытого кода Майкрософт](https://opensource.microsoft.com/codeofconduct/). Дополнительные сведения см. в разделе [часто задаваемых вопросов о правилах поведения](https://opensource.microsoft.com/codeofconduct/faq/). Если у вас возникли вопросы или замечания, напишите нам по адресу [opencode@microsoft.com](mailto:opencode@microsoft.com). 58 | -------------------------------------------------------------------------------- /README-localized/README-zh-cn.md: -------------------------------------------------------------------------------- 1 | --- 2 | page_type: sample 3 | products: 4 | - office-outlook 5 | - office-365 6 | languages: 7 | - javascript 8 | extensions: 9 | contentType: samples 10 | technologies: 11 | - Add-ins 12 | platforms: 13 | - CSS 14 | - AngularJS 15 | createdDate: 10/15/2015 12:44:12 PM 16 | --- 17 | # 存储库报告 18 | **存储库报告**是通过 Angular 构建的 Outlook 加载项,用于对电子邮件进行扫描以查找公共 GitHub 存储库链接,并显示找到的相关信息。 19 | 20 | ![存储库报告屏幕截图](./repo report screenshot.PNG) 21 | 22 | ## 先决条件 23 | * 需要使用 [npm](https://www.npmjs.com/)(节点包管理器)安装开发依赖项。 24 | * 需要使用 [Bower](http://bower.io/) 安装前端依赖项。 25 | * [Gulp](http://gulpjs.com/) 用作任务运行程序,包括在开发服务器上为应用程序提供服务。 26 | * Office 365 帐户。如果你没有该帐户,可以[参加 Office 365 开发人员计划并获取为期 1 年的免费 Office 365 订阅](https://aka.ms/devprogramsignup)。 27 | 28 | ## 配置加载项 29 | 1. 克隆该存储库。 30 | 2. 运行 `npm 安装` 以安装 npm 和 Bower 依赖项。 31 | 3. 运行 `gulp serve-static` 以启动开发服务器。 32 | 4. 转到 [mail.office365.com](http://mail.office365.com) 并使用你的 Office 365 帐户登录。 33 | 5. 单击右上角的齿轮图标,然后选择“*管理加载项*”。 34 | 6. 单击加号图标,然后选择“*从文件添加*”。 35 | 7. 浏览到此存储库文件夹,然后选择 *manifest.xml*。 36 | 8. 随后完成向导(“*下一步*”、“*安装*”、“*确定*”),使该加载项在 Office 365 帐户上可用。 37 | 9. 最后,必须在浏览器中打开[应用](https://localhost:8443/appread/index.html),并信任 `localhost:8443` 的证书。如果计算机不信任该证书,则加载项不会运行。 38 | 39 | ## 运行加载项 40 | 1. 安装加载项后,转到 [mail.office365.com](mail.office365.com)。 41 | 2. 选择一封电子邮件(你可能必须先向自己发送),其中至少有一条指向公共 GitHub 存储库的链接。*仅当找到目标 URL 的情况下才会激活加载项!* 42 | 3. 单击电子邮件正文上方的“*库报告*”以查看加载项的效果。 43 | 44 | ## 问题和意见 45 | 我们乐意倾听你对本示例的反馈。你可通过该存储库中的[问题](https://github.com/OfficeDev/Outlook-Add-in-RepoReport/issues)部分向我们发送问题和建议。 46 | 47 | ## 其他资源 48 | * [Yeoman 生成器](https://github.com/OfficeDev/generator-office) - 生成与 Microsoft Office 相关的项目(包括加载项)的 Yeoman 生成器。本项目便是使用该生成器生成的。 49 | * [Office UI Fabric](https://github.com/OfficeDev/Office-UI-Fabric/) - 用于生成 Office 365 体验的前端框架。此项目使用它来获取 Office 的外观。 50 | * [dev.office.com](http://dev.office.com) - 查找与 Office 开发相关的文档、示例和其他有用信息。 51 | * [正则表达式激活](https://msdn.microsoft.com/en-us/library/office/fp142135.aspx) - 为了以特定 URL 格式激活加载项,我们使用了正则表达式。 52 | 53 | ## 版权信息 54 | 版权所有 (c) 2015 Microsoft。保留所有权利。 55 | 56 | 57 | 此项目已采用 [Microsoft 开放源代码行为准则](https://opensource.microsoft.com/codeofconduct/)。有关详细信息,请参阅[行为准则 FAQ](https://opensource.microsoft.com/codeofconduct/faq/)。如有其他任何问题或意见,也可联系 [opencode@microsoft.com](mailto:opencode@microsoft.com)。 58 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | --- 2 | page_type: sample 3 | products: 4 | - office-outlook 5 | - office-365 6 | languages: 7 | - javascript 8 | extensions: 9 | contentType: samples 10 | technologies: 11 | - Add-ins 12 | platforms: 13 | - CSS 14 | - AngularJS 15 | createdDate: 10/15/2015 12:44:12 PM 16 | --- 17 | # Repo Report 18 | **Repo Report** is an Outlook add-in, made with Angular, that scans your emails for public GitHub repository links and displays information about the ones it finds. 19 | 20 | ![Repo Report screenshot](./repo report screenshot.PNG) 21 | 22 | ## Prerequisites 23 | * [npm](https://www.npmjs.com/), Node Package Manager, is required to install dev dependencies. 24 | * [Bower](http://bower.io/) is required to install frontend dependencies. 25 | * [Gulp](http://gulpjs.com/) is used as a task runner, including serving the application on a development server. 26 | * An Office 365 account. If you don't have one, you can [join the Office 365 Developer Program and get a free 1 year subscription to Office 365](https://aka.ms/devprogramsignup). 27 | 28 | ## Configure the add-in 29 | 1. Clone this repository. 30 | 2. Run `npm install` to install both npm and Bower dependencies. 31 | 3. Run `gulp serve-static` to start development server. 32 | 4. Go to [mail.office365.com](http://mail.office365.com) and sign in with your Office 365 account. 33 | 5. Click the gear icon on the upper right, then choose *Manage add-ins*. 34 | 6. Click the plus icon, then choose *Add from a file*. 35 | 7. Browse to this repository folder and choose *manifest.xml*. 36 | 8. Then complete the wizard (*Next*, *Install*, *OK*) to make the add-in available on your Office 365 account. 37 | 9. Finally, you'll have to open the [app](https://localhost:8443/appread/index.html) in a browser and trust the certificate for `localhost:8443`. The add-in won't run if your computer doesn't trust it. 38 | 39 | ## Run the add-in 40 | 1. After installing the add-in, go to [mail.office365.com](mail.office365.com). 41 | 2. Choose an email (you probably have to send yourself one first) that has at least one link to a public GitHub repository. *The add-in is only activated if a target URL is found!* 42 | 3. Click *Repo Report* found directly above the body of the email to see the add-in in action. 43 | 44 | ## Questions and comments 45 | We'd love to get your feedback about this sample. You can send your questions and suggestions to us in the [Issues](https://github.com/OfficeDev/Outlook-Add-in-RepoReport/issues) section of this repository. 46 | 47 | ## Additional resources 48 | * [Yeoman generator](https://github.com/OfficeDev/generator-office) - Yeoman generator for building Microsoft Office related projects (including add-ins). This project was built using it. 49 | * [Office UI Fabric](https://github.com/OfficeDev/Office-UI-Fabric/) - The front-end framework for building experiences for Office 365. This project uses it to get an Office "look and feel". 50 | * [dev.office.com](http://dev.office.com) - Find documentation, samples, and other helpful information relevant to Office development. 51 | * [Regular expression activation](https://msdn.microsoft.com/en-us/library/office/fp142135.aspx) - To get add-ins to activate on a specific URL format, we used regular expressions. 52 | 53 | ## Copyright 54 | Copyright (c) 2015 Microsoft. All rights reserved. 55 | 56 | 57 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information, see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. 58 | -------------------------------------------------------------------------------- /appread/app.module.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. 3 | * See LICENSE in the project root for license information. 4 | */ 5 | 6 | (function(){ 7 | 'use strict'; 8 | 9 | // Create the Angular app. 10 | var officeAddin = angular.module('officeAddin', [ 11 | 'ngRoute', 12 | 'ngSanitize' 13 | ]); 14 | 15 | // Configure the Angular app. 16 | officeAddin.config(['$logProvider', function($logProvider){ 17 | if ($logProvider.debugEnabled) { 18 | $logProvider.debugEnabled(true); 19 | } 20 | }]); 21 | 22 | // When Office has initalized, manually bootstrap the Angular app. 23 | Office.initialize = function(){ 24 | console.log('Office initialized. Bootstrapping the Angular app...'); 25 | angular.bootstrap(jQuery('#container'), ['officeAddin']); 26 | }; 27 | 28 | })(); 29 | -------------------------------------------------------------------------------- /appread/app.routes.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. 3 | * See LICENSE in the project root for license information. 4 | */ 5 | 6 | (function(){ 7 | 'use strict'; 8 | 9 | var officeAddin = angular.module('officeAddin'); 10 | officeAddin.config(['$routeProvider', routeConfigurator]); 11 | 12 | function routeConfigurator($routeProvider){ 13 | $routeProvider 14 | .when('/', { 15 | templateUrl: 'home/home.html', 16 | controller: 'homeController', 17 | controllerAs: 'home' 18 | }); 19 | 20 | $routeProvider.otherwise({redirectTo: '/'}); 21 | } 22 | })(); 23 | -------------------------------------------------------------------------------- /appread/home/home.controller.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. 3 | * See LICENSE in the project root for license information. 4 | */ 5 | 6 | (function(){ 7 | 'use strict'; 8 | 9 | angular.module('officeAddin') 10 | .controller('homeController', ['dataService', homeController]); 11 | 12 | function homeController(dataService){ 13 | var vm = this; 14 | 15 | // List of repos mentioned in the email. 16 | vm.repos; 17 | 18 | ///////////////////////////////////////// 19 | // End of exposed properties and methods. 20 | 21 | /** 22 | * Apply regular expressions from manifest.xml on message body to get the 23 | * URLs that caused the add-in to activate. 24 | */ 25 | var repoUrls = Office.context.mailbox.item.getRegExMatches().GitHubUrl; 26 | dataService.getRepoData(repoUrls) 27 | .then(function(repoData) { 28 | vm.repos = repoData; 29 | }); 30 | } 31 | 32 | })(); 33 | -------------------------------------------------------------------------------- /appread/home/home.html: -------------------------------------------------------------------------------- 1 | 5 | 6 |
7 |
8 |
9 |
10 |
11 |

{{ repo.title }} by {{ repo.owner }}

12 | {{ repo.stars}} 13 | 14 | {{ repo.forks }} 15 |

{{ repo.description }}

16 |
17 |
18 |
19 |
20 |
21 |
-------------------------------------------------------------------------------- /appread/index.html: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 |
41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /appread/services/data.service.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. 3 | * See LICENSE in the project root for license information. 4 | */ 5 | 6 | (function(){ 7 | 'use strict'; 8 | 9 | angular.module('officeAddin') 10 | .service('dataService', ['$q', '$http', dataService]); 11 | 12 | function dataService($q, $http){ 13 | /** 14 | * Exposed properties and methods. 15 | */ 16 | return { 17 | getRepoData: getRepoData 18 | }; 19 | 20 | ///////////////////////////////////////// 21 | // End of exposed properties and methods. 22 | 23 | /** 24 | * Given an array of GitHub repo URLs, this function 25 | * returns an array of objects describing the URLs. 26 | */ 27 | function getRepoData(repoNames) { 28 | var deferred = $q.defer(); 29 | var repos = []; 30 | var reposProcessed = 0; 31 | 32 | // Iterate over the repo names. 33 | for (var i = 0; i < repoNames.length; i++) { 34 | var repoParts = repoNames[i].split('/'); 35 | var ownerName = repoParts[1]; 36 | var repoName = repoParts[2]; 37 | 38 | $http.get('https://api.github.com/repos/' + ownerName + '/' + repoName) 39 | .then(function(response) { 40 | var data = response.data; 41 | var repo = { 42 | 'title': data.name, 43 | 'description': data.description, 44 | 'url': data.html_url, 45 | 'stars': data.stargazers_count, 46 | 'forks': data.forks_count, 47 | 'owner': data.owner.login, 48 | 'ownerUrl': data.owner.html_url 49 | }; 50 | 51 | repos.push(repo); 52 | reposProcessed++; 53 | 54 | if (reposProcessed === repoNames.length) { 55 | deferred.resolve(repos); 56 | } 57 | 58 | }, function(error) { 59 | reposProcessed++; 60 | console.log('Error getting repo info: ', error); 61 | 62 | if (reposProcessed === repoNames.length - 1) { 63 | deferred.resolve(repos); 64 | } 65 | }); 66 | } 67 | 68 | return deferred.promise; 69 | }; 70 | 71 | } 72 | })(); 73 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repo-report", 3 | "version": "1.0.0", 4 | "dependencies": { 5 | "microsoft.office.js": "*", 6 | "jquery": "~1.9.1", 7 | "angular": "~1.4.4", 8 | "angular-route": "~1.4.4", 9 | "angular-sanitize": "~1.4.4" 10 | } 11 | } -------------------------------------------------------------------------------- /content/Office.css: -------------------------------------------------------------------------------- 1 | /*****************************************************************/ 2 | /********************** Office CSS library ***********************/ 3 | /********************** Version: 1.0.2.0 *************************/ 4 | /*****************************************************************/ 5 | 6 | /****************************************************************** 7 | Base 8 | ******************************************************************/ 9 | body { 10 | margin: 0; 11 | padding: 0; 12 | border: 0; 13 | height: 100%; 14 | max-height: 100%; 15 | } 16 | 17 | /****************************************************************** 18 | Typography 19 | ******************************************************************/ 20 | body { 21 | font-family: "Segoe WP", "Segoe UI", "Arial", sans-serif; 22 | font-size: 12px; 23 | color: #262626; 24 | } 25 | 26 | h1 { 27 | font-family: "Segoe WP Light", "Segoe UI", "Arial", sans-serif; 28 | font-size: 22px; 29 | line-height: 26px; 30 | font-weight: 500; 31 | } 32 | 33 | h2, h3, h4, h5, h6, th { 34 | font-family: "Segoe WP Semibold", "Segoe UI", "Arial", sans-serif; 35 | } 36 | 37 | h2 { 38 | font-size: 18px; 39 | line-height: 22px; 40 | font-weight: 600; 41 | } 42 | 43 | h3, h4, h5, h6 { 44 | font-size: 13px; 45 | line-height: 16px; 46 | } 47 | 48 | h3 { 49 | font-weight: 600; 50 | } 51 | 52 | h4, h5, h6 { 53 | font-weight: normal; 54 | } 55 | 56 | form, input, select, button, textarea { 57 | font-family: "Segoe WP", "Segoe UI", "Arial", sans-serif; 58 | font-size: 12px; 59 | line-height: 16px; 60 | } 61 | 62 | /****************************************************************** 63 | General 64 | ******************************************************************/ 65 | a { 66 | color: #336699; 67 | text-decoration: none; 68 | } 69 | 70 | a:focus, a:hover, a:active { 71 | text-decoration: underline; 72 | } 73 | 74 | ul { 75 | margin-left: 1.4em; 76 | padding: 0; 77 | } 78 | 79 | hr { 80 | border: none; 81 | height: 1px; 82 | color: #ebebeb; 83 | background-color: #ebebeb; 84 | clear: both; 85 | } 86 | 87 | img { 88 | border: none; 89 | } 90 | 91 | blockquote { 92 | margin-left: 1.4em; 93 | } 94 | 95 | /****************************************************************** 96 | Forms 97 | ******************************************************************/ 98 | form { 99 | clear: both; 100 | } 101 | 102 | label { 103 | margin-right: 3px; 104 | } 105 | 106 | input, textarea, select, button { 107 | margin: 0 0 5px 0; 108 | padding: 3px; 109 | -webkit-box-sizing: border-box; 110 | -moz-box-sizing: border-box; 111 | box-sizing: border-box; 112 | } 113 | 114 | input[type="checkbox"], input[type="radio"] { 115 | margin-right: 4px; 116 | } 117 | 118 | input[type="checkbox"], input[type="radio"], 119 | input[type="file"], input[type="image"] { 120 | padding: 0; 121 | } 122 | 123 | button, textarea, select, 124 | input:not([type]), 125 | input[type="button"], 126 | input[type="color"], 127 | input[type="date"], 128 | input[type="datetime"], 129 | input[type="datetime-local"], 130 | input[type="email"], 131 | input[type="month"], 132 | input[type="number"], 133 | input[type="password"], 134 | input[type="reset"], 135 | input[type="search"], 136 | input[type="submit"], 137 | input[type="tel"], 138 | input[type="text"], 139 | input[type="time"], 140 | input[type="url"], 141 | input[type="week"] { 142 | border: 1px solid #cccccc; 143 | background-color: white; 144 | } 145 | 146 | button, input[type="button"], 147 | input[type="submit"], input[type="reset"] { 148 | padding-left: 10px; 149 | padding-right: 10px; 150 | text-align: center; 151 | } 152 | 153 | button:hover:enabled, 154 | input[type="button"]:hover:enabled, 155 | input[type="submit"]:hover:enabled, 156 | input[type="reset"]:hover:enabled { 157 | border-color: #7eB4ea; 158 | background-color: #e5f1fc; 159 | } 160 | 161 | button:active:enabled, 162 | input[type="button"]:active:enabled, 163 | input[type="submit"]:active:enabled, 164 | input[type="reset"]:active:enabled { 165 | border-color: #569de5; 166 | background-color: #cee5fc; 167 | } 168 | 169 | /****************************************************************** 170 | Scrollbars 171 | ******************************************************************/ 172 | body { 173 | scrollbar-base-color: white; 174 | scrollbar-arrow-color: #ababab; 175 | scrollbar-highlight-color: #ababab; 176 | scrollbar-darkshadow-color: white; 177 | scrollbar-track-color: white; 178 | scrollbar-face-color: white; 179 | } 180 | -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | 'use script'; 2 | 3 | var gulp = require('gulp'); 4 | var webserver = require('gulp-webserver'); 5 | 6 | gulp.task('serve-static', function(){ 7 | gulp.src('.') 8 | .pipe(webserver({ 9 | https: true, 10 | port: '8443', 11 | host: 'localhost', 12 | directoryListing: true, 13 | fallback: 'index.html' 14 | })); 15 | }); 16 | -------------------------------------------------------------------------------- /jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES5", 4 | "module": "commonjs" 5 | } 6 | } -------------------------------------------------------------------------------- /manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0127a87f-ebef-4732-885c-7e4d4e59ccb2 4 | 1.0.0.0 5 | OfficeDev 6 | en-US 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 250 25 | 26 |
27 |
28 | ReadWriteItem 29 | 30 | 34 | 35 | false 36 |
-------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name":"repo-report", 3 | "license": "MIT", 4 | "version": "1.0.0", 5 | "scripts": { 6 | "postinstall": "bower install" 7 | }, 8 | "devDependencies": { 9 | "gulp": "^3.9.0", 10 | "gulp-webserver": "^0.9.1" 11 | }, 12 | "repository" : { 13 | "type" : "git", 14 | "url" : "https://github.com/OfficeDev/Outlook-Add-in-Repo-Report.git" 15 | } 16 | } -------------------------------------------------------------------------------- /repo report screenshot.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/Outlook-Add-in-RepoReport/f520ffc96760641c42cd730afc73e1a2bc90f329/repo report screenshot.PNG -------------------------------------------------------------------------------- /scripts/jquery.fabric.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE in the project root for license information. 2 | 3 | /** 4 | * Command Bar Plugin 5 | */ 6 | 7 | (function ($) { 8 | $.fn.CommandBar = function () { 9 | 10 | var createMenuItem = function(text, icon, link) { 11 | var item = '
  • '; 12 | item += text; 13 | item += '
  • '; 14 | 15 | return item; 16 | } 17 | 18 | var saveCommands = function($commands, $commandWidth, $commandarea) { 19 | var commands = []; 20 | $commands.each(function(index) { 21 | var $Item = $(this); 22 | var $rightOffset = ($Item.offset().left + $Item.outerWidth() + $commandWidth + 10) - $commandarea.offset().left; // Added padding of 10 23 | commands.push({ jquery: $Item, rightOffset: $rightOffset}); 24 | }); 25 | return commands; 26 | } 27 | 28 | var processCommands = function(commands, width) { 29 | var overFlowCommands = []; 30 | 31 | for(var i=0; i < commands.length; i++) { 32 | var $Item = commands[i].jquery; 33 | var rightOffset = commands[i].rightOffset; 34 | 35 | // If the command is outside the right boundaries add to overflow items 36 | if(!$Item.hasClass('ms-CommandBarItem-overflow')) { 37 | if(rightOffset > width) { 38 | overFlowCommands.push($Item); 39 | } else { 40 | // Make sure item is displayed 41 | $Item.removeClass('hideCommand'); 42 | } 43 | } 44 | } 45 | return overFlowCommands; 46 | } 47 | 48 | var processOverflow = function(overFlowCommands, $oCommand, $menu) { 49 | var overflowStrings = ''; 50 | 51 | if(overFlowCommands.length > 0) { 52 | $oCommand.addClass("is-visible"); 53 | // Empty menu 54 | $menu.html(''); 55 | 56 | // Add overflowed commands to ContextualMenu 57 | 58 | for(i = 0; i < overFlowCommands.length; i++) { 59 | var $Item = $(overFlowCommands[i]); 60 | // Hide Element in CommandBar 61 | $Item.addClass('is-hidden'); 62 | var commandBarItemText = $Item.find('.ms-CommandBarItem-commandText').text(); 63 | overflowStrings += createMenuItem(commandBarItemText); 64 | } 65 | $menu.html(overflowStrings); 66 | } else { 67 | $oCommand.removeClass("is-visible"); 68 | } 69 | } 70 | 71 | /** Go through each CommandBar we've been given. */ 72 | return this.each(function () { 73 | var $CommandBar = $(this); 74 | var $CommandMainArea = $CommandBar.find('.ms-CommandBar-mainArea'); 75 | var $CommandBarItems = $CommandMainArea.find('.ms-CommandBarItem'); 76 | var $OverflowCommand = $CommandBar.find('.ms-CommandBarItem-overflow'); 77 | var $OverflowCommandWidth = $CommandBar.find('.ms-CommandBarItem-overflow').outerWidth(); 78 | var $OverflowMenu = $CommandBar.find('.ms-CommandBar-overflowMenu'); 79 | var $SearchBox = $CommandBar.find('.ms-CommandBarSearch'); 80 | var mobileSwitch = false; 81 | var overFlowCommands; 82 | var allCommands; 83 | 84 | // Go through process and save commands 85 | allCommands = saveCommands($CommandBarItems, $OverflowCommandWidth, $CommandMainArea); 86 | 87 | // Initiate process commands and add commands to overflow on load 88 | overFlowCommands = processCommands(allCommands, $CommandMainArea.innerWidth()); 89 | processOverflow(overFlowCommands, $OverflowCommand, $OverflowMenu); 90 | 91 | // Add resize event handler on commandBar 92 | $(window).resize(function() { 93 | var overFlowCommands; 94 | overFlowCommands = processCommands(allCommands, $CommandMainArea.innerWidth()); 95 | processOverflow(overFlowCommands, $OverflowCommand, $OverflowMenu); 96 | 97 | if($(window).width() < 640 && mobileSwitch == false) { 98 | allCommands = saveCommands($CommandBarItems, $OverflowCommandWidth, $CommandMainArea); 99 | mobileSwitch = true; 100 | } else if($(window).width() > 639 && mobileSwitch == true) { 101 | allCommands = saveCommands($CommandBarItems, $OverflowCommandWidth, $CommandMainArea); 102 | mobileSwitch = false; 103 | } 104 | }); 105 | 106 | // Hook up contextual menu 107 | $OverflowCommand.click(function() { 108 | $OverflowMenu.toggleClass('is-open'); 109 | }); 110 | 111 | $SearchBox.find('.ms-CommandBarSearch-input').click(function() { 112 | $(this).closest('.ms-CommandBarSearch').addClass('ms-CommandBarSearch--active'); 113 | }); 114 | 115 | $SearchBox.keypress(function() { 116 | //Get Search Field 117 | var $input = $(this).find('.ms-CommandBarSearch-input'); 118 | 119 | if($input.val()) { 120 | $(this).addClass('ms-CommandBarSearch--hasText'); 121 | } else { 122 | $(this).removeClass('ms-CommandBarSearch--hasText'); 123 | } 124 | }); 125 | 126 | $SearchBox.find('.ms-CommandBarSearch-iconClearWrapper').click(function() { 127 | var $input = $(this).parent().find('.ms-CommandBarSearch-input'); 128 | $input.val(''); 129 | $input.parent().removeClass('ms-CommandBarSearch--hasText ms-CommandBarSearch--active'); 130 | }); 131 | 132 | }); 133 | }; 134 | })(jQuery); 135 | // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE in the project root for license information. 136 | 137 | /** 138 | * Contextual Menu Plugin 139 | */ 140 | (function ($) { 141 | $.fn.ContextualMenu = function () { 142 | 143 | /** Go through each nav bar we've been given. */ 144 | return this.each(function () { 145 | 146 | var $contextualMenu = $(this); 147 | 148 | 149 | // Set selected states. 150 | $contextualMenu.on('click', '.ms-ContextualMenu-link:not(.is-disabled)', function(event) { 151 | event.preventDefault(); 152 | 153 | // Check if multiselect - set selected states 154 | if ( $contextualMenu.hasClass('ms-ContextualMenu--multiselect') ) { 155 | 156 | // If already selected, remove selection; if not, add selection 157 | if ( $(this).hasClass('is-selected') ) { 158 | $(this).removeClass('is-selected'); 159 | } 160 | else { 161 | $(this).addClass('is-selected'); 162 | } 163 | 164 | } 165 | // All other contextual menu variants 166 | else { 167 | 168 | // Deselect all of the items and close any menus. 169 | $('.ms-ContextualMenu-link') 170 | .removeClass('is-selected') 171 | .siblings('.ms-ContextualMenu') 172 | .removeClass('is-open'); 173 | 174 | // Select this item. 175 | $(this).addClass('is-selected'); 176 | 177 | // If this item has a menu, open it. 178 | if ($(this).hasClass('ms-ContextualMenu-link--hasMenu')) { 179 | $(this).siblings('.ms-ContextualMenu:first').addClass('is-open'); 180 | 181 | // Open the menu without bubbling up the click event, 182 | // which can cause the menu to close. 183 | event.stopPropagation(); 184 | } 185 | 186 | } 187 | 188 | 189 | }); 190 | 191 | }); 192 | }; 193 | })(jQuery); 194 | 195 | // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE in the project root for license information. 196 | 197 | !function(a){"function"==typeof define&&define.amd?define("picker",["jquery"],a):"object"==typeof exports?module.exports=a(require("jquery")):this.Picker=a(jQuery)}(function(a){function b(f,g,h,k){function l(){return b._.node("div",b._.node("div",b._.node("div",b._.node("div",w.component.nodes(r.open),t.box),t.wrap),t.frame),t.holder)}function m(){u.data(g,w).addClass(t.input).val(u.data("value")?w.get("select",s.format):f.value).on("focus."+r.id+" click."+r.id,p),s.editable||u.on("keydown."+r.id,function(a){var b=a.keyCode,c=/^(8|46)$/.test(b);return 27==b?(w.close(),!1):void((32==b||c||!r.open&&w.component.key[b])&&(a.preventDefault(),a.stopPropagation(),c?w.clear().close():w.open()))}),e(f,{haspopup:!0,expanded:!1,readonly:!1,owns:f.id+"_root"+(w._hidden?" "+w._hidden.id:"")})}function n(){w.$root.on({focusin:function(a){w.$root.removeClass(t.focused),a.stopPropagation()},"mousedown click":function(b){var c=b.target;c!=w.$root.children()[0]&&(b.stopPropagation(),"mousedown"!=b.type||a(c).is(":input")||"OPTION"==c.nodeName||(b.preventDefault(),f.focus()))}}).on("click","[data-pick], [data-nav], [data-clear], [data-close]",function(){var b=a(this),c=b.data(),d=b.hasClass(t.navDisabled)||b.hasClass(t.disabled),e=document.activeElement;e=e&&(e.type||e.href)&&e,(d||e&&!a.contains(w.$root[0],e))&&f.focus(),!d&&c.nav?w.set("highlight",w.component.item.highlight,{nav:c.nav}):!d&&"pick"in c?w.set("select",c.pick).close(!0):c.clear?w.clear().close(!0):c.close&&w.close(!0)}),e(w.$root[0],"hidden",!0)}function o(){var b;s.hiddenName===!0?(b=f.name,f.name=""):(b=["string"==typeof s.hiddenPrefix?s.hiddenPrefix:"","string"==typeof s.hiddenSuffix?s.hiddenSuffix:"_submit"],b=b[0]+f.name+b[1]),w._hidden=a('")[0],u.on("change."+r.id,function(){w._hidden.value=f.value?w.get("select",s.formatSubmit):""}).after(w._hidden)}function p(a){a.stopPropagation(),"focus"==a.type&&w.$root.addClass(t.focused),w.open()}if(!f)return b;var q=!1,r={id:f.id||"P"+Math.abs(~~(Math.random()*new Date))},s=h?a.extend(!0,{},h.defaults,k):k||{},t=a.extend({},b.klasses(),s.klass),u=a(f),v=function(){return this.start()},w=v.prototype={constructor:v,$node:u,start:function(){return r&&r.start?w:(r.methods={},r.start=!0,r.open=!1,r.type=f.type,f.autofocus=f==document.activeElement,f.readOnly=!s.editable,f.id=f.id||r.id,"text"!=f.type&&(f.type="text"),w.component=new h(w,s),w.$root=a(b._.node("div",l(),t.picker,'id="'+f.id+'_root"')),n(),s.formatSubmit&&o(),m(),s.container?a(s.container).append(w.$root):u.after(w.$root),w.on({start:w.component.onStart,render:w.component.onRender,stop:w.component.onStop,open:w.component.onOpen,close:w.component.onClose,set:w.component.onSet}).on({start:s.onStart,render:s.onRender,stop:s.onStop,open:s.onOpen,close:s.onClose,set:s.onSet}),q=c(w.$root.children()[0]),f.autofocus&&w.open(),w.trigger("start").trigger("render"))},render:function(a){return a?w.$root.html(l()):w.$root.find("."+t.box).html(w.component.nodes(r.open)),w.trigger("render")},stop:function(){return r.start?(w.close(),w._hidden&&w._hidden.parentNode.removeChild(w._hidden),w.$root.remove(),u.removeClass(t.input).removeData(g),setTimeout(function(){u.off("."+r.id)},0),f.type=r.type,f.readOnly=!1,w.trigger("stop"),r.methods={},r.start=!1,w):w},open:function(c){return r.open?w:(u.addClass(t.active),e(f,"expanded",!0),setTimeout(function(){w.$root.addClass(t.opened),e(w.$root[0],"hidden",!1)},0),c!==!1&&(r.open=!0,q&&j.css("overflow","hidden").css("padding-right","+="+d()),u.trigger("focus"),i.on("click."+r.id+" focusin."+r.id,function(a){var b=a.target;b!=f&&b!=document&&3!=a.which&&w.close(b===w.$root.children()[0])}).on("keydown."+r.id,function(c){var d=c.keyCode,e=w.component.key[d],g=c.target;27==d?w.close(!0):g!=f||!e&&13!=d?a.contains(w.$root[0],g)&&13==d&&(c.preventDefault(),g.click()):(c.preventDefault(),e?b._.trigger(w.component.key.go,w,[b._.trigger(e)]):w.$root.find("."+t.highlighted).hasClass(t.disabled)||w.set("select",w.component.item.highlight).close())})),w.trigger("open"))},close:function(a){return a&&(u.off("focus."+r.id).trigger("focus"),setTimeout(function(){u.on("focus."+r.id,p)},0)),u.removeClass(t.active),e(f,"expanded",!1),setTimeout(function(){w.$root.removeClass(t.opened+" "+t.focused),e(w.$root[0],"hidden",!0)},0),r.open?(r.open=!1,q&&j.css("overflow","").css("padding-right","-="+d()),i.off("."+r.id),w.trigger("close")):w},clear:function(a){return w.set("clear",null,a)},set:function(b,c,d){var e,f,g=a.isPlainObject(b),h=g?b:{};if(d=g&&a.isPlainObject(c)?c:d||{},b){g||(h[b]=c);for(e in h)f=h[e],e in w.component.item&&(void 0===f&&(f=null),w.component.set(e,f,d)),("select"==e||"clear"==e)&&u.val("clear"==e?"":w.get(e,s.format)).trigger("change");w.render()}return d.muted?w:w.trigger("set",h)},get:function(a,c){if(a=a||"value",null!=r[a])return r[a];if("value"==a)return f.value;if(a in w.component.item){if("string"==typeof c){var d=w.component.get(a);return d?b._.trigger(w.component.formats.toString,w.component,[c,d]):""}return w.component.get(a)}},on:function(b,c,d){var e,f,g=a.isPlainObject(b),h=g?b:{};if(b){g||(h[b]=c);for(e in h)f=h[e],d&&(e="_"+e),r.methods[e]=r.methods[e]||[],r.methods[e].push(f)}return w},off:function(){var a,b,c=arguments;for(a=0,namesCount=c.length;namesCount>a;a+=1)b=c[a],b in r.methods&&delete r.methods[b];return w},trigger:function(a,c){var d=function(a){var d=r.methods[a];d&&d.map(function(a){b._.trigger(a,w,[c])})};return d("_"+a),d(a),w}};return new v}function c(a){var b,c="position";return a.currentStyle?b=a.currentStyle[c]:window.getComputedStyle&&(b=getComputedStyle(a)[c]),"fixed"==b}function d(){if(j.height()<=h.height())return 0;var b=a('
    ').appendTo("body"),c=b[0].offsetWidth;b.css("overflow","scroll");var d=a('
    ').appendTo(b),e=d[0].offsetWidth;return b.remove(),c-e}function e(b,c,d){if(a.isPlainObject(c))for(var e in c)f(b,e,c[e]);else f(b,c,d)}function f(a,b,c){a.setAttribute(("role"==b?"":"aria-")+b,c)}function g(b,c){a.isPlainObject(b)||(b={attribute:c}),c="";for(var d in b){var e=("role"==d?"":"aria-")+d,f=b[d];c+=null==f?"":e+'="'+b[d]+'"'}return c}var h=a(window),i=a(document),j=a(document.documentElement);return b.klasses=function(a){return a=a||"picker",{picker:a,opened:a+"--opened",focused:a+"--focused",input:a+"__input",active:a+"__input--active",holder:a+"__holder",frame:a+"__frame",wrap:a+"__wrap",box:a+"__box"}},b._={group:function(a){for(var c,d="",e=b._.trigger(a.min,a);e<=b._.trigger(a.max,a,[e]);e+=a.i)c=b._.trigger(a.item,a,[e]),d+=b._.node(a.node,c[0],c[1],c[2]);return d},node:function(b,c,d,e){return c?(c=a.isArray(c)?c.join(""):c,d=d?' class="'+d+'"':"",e=e?" "+e:"","<"+b+d+e+">"+c+""):""},lead:function(a){return(10>a?"0":"")+a},trigger:function(a,b,c){return"function"==typeof a?a.apply(b,c||[]):a},digits:function(a){return/\d/.test(a[1])?2:1},isDate:function(a){return{}.toString.call(a).indexOf("Date")>-1&&this.isInteger(a.getUTCDate())},isInteger:function(a){return{}.toString.call(a).indexOf("Number")>-1&&a%1===0},ariaAttr:g},b.extend=function(c,d){a.fn[c]=function(e,f){var g=this.data(c);return"picker"==e?g:g&&"string"==typeof e?b._.trigger(g[e],g,[f]):this.each(function(){var f=a(this);f.data(c)||new b(this,c,d,e)})},a.fn[c].defaults=d.defaults},b}),function(a){"function"==typeof define&&define.amd?define(["picker","jquery"],a):"object"==typeof exports?module.exports=a(require("./picker.js"),require("jquery")):a(Picker,jQuery)}(function(a,b){function c(a,b){var c=this,d=a.$node[0],e=d.value,f=a.$node.data("value"),g=f||e,h=f?b.formatSubmit:b.format,i=function(){return d.currentStyle?"rtl"==d.currentStyle.direction:"rtl"==getComputedStyle(a.$root[0]).direction};c.settings=b,c.$node=a.$node,c.queue={min:"measure create",max:"measure create",now:"now create",select:"parse create validate",highlight:"parse navigate create validate",view:"parse create validate viewset",disable:"deactivate",enable:"activate"},c.item={},c.item.clear=null,c.item.disable=(b.disable||[]).slice(0),c.item.enable=-function(a){return a[0]===!0?a.shift():-1}(c.item.disable),c.set("min",b.min).set("max",b.max).set("now"),g?c.set("select",g,{format:h}):c.set("select",null).set("highlight",c.item.now),c.key={40:7,38:-7,39:function(){return i()?-1:1},37:function(){return i()?1:-1},go:function(a){var b=c.item.highlight,d=new Date(Date.UTC(b.year,b.month,b.date+a));c.set("highlight",d,{interval:a}),this.render()}},a.on("render",function(){a.$root.find("."+b.klass.selectMonth).on("change",function(){var c=this.value;c&&(a.set("highlight",[a.get("view").year,c,a.get("highlight").date]),a.$root.find("."+b.klass.selectMonth).trigger("focus"))}),a.$root.find("."+b.klass.selectYear).on("change",function(){var c=this.value;c&&(a.set("highlight",[c,a.get("view").month,a.get("highlight").date]),a.$root.find("."+b.klass.selectYear).trigger("focus"))})},1).on("open",function(){var d="";c.disabled(c.get("now"))&&(d=":not(."+b.klass.buttonToday+")"),a.$root.find("button"+d+", select").attr("disabled",!1)},1).on("close",function(){a.$root.find("button, select").attr("disabled",!0)},1)}var d=7,e=6,f=a._;c.prototype.set=function(a,b,c){var d=this,e=d.item;return null===b?("clear"==a&&(a="select"),e[a]=b,d):(e["enable"==a?"disable":"flip"==a?"enable":a]=d.queue[a].split(" ").map(function(e){return b=d[e](a,b,c)}).pop(),"select"==a?d.set("highlight",e.select,c):"highlight"==a?d.set("view",e.highlight,c):a.match(/^(flip|min|max|disable|enable)$/)&&(e.select&&d.disabled(e.select)&&d.set("select",e.select,c),e.highlight&&d.disabled(e.highlight)&&d.set("highlight",e.highlight,c)),d)},c.prototype.get=function(a){return this.item[a]},c.prototype.create=function(a,c,d){var e,g=this;return c=void 0===c?a:c,c==-1/0||1/0==c?e=c:b.isPlainObject(c)&&f.isInteger(c.pick)?c=c.obj:b.isArray(c)?(c=new Date(Date.UTC(c[0],c[1],c[2])),c=f.isDate(c)?c:g.create().obj):c=f.isInteger(c)?g.normalize(new Date(c),d):f.isDate(c)?g.normalize(c,d):g.now(a,c,d),{year:e||c.getUTCFullYear(),month:e||c.getUTCMonth(),date:e||c.getUTCDate(),day:e||c.getUTCDay(),obj:e||c,pick:e||c.getTime()}},c.prototype.createRange=function(a,c){var d=this,e=function(a){return a===!0||b.isArray(a)||f.isDate(a)?d.create(a):a};return f.isInteger(a)||(a=e(a)),f.isInteger(c)||(c=e(c)),f.isInteger(a)&&b.isPlainObject(c)?a=[c.year,c.month,c.date+a]:f.isInteger(c)&&b.isPlainObject(a)&&(c=[a.year,a.month,a.date+c]),{from:e(a),to:e(c)}},c.prototype.withinRange=function(a,b){return a=this.createRange(a.from,a.to),b.pick>=a.from.pick&&b.pick<=a.to.pick},c.prototype.overlapRanges=function(a,b){var c=this;return a=c.createRange(a.from,a.to),b=c.createRange(b.from,b.to),c.withinRange(a,b.from)||c.withinRange(a,b.to)||c.withinRange(b,a.from)||c.withinRange(b,a.to)},c.prototype.now=function(a,b,c){return b=new Date,c&&c.rel&&b.setUTCDate(b.getUTCDate()+c.rel),this.normalize(b,c)},c.prototype.navigate=function(a,c,d){var e,f,g,h,i=b.isArray(c),j=b.isPlainObject(c),k=this.item.view;if(i||j){for(j?(f=c.year,g=c.month,h=c.date):(f=+c[0],g=+c[1],h=+c[2]),d&&d.nav&&k&&k.month!==g&&(f=k.year,g=k.month),e=new Date(Date.UTC(f,g+(d&&d.nav?d.nav:0),1)),f=e.getUTCFullYear(),g=e.getUTCMonth();new Date(Date.UTC(f,g,h)).getUTCMonth()!==g;)h-=1;c=[f,g,h]}return c},c.prototype.normalize=function(a){return a.setUTCHours(0,0,0,0),a},c.prototype.measure=function(a,b){var c=this;return b?"string"==typeof b?b=c.parse(a,b):f.isInteger(b)&&(b=c.now(a,b,{rel:b})):b="min"==a?-1/0:1/0,b},c.prototype.viewset=function(a,b){return this.create([b.year,b.month,1])},c.prototype.validate=function(a,c,d){var e,g,h,i,j=this,k=c,l=d&&d.interval?d.interval:1,m=-1===j.item.enable,n=j.item.min,o=j.item.max,p=m&&j.item.disable.filter(function(a){if(b.isArray(a)){var d=j.create(a).pick;dc.pick&&(g=!0)}return f.isInteger(a)}).length;if((!d||!d.nav)&&(!m&&j.disabled(c)||m&&j.disabled(c)&&(p||e||g)||!m&&(c.pick<=n.pick||c.pick>=o.pick)))for(m&&!p&&(!g&&l>0||!e&&0>l)&&(l*=-1);j.disabled(c)&&(Math.abs(l)>1&&(c.monthk.month)&&(c=k,l=l>0?1:-1),c.pick<=n.pick?(h=!0,l=1,c=j.create([n.year,n.month,n.date+(c.pick===n.pick?0:-1)])):c.pick>=o.pick&&(i=!0,l=-1,c=j.create([o.year,o.month,o.date+(c.pick===o.pick?0:1)])),!h||!i);)c=j.create([c.year,c.month,c.date+l]);return c},c.prototype.disabled=function(a){var c=this,d=c.item.disable.filter(function(d){return f.isInteger(d)?a.day===(c.settings.firstDay?d:d-1)%7:b.isArray(d)||f.isDate(d)?a.pick===c.create(d).pick:b.isPlainObject(d)?c.withinRange(d,a):void 0});return d=d.length&&!d.filter(function(a){return b.isArray(a)&&"inverted"==a[3]||b.isPlainObject(a)&&a.inverted}).length,-1===c.item.enable?!d:d||a.pickc.item.max.pick},c.prototype.parse=function(a,b,c){var d=this,e={};return b&&"string"==typeof b?(c&&c.format||(c=c||{},c.format=d.settings.format),d.formats.toArray(c.format).map(function(a){var c=d.formats[a],g=c?f.trigger(c,d,[b,e]):a.replace(/^!/,"").length;c&&(e[a]=b.substr(0,g)),b=b.substr(g)}),[e.yyyy||e.yy,+(e.mm||e.m)-1,e.dd||e.d]):b},c.prototype.formats=function(){function a(a,b,c){var d=a.match(/\w+/)[0];return c.mm||c.m||(c.m=b.indexOf(d)+1),d.length}function b(a){return a.match(/\w+/)[0].length}return{d:function(a,b){return a?f.digits(a):b.date},dd:function(a,b){return a?2:f.lead(b.date)},ddd:function(a,c){return a?b(a):this.settings.weekdaysShort[c.day]},dddd:function(a,c){return a?b(a):this.settings.weekdaysFull[c.day]},m:function(a,b){return a?f.digits(a):b.month+1},mm:function(a,b){return a?2:f.lead(b.month+1)},mmm:function(b,c){var d=this.settings.monthsShort;return b?a(b,d,c):d[c.month]},mmmm:function(b,c){var d=this.settings.monthsFull;return b?a(b,d,c):d[c.month]},yy:function(a,b){return a?2:(""+b.year).slice(2)},yyyy:function(a,b){return a?4:b.year},toArray:function(a){return a.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g)},toString:function(a,b){var c=this;return c.formats.toArray(a).map(function(a){return f.trigger(c.formats[a],c,[0,b])||a.replace(/^!/,"")}).join("")}}}(),c.prototype.isDateExact=function(a,c){var d=this;return f.isInteger(a)&&f.isInteger(c)||"boolean"==typeof a&&"boolean"==typeof c?a===c:(f.isDate(a)||b.isArray(a))&&(f.isDate(c)||b.isArray(c))?d.create(a).pick===d.create(c).pick:b.isPlainObject(a)&&b.isPlainObject(c)?d.isDateExact(a.from,c.from)&&d.isDateExact(a.to,c.to):!1},c.prototype.isDateOverlap=function(a,c){var d=this,e=d.settings.firstDay?1:0;return f.isInteger(a)&&(f.isDate(c)||b.isArray(c))?(a=a%7+e,a===d.create(c).day+1):f.isInteger(c)&&(f.isDate(a)||b.isArray(a))?(c=c%7+e,c===d.create(a).day+1):b.isPlainObject(a)&&b.isPlainObject(c)?d.overlapRanges(a,c):!1},c.prototype.flipEnable=function(a){var b=this.item;b.enable=a||(-1==b.enable?1:-1)},c.prototype.deactivate=function(a,c){var d=this,e=d.item.disable.slice(0);return"flip"==c?d.flipEnable():c===!1?(d.flipEnable(1),e=[]):c===!0?(d.flipEnable(-1),e=[]):c.map(function(a){for(var c,g=0;gi;i+=1){if(h=e[i],d.isDateExact(h,a)){c=e[i]=null,j=!0;break}if(d.isDateOverlap(h,a)){b.isPlainObject(a)?(a.inverted=!0,c=a):b.isArray(a)?(c=a,c[3]||c.push("inverted")):f.isDate(a)&&(c=[a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate(),"inverted"]);break}}if(c)for(i=0;g>i;i+=1)if(d.isDateExact(e[i],a)){e[i]=null;break}if(j)for(i=0;g>i;i+=1)if(d.isDateOverlap(e[i],a)){e[i]=null;break}c&&e.push(c)}),e.filter(function(a){return null!=a})},c.prototype.nodes=function(a){var b=this,c=b.settings,g=b.item,h=g.now,i=g.select,j=g.highlight,k=g.view,l=g.disable,m=g.min,n=g.max,o=function(a,b){return c.firstDay&&(a.push(a.shift()),b.push(b.shift())),f.node("thead",f.node("tr",f.group({min:0,max:d-1,i:1,node:"th",item:function(d){return[a[d],c.klass.weekdays,'scope=col title="'+b[d]+'"']}})))}((c.showWeekdaysFull?c.weekdaysFull:c.weekdaysShort).slice(0),c.weekdaysFull.slice(0)),p=function(a){return f.node("div"," ",c.klass["nav"+(a?"Next":"Prev")]+(a&&k.year>=n.year&&k.month>=n.month||!a&&k.year<=m.year&&k.month<=m.month?" "+c.klass.navDisabled:""),"data-nav="+(a||-1)+" "+f.ariaAttr({role:"button",components:b.$node[0].id+"_table"})+' title="'+(a?c.labelMonthNext:c.labelMonthPrev)+'"')},q=function(){var d=c.showMonthsShort?c.monthsShort:c.monthsFull;return c.selectMonths?f.node("select",f.group({min:0,max:11,i:1,node:"option",item:function(a){return[d[a],0,"value="+a+(k.month==a?" selected":"")+(k.year==m.year&&an.month?" disabled":"")]}}),c.klass.selectMonth,(a?"":"disabled")+" "+f.ariaAttr({components:b.$node[0].id+"_table"})+' title="'+c.labelMonthSelect+'"'):f.node("div",d[k.month],c.klass.month)},r=function(){var d=k.year,e=c.selectYears===!0?5:~~(c.selectYears/2);if(e){var g=m.year,h=n.year,i=d-e,j=d+e;if(g>i&&(j+=g-i,i=g),j>h){var l=i-g,o=j-h;i-=l>o?o:l,j=h}return f.node("select",f.group({min:i,max:j,i:1,node:"option",item:function(a){return[a,0,"value="+a+(d==a?" selected":"")]}}),c.klass.selectYear,(a?"":"disabled")+" "+f.ariaAttr({components:b.$node[0].id+"_table"})+' title="'+c.labelYearSelect+'"')}return f.node("div",d,c.klass.year)};return f.node("div",(c.selectYears?r()+q():q()+r())+p()+p(1),c.klass.header)+f.node("table",o+f.node("tbody",f.group({min:0,max:e-1,i:1,node:"tr",item:function(a){var e=c.firstDay&&0===b.create([k.year,k.month,1]).day?-7:0;return[f.group({min:d*a-k.day+e+1,max:function(){return this.min+d-1},i:1,node:"td",item:function(a){a=b.create([k.year,k.month,a+(c.firstDay?1:0)]);var d=i&&i.pick==a.pick,e=j&&j.pick==a.pick,g=l&&b.disabled(a)||a.pickn.pick;return[f.node("div",a.date,function(b){return b.push(k.month==a.month?c.klass.infocus:c.klass.outfocus),h.pick==a.pick&&b.push(c.klass.now),d&&b.push(c.klass.selected),e&&b.push(c.klass.highlighted),g&&b.push(c.klass.disabled),b.join(" ")}([c.klass.day]),"data-pick="+a.pick+" "+f.ariaAttr({role:"gridcell",selected:d&&b.$node.val()===f.trigger(b.formats.toString,b,[c.format,a])?!0:null,activedescendant:e?!0:null,disabled:g?!0:null})),"",f.ariaAttr({role:"presentation"})]}})]}})),c.klass.table,'id="'+b.$node[0].id+'_table" '+f.ariaAttr({role:"grid",components:b.$node[0].id,readonly:!0}))+f.node("div",f.node("button",c.today,c.klass.buttonToday,"type=button data-pick="+h.pick+(a&&!b.disabled(h)?"":" disabled")+" "+f.ariaAttr({components:b.$node[0].id}))+f.node("button",c.clear,c.klass.buttonClear,"type=button data-clear=1"+(a?"":" disabled")+" "+f.ariaAttr({components:b.$node[0].id}))+f.node("button",c.close,c.klass.buttonClose,"type=button data-close=true "+(a?"":" disabled")+" "+f.ariaAttr({components:b.$node[0].id})),c.klass.footer)},c.defaults=function(a){return{labelMonthNext:"Next month",labelMonthPrev:"Previous month",labelMonthSelect:"Select a month",labelYearSelect:"Select a year",monthsFull:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdaysFull:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],today:"Today",clear:"Clear",close:"Close",format:"d mmmm, yyyy",klass:{table:a+"table",header:a+"header",navPrev:a+"nav--prev",navNext:a+"nav--next",navDisabled:a+"nav--disabled",month:a+"month",year:a+"year",selectMonth:a+"select--month",selectYear:a+"select--year",weekdays:a+"weekday",day:a+"day",disabled:a+"day--disabled",selected:a+"day--selected",highlighted:a+"day--highlighted",now:a+"day--today",infocus:a+"day--infocus",outfocus:a+"day--outfocus",footer:a+"footer",buttonClear:a+"button--clear",buttonToday:a+"button--today",buttonClose:a+"button--close"}}}(a.klasses().picker+"__"),a.extend("pickadate",c)}),function(a){function b(b){var e=b.find(".ms-DatePicker-monthComponents"),f=b.find(".ms-DatePicker-goToday"),g=(b.find(".ms-DatePicker-dayPicker"),b.find(".ms-DatePicker-monthPicker")),h=b.find(".ms-DatePicker-yearPicker"),i=b.find(".ms-DatePicker-wrap"),j=b.find(".ms-TextField-field").pickadate("picker");e.appendTo(i),f.appendTo(i),g.appendTo(i),h.appendTo(i),d(b),e.on("click",".js-prevMonth",function(a){a.preventDefault();var b=j.get("highlight").month-1;c(j,null,b,null)}),e.on("click",".js-nextMonth",function(a){a.preventDefault();var b=j.get("highlight").month+1;c(j,null,b,null)}),g.on("click",".js-prevYear",function(a){a.preventDefault();var b=j.get("highlight").year-1;c(j,b,null,null)}),g.on("click",".js-nextYear",function(a){a.preventDefault();var b=j.get("highlight").year+1;c(j,b,null,null)}),h.on("click",".js-prevDecade",function(a){a.preventDefault();var b=j.get("highlight").year-10;c(j,b,null,null)}),h.on("click",".js-nextDecade",function(a){a.preventDefault();var b=j.get("highlight").year+10;c(j,b,null,null)}),f.click(function(a){a.preventDefault();var c=new Date;j.set("select",[c.getFullYear(),c.getMonth(),c.getDate()]),b.removeClass("is-pickingMonths").removeClass("is-pickingYears")}),g.on("click",".js-changeDate",function(d){d.preventDefault();var e=a(this).attr("data-year"),f=a(this).attr("data-month"),g=a(this).attr("data-day");c(j,e,f,g),b.hasClass("is-pickingMonths")&&b.removeClass("is-pickingMonths")}),h.on("click",".js-changeDate",function(d){d.preventDefault(),console.log("about to change the year!");var e=a(this).attr("data-year"),f=a(this).attr("data-month"),g=a(this).attr("data-day");c(j,e,f,g),b.hasClass("is-pickingYears")&&b.removeClass("is-pickingYears")}),g.on("click",".js-showDayPicker",function(){b.removeClass("is-pickingMonths"),b.removeClass("is-pickingYears")}),e.on("click",".js-showMonthPicker",function(){b.toggleClass("is-pickingMonths")}),g.on("click",".js-showYearPicker",function(){b.toggleClass("is-pickingYears")})}function c(a,b,c,d){null==b&&(b=a.get("highlight").year),null==c&&(c=a.get("highlight").month),null==d&&(d=a.get("highlight").date),a.set("highlight",[b,c,d])}function d(a){var b=a.find(".ms-DatePicker-monthPicker"),c=a.find(".ms-DatePicker-yearPicker"),d=(a.find(".ms-DatePicker-wrap"),a.find(".ms-TextField-field").pickadate("picker"));b.find(".ms-DatePicker-currentYear").text(d.get("view").year),b.find(".ms-DatePicker-monthOption").removeClass("is-highlighted"),b.find('.ms-DatePicker-monthOption[data-month="'+d.get("highlight").month+'"]').addClass("is-highlighted"),c.find(".ms-DatePicker-currentDecade").remove(),c.find(".ms-DatePicker-optionGrid").remove();var e=d.get("highlight").year-11,f=e+" - "+(e+11),g='
    '+f+"
    ";for(g+='
    ',year=e;e+12>year;year++)g+=''+year+"";g+="
    ",c.append(g),c.find(".ms-DatePicker-yearOption").removeClass("is-highlighted"),c.find('.ms-DatePicker-yearOption[data-year="'+d.get("highlight").year+'"]').addClass("is-highlighted")}function e(b){a("html, body").animate({scrollTop:b.offset().top},367)}a.fn.DatePicker=function(){return this.each(function(){var c=a(this),f=c.find(".ms-TextField-field").pickadate({weekdaysShort:["S","M","T","W","T","F","S"],today:"",clear:"",close:"",onStart:function(){b(c)},klass:{input:"ms-DatePicker-input",active:"ms-DatePicker-input--active",picker:"ms-DatePicker-picker",opened:"ms-DatePicker-picker--opened",focused:"ms-DatePicker-picker--focused",holder:"ms-DatePicker-holder",frame:"ms-DatePicker-frame",wrap:"ms-DatePicker-wrap",box:"ms-DatePicker-dayPicker",header:"ms-DatePicker-header",month:"ms-DatePicker-month",year:"ms-DatePicker-year",table:"ms-DatePicker-table",weekdays:"ms-DatePicker-weekday",day:"ms-DatePicker-day",disabled:"ms-DatePicker-day--disabled",selected:"ms-DatePicker-day--selected",highlighted:"ms-DatePicker-day--highlighted",now:"ms-DatePicker-day--today",infocus:"ms-DatePicker-day--infocus",outfocus:"ms-DatePicker-day--outfocus"}}),g=f.pickadate("picker");g.on({render:function(){d(c)},open:function(){e(c)}})})}}(jQuery); 198 | 199 | // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE in the project root for license information. 200 | 201 | /** 202 | * Dropdown Plugin 203 | * 204 | * Given .ms-Dropdown containers with generic ")[0],P.on("change."+g.id,function(){C._hidden.value=a.value?C.get("select",y.formatSubmit):""}).after(C._hidden)}function p(e){e.stopPropagation(),"focus"==e.type&&C.$root.addClass(k.focused),C.open()}if(!a)return t;var v=!1,g={id:a.id||"P"+Math.abs(~~(Math.random()*new Date))},y=r?e.extend(!0,{},r.defaults,d):d||{},k=e.extend({},t.klasses(),y.klass),P=e(a),b=function(){return this.start()},C=b.prototype={constructor:b,$node:P,start:function(){return g&&g.start?C:(g.methods={},g.start=!0,g.open=!1,g.type=a.type,a.autofocus=a==document.activeElement,a.readOnly=!y.editable,a.id=a.id||g.id,"text"!=a.type&&(a.type="text"),C.component=new r(C,y),C.$root=e(t._.node("div",u(),k.picker,'id="'+a.id+'_root"')),h(),y.formatSubmit&&f(),m(),y.container?e(y.container).append(C.$root):P.after(C.$root),C.on({start:C.component.onStart,render:C.component.onRender,stop:C.component.onStop,open:C.component.onOpen,close:C.component.onClose,set:C.component.onSet}).on({start:y.onStart,render:y.onRender,stop:y.onStop,open:y.onOpen,close:y.onClose,set:y.onSet}),v=n(C.$root.children()[0]),a.autofocus&&C.open(),C.trigger("start").trigger("render"))},render:function(e){return e?C.$root.html(u()):C.$root.find("."+k.box).html(C.component.nodes(g.open)),C.trigger("render")},stop:function(){return g.start?(C.close(),C._hidden&&C._hidden.parentNode.removeChild(C._hidden),C.$root.remove(),P.removeClass(k.input).removeData(o),setTimeout(function(){P.off("."+g.id)},0),a.type=g.type,a.readOnly=!1,C.trigger("stop"),g.methods={},g.start=!1,C):C},open:function(n){return g.open?C:(P.addClass(k.active),s(a,"expanded",!0),setTimeout(function(){C.$root.addClass(k.opened),s(C.$root[0],"hidden",!1)},0),n!==!1&&(g.open=!0,v&&c.css("overflow","hidden").css("padding-right","+="+i()),P.trigger("focus"),l.on("click."+g.id+" focusin."+g.id,function(e){var t=e.target;t!=a&&t!=document&&3!=e.which&&C.close(t===C.$root.children()[0])}).on("keydown."+g.id,function(n){var i=n.keyCode,s=C.component.key[i],o=n.target;27==i?C.close(!0):o!=a||!s&&13!=i?e.contains(C.$root[0],o)&&13==i&&(n.preventDefault(),o.click()):(n.preventDefault(),s?t._.trigger(C.component.key.go,C,[t._.trigger(s)]):C.$root.find("."+k.highlighted).hasClass(k.disabled)||C.set("select",C.component.item.highlight).close())})),C.trigger("open"))},close:function(e){return e&&(P.off("focus."+g.id).trigger("focus"),setTimeout(function(){P.on("focus."+g.id,p)},0)),P.removeClass(k.active),s(a,"expanded",!1),setTimeout(function(){C.$root.removeClass(k.opened+" "+k.focused),s(C.$root[0],"hidden",!0)},0),g.open?(g.open=!1,v&&c.css("overflow","").css("padding-right","-="+i()),l.off("."+g.id),C.trigger("close")):C},clear:function(e){return C.set("clear",null,e)},set:function(t,n,i){var s,a,o=e.isPlainObject(t),r=o?t:{};if(i=o&&e.isPlainObject(n)?n:i||{},t){o||(r[t]=n);for(s in r)a=r[s],s in C.component.item&&(void 0===a&&(a=null),C.component.set(s,a,i)),("select"==s||"clear"==s)&&P.val("clear"==s?"":C.get(s,y.format)).trigger("change");C.render()}return i.muted?C:C.trigger("set",r)},get:function(e,n){if(e=e||"value",null!=g[e])return g[e];if("value"==e)return a.value;if(e in C.component.item){if("string"==typeof n){var i=C.component.get(e);return i?t._.trigger(C.component.formats.toString,C.component,[n,i]):""}return C.component.get(e)}},on:function(t,n,i){var s,a,o=e.isPlainObject(t),r=o?t:{};if(t){o||(r[t]=n);for(s in r)a=r[s],i&&(s="_"+s),g.methods[s]=g.methods[s]||[],g.methods[s].push(a)}return C},off:function(){var e,t,n=arguments;for(e=0,namesCount=n.length;namesCount>e;e+=1)t=n[e],t in g.methods&&delete g.methods[t];return C},trigger:function(e,n){var i=function(e){var i=g.methods[e];i&&i.map(function(e){t._.trigger(e,C,[n])})};return i("_"+e),i(e),C}};return new b}function n(e){var t,n="position";return e.currentStyle?t=e.currentStyle[n]:window.getComputedStyle&&(t=getComputedStyle(e)[n]),"fixed"==t}function i(){if(c.height()<=r.height())return 0;var t=e('
    ').appendTo("body"),n=t[0].offsetWidth;t.css("overflow","scroll");var i=e('
    ').appendTo(t),s=i[0].offsetWidth;return t.remove(),n-s}function s(t,n,i){if(e.isPlainObject(n))for(var s in n)a(t,s,n[s]);else a(t,n,i)}function a(e,t,n){e.setAttribute(("role"==t?"":"aria-")+t,n)}function o(t,n){e.isPlainObject(t)||(t={attribute:n}),n="";for(var i in t){var s=("role"==i?"":"aria-")+i,a=t[i];n+=null==a?"":s+'="'+t[i]+'"'}return n}var r=e(window),l=e(document),c=e(document.documentElement);return t.klasses=function(e){return e=e||"picker",{picker:e,opened:e+"--opened",focused:e+"--focused",input:e+"__input",active:e+"__input--active",holder:e+"__holder",frame:e+"__frame",wrap:e+"__wrap",box:e+"__box"}},t._={group:function(e){for(var n,i="",s=t._.trigger(e.min,e);s<=t._.trigger(e.max,e,[s]);s+=e.i)n=t._.trigger(e.item,e,[s]),i+=t._.node(e.node,n[0],n[1],n[2]);return i},node:function(t,n,i,s){return n?(n=e.isArray(n)?n.join(""):n,i=i?' class="'+i+'"':"",s=s?" "+s:"","<"+t+i+s+">"+n+""):""},lead:function(e){return(10>e?"0":"")+e},trigger:function(e,t,n){return"function"==typeof e?e.apply(t,n||[]):e},digits:function(e){return/\d/.test(e[1])?2:1},isDate:function(e){return{}.toString.call(e).indexOf("Date")>-1&&this.isInteger(e.getUTCDate())},isInteger:function(e){return{}.toString.call(e).indexOf("Number")>-1&&e%1===0},ariaAttr:o},t.extend=function(n,i){e.fn[n]=function(s,a){var o=this.data(n);return"picker"==s?o:o&&"string"==typeof s?t._.trigger(o[s],o,[a]):this.each(function(){var a=e(this);a.data(n)||new t(this,n,i,s)})},e.fn[n].defaults=i.defaults},t}),function(e){"function"==typeof define&&define.amd?define(["picker","jquery"],e):"object"==typeof exports?module.exports=e(require("./picker.js"),require("jquery")):e(Picker,jQuery)}(function(e,t){function n(e,t){var n=this,i=e.$node[0],s=i.value,a=e.$node.data("value"),o=a||s,r=a?t.formatSubmit:t.format,l=function(){return i.currentStyle?"rtl"==i.currentStyle.direction:"rtl"==getComputedStyle(e.$root[0]).direction};n.settings=t,n.$node=e.$node,n.queue={min:"measure create",max:"measure create",now:"now create",select:"parse create validate",highlight:"parse navigate create validate",view:"parse create validate viewset",disable:"deactivate",enable:"activate"},n.item={},n.item.clear=null,n.item.disable=(t.disable||[]).slice(0),n.item.enable=-function(e){return e[0]===!0?e.shift():-1}(n.item.disable),n.set("min",t.min).set("max",t.max).set("now"),o?n.set("select",o,{format:r}):n.set("select",null).set("highlight",n.item.now),n.key={40:7,38:-7,39:function(){return l()?-1:1},37:function(){return l()?1:-1},go:function(e){var t=n.item.highlight,i=new Date(Date.UTC(t.year,t.month,t.date+e));n.set("highlight",i,{interval:e}),this.render()}},e.on("render",function(){e.$root.find("."+t.klass.selectMonth).on("change",function(){var n=this.value;n&&(e.set("highlight",[e.get("view").year,n,e.get("highlight").date]),e.$root.find("."+t.klass.selectMonth).trigger("focus"))}),e.$root.find("."+t.klass.selectYear).on("change",function(){var n=this.value;n&&(e.set("highlight",[n,e.get("view").month,e.get("highlight").date]),e.$root.find("."+t.klass.selectYear).trigger("focus"))})},1).on("open",function(){var i="";n.disabled(n.get("now"))&&(i=":not(."+t.klass.buttonToday+")"),e.$root.find("button"+i+", select").attr("disabled",!1)},1).on("close",function(){e.$root.find("button, select").attr("disabled",!0)},1)}var i=7,s=6,a=e._;n.prototype.set=function(e,t,n){var i=this,s=i.item;return null===t?("clear"==e&&(e="select"),s[e]=t,i):(s["enable"==e?"disable":"flip"==e?"enable":e]=i.queue[e].split(" ").map(function(s){return t=i[s](e,t,n)}).pop(),"select"==e?i.set("highlight",s.select,n):"highlight"==e?i.set("view",s.highlight,n):e.match(/^(flip|min|max|disable|enable)$/)&&(s.select&&i.disabled(s.select)&&i.set("select",s.select,n),s.highlight&&i.disabled(s.highlight)&&i.set("highlight",s.highlight,n)),i)},n.prototype.get=function(e){return this.item[e]},n.prototype.create=function(e,n,i){var s,o=this;return n=void 0===n?e:n,n==-1/0||1/0==n?s=n:t.isPlainObject(n)&&a.isInteger(n.pick)?n=n.obj:t.isArray(n)?(n=new Date(Date.UTC(n[0],n[1],n[2])),n=a.isDate(n)?n:o.create().obj):n=a.isInteger(n)?o.normalize(new Date(n),i):a.isDate(n)?o.normalize(n,i):o.now(e,n,i),{year:s||n.getUTCFullYear(),month:s||n.getUTCMonth(),date:s||n.getUTCDate(),day:s||n.getUTCDay(),obj:s||n,pick:s||n.getTime()}},n.prototype.createRange=function(e,n){var i=this,s=function(e){return e===!0||t.isArray(e)||a.isDate(e)?i.create(e):e};return a.isInteger(e)||(e=s(e)),a.isInteger(n)||(n=s(n)),a.isInteger(e)&&t.isPlainObject(n)?e=[n.year,n.month,n.date+e]:a.isInteger(n)&&t.isPlainObject(e)&&(n=[e.year,e.month,e.date+n]),{from:s(e),to:s(n)}},n.prototype.withinRange=function(e,t){return e=this.createRange(e.from,e.to),t.pick>=e.from.pick&&t.pick<=e.to.pick},n.prototype.overlapRanges=function(e,t){var n=this;return e=n.createRange(e.from,e.to),t=n.createRange(t.from,t.to),n.withinRange(e,t.from)||n.withinRange(e,t.to)||n.withinRange(t,e.from)||n.withinRange(t,e.to)},n.prototype.now=function(e,t,n){return t=new Date,n&&n.rel&&t.setUTCDate(t.getUTCDate()+n.rel),this.normalize(t,n)},n.prototype.navigate=function(e,n,i){var s,a,o,r,l=t.isArray(n),c=t.isPlainObject(n),d=this.item.view;if(l||c){for(c?(a=n.year,o=n.month,r=n.date):(a=+n[0],o=+n[1],r=+n[2]),i&&i.nav&&d&&d.month!==o&&(a=d.year,o=d.month),s=new Date(Date.UTC(a,o+(i&&i.nav?i.nav:0),1)),a=s.getUTCFullYear(),o=s.getUTCMonth();new Date(Date.UTC(a,o,r)).getUTCMonth()!==o;)r-=1;n=[a,o,r]}return n},n.prototype.normalize=function(e){return e.setUTCHours(0,0,0,0),e},n.prototype.measure=function(e,t){var n=this;return t?"string"==typeof t?t=n.parse(e,t):a.isInteger(t)&&(t=n.now(e,t,{rel:t})):t="min"==e?-1/0:1/0,t},n.prototype.viewset=function(e,t){return this.create([t.year,t.month,1])},n.prototype.validate=function(e,n,i){var s,o,r,l,c=this,d=n,u=i&&i.interval?i.interval:1,m=-1===c.item.enable,h=c.item.min,f=c.item.max,p=m&&c.item.disable.filter(function(e){if(t.isArray(e)){var i=c.create(e).pick;in.pick&&(o=!0)}return a.isInteger(e)}).length;if((!i||!i.nav)&&(!m&&c.disabled(n)||m&&c.disabled(n)&&(p||s||o)||!m&&(n.pick<=h.pick||n.pick>=f.pick)))for(m&&!p&&(!o&&u>0||!s&&0>u)&&(u*=-1);c.disabled(n)&&(Math.abs(u)>1&&(n.monthd.month)&&(n=d,u=u>0?1:-1),n.pick<=h.pick?(r=!0,u=1,n=c.create([h.year,h.month,h.date+(n.pick===h.pick?0:-1)])):n.pick>=f.pick&&(l=!0,u=-1,n=c.create([f.year,f.month,f.date+(n.pick===f.pick?0:1)])),!r||!l);)n=c.create([n.year,n.month,n.date+u]);return n},n.prototype.disabled=function(e){var n=this,i=n.item.disable.filter(function(i){return a.isInteger(i)?e.day===(n.settings.firstDay?i:i-1)%7:t.isArray(i)||a.isDate(i)?e.pick===n.create(i).pick:t.isPlainObject(i)?n.withinRange(i,e):void 0});return i=i.length&&!i.filter(function(e){return t.isArray(e)&&"inverted"==e[3]||t.isPlainObject(e)&&e.inverted}).length,-1===n.item.enable?!i:i||e.pickn.item.max.pick},n.prototype.parse=function(e,t,n){var i=this,s={};return t&&"string"==typeof t?(n&&n.format||(n=n||{},n.format=i.settings.format),i.formats.toArray(n.format).map(function(e){var n=i.formats[e],o=n?a.trigger(n,i,[t,s]):e.replace(/^!/,"").length;n&&(s[e]=t.substr(0,o)),t=t.substr(o)}),[s.yyyy||s.yy,+(s.mm||s.m)-1,s.dd||s.d]):t},n.prototype.formats=function(){function e(e,t,n){var i=e.match(/\w+/)[0];return n.mm||n.m||(n.m=t.indexOf(i)+1),i.length}function t(e){return e.match(/\w+/)[0].length}return{d:function(e,t){return e?a.digits(e):t.date},dd:function(e,t){return e?2:a.lead(t.date)},ddd:function(e,n){return e?t(e):this.settings.weekdaysShort[n.day]},dddd:function(e,n){return e?t(e):this.settings.weekdaysFull[n.day]},m:function(e,t){return e?a.digits(e):t.month+1},mm:function(e,t){return e?2:a.lead(t.month+1)},mmm:function(t,n){var i=this.settings.monthsShort;return t?e(t,i,n):i[n.month]},mmmm:function(t,n){var i=this.settings.monthsFull;return t?e(t,i,n):i[n.month]},yy:function(e,t){return e?2:(""+t.year).slice(2)},yyyy:function(e,t){return e?4:t.year},toArray:function(e){return e.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g)},toString:function(e,t){var n=this;return n.formats.toArray(e).map(function(e){return a.trigger(n.formats[e],n,[0,t])||e.replace(/^!/,"")}).join("")}}}(),n.prototype.isDateExact=function(e,n){var i=this;return a.isInteger(e)&&a.isInteger(n)||"boolean"==typeof e&&"boolean"==typeof n?e===n:(a.isDate(e)||t.isArray(e))&&(a.isDate(n)||t.isArray(n))?i.create(e).pick===i.create(n).pick:t.isPlainObject(e)&&t.isPlainObject(n)?i.isDateExact(e.from,n.from)&&i.isDateExact(e.to,n.to):!1},n.prototype.isDateOverlap=function(e,n){var i=this,s=i.settings.firstDay?1:0;return a.isInteger(e)&&(a.isDate(n)||t.isArray(n))?(e=e%7+s,e===i.create(n).day+1):a.isInteger(n)&&(a.isDate(e)||t.isArray(e))?(n=n%7+s,n===i.create(e).day+1):t.isPlainObject(e)&&t.isPlainObject(n)?i.overlapRanges(e,n):!1},n.prototype.flipEnable=function(e){var t=this.item;t.enable=e||(-1==t.enable?1:-1)},n.prototype.deactivate=function(e,n){var i=this,s=i.item.disable.slice(0);return"flip"==n?i.flipEnable():n===!1?(i.flipEnable(1),s=[]):n===!0?(i.flipEnable(-1),s=[]):n.map(function(e){for(var n,o=0;ol;l+=1){if(r=s[l],i.isDateExact(r,e)){n=s[l]=null,c=!0;break}if(i.isDateOverlap(r,e)){t.isPlainObject(e)?(e.inverted=!0,n=e):t.isArray(e)?(n=e,n[3]||n.push("inverted")):a.isDate(e)&&(n=[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),"inverted"]);break}}if(n)for(l=0;o>l;l+=1)if(i.isDateExact(s[l],e)){s[l]=null;break}if(c)for(l=0;o>l;l+=1)if(i.isDateOverlap(s[l],e)){s[l]=null;break}n&&s.push(n)}),s.filter(function(e){return null!=e})},n.prototype.nodes=function(e){var t=this,n=t.settings,o=t.item,r=o.now,l=o.select,c=o.highlight,d=o.view,u=o.disable,m=o.min,h=o.max,f=function(e,t){return n.firstDay&&(e.push(e.shift()),t.push(t.shift())),a.node("thead",a.node("tr",a.group({min:0,max:i-1,i:1,node:"th",item:function(i){return[e[i],n.klass.weekdays,'scope=col title="'+t[i]+'"']}})))}((n.showWeekdaysFull?n.weekdaysFull:n.weekdaysShort).slice(0),n.weekdaysFull.slice(0)),p=function(e){return a.node("div"," ",n.klass["nav"+(e?"Next":"Prev")]+(e&&d.year>=h.year&&d.month>=h.month||!e&&d.year<=m.year&&d.month<=m.month?" "+n.klass.navDisabled:""),"data-nav="+(e||-1)+" "+a.ariaAttr({role:"button",components:t.$node[0].id+"_table"})+' title="'+(e?n.labelMonthNext:n.labelMonthPrev)+'"')},v=function(){var i=n.showMonthsShort?n.monthsShort:n.monthsFull;return n.selectMonths?a.node("select",a.group({min:0,max:11,i:1,node:"option",item:function(e){return[i[e],0,"value="+e+(d.month==e?" selected":"")+(d.year==m.year&&eh.month?" disabled":"")]}}),n.klass.selectMonth,(e?"":"disabled")+" "+a.ariaAttr({components:t.$node[0].id+"_table"})+' title="'+n.labelMonthSelect+'"'):a.node("div",i[d.month],n.klass.month)},g=function(){var i=d.year,s=n.selectYears===!0?5:~~(n.selectYears/2);if(s){var o=m.year,r=h.year,l=i-s,c=i+s;if(o>l&&(c+=o-l,l=o),c>r){var u=l-o,f=c-r;l-=u>f?f:u,c=r}return a.node("select",a.group({min:l,max:c,i:1,node:"option",item:function(e){return[e,0,"value="+e+(i==e?" selected":"")]}}),n.klass.selectYear,(e?"":"disabled")+" "+a.ariaAttr({components:t.$node[0].id+"_table"})+' title="'+n.labelYearSelect+'"')}return a.node("div",i,n.klass.year)};return a.node("div",(n.selectYears?g()+v():v()+g())+p()+p(1),n.klass.header)+a.node("table",f+a.node("tbody",a.group({min:0,max:s-1,i:1,node:"tr",item:function(e){var s=n.firstDay&&0===t.create([d.year,d.month,1]).day?-7:0;return[a.group({min:i*e-d.day+s+1,max:function(){return this.min+i-1},i:1,node:"td",item:function(e){e=t.create([d.year,d.month,e+(n.firstDay?1:0)]);var i=l&&l.pick==e.pick,s=c&&c.pick==e.pick,o=u&&t.disabled(e)||e.pickh.pick;return[a.node("div",e.date,function(t){return t.push(d.month==e.month?n.klass.infocus:n.klass.outfocus),r.pick==e.pick&&t.push(n.klass.now),i&&t.push(n.klass.selected),s&&t.push(n.klass.highlighted),o&&t.push(n.klass.disabled),t.join(" ")}([n.klass.day]),"data-pick="+e.pick+" "+a.ariaAttr({role:"gridcell",selected:i&&t.$node.val()===a.trigger(t.formats.toString,t,[n.format,e])?!0:null,activedescendant:s?!0:null,disabled:o?!0:null})),"",a.ariaAttr({role:"presentation"})]}})]}})),n.klass.table,'id="'+t.$node[0].id+'_table" '+a.ariaAttr({role:"grid",components:t.$node[0].id,readonly:!0}))+a.node("div",a.node("button",n.today,n.klass.buttonToday,"type=button data-pick="+r.pick+(e&&!t.disabled(r)?"":" disabled")+" "+a.ariaAttr({components:t.$node[0].id}))+a.node("button",n.clear,n.klass.buttonClear,"type=button data-clear=1"+(e?"":" disabled")+" "+a.ariaAttr({components:t.$node[0].id}))+a.node("button",n.close,n.klass.buttonClose,"type=button data-close=true "+(e?"":" disabled")+" "+a.ariaAttr({components:t.$node[0].id})),n.klass.footer)},n.defaults=function(e){return{labelMonthNext:"Next month",labelMonthPrev:"Previous month",labelMonthSelect:"Select a month",labelYearSelect:"Select a year",monthsFull:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdaysFull:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],today:"Today",clear:"Clear",close:"Close",format:"d mmmm, yyyy",klass:{table:e+"table",header:e+"header",navPrev:e+"nav--prev",navNext:e+"nav--next",navDisabled:e+"nav--disabled",month:e+"month",year:e+"year",selectMonth:e+"select--month",selectYear:e+"select--year",weekdays:e+"weekday",day:e+"day",disabled:e+"day--disabled",selected:e+"day--selected",highlighted:e+"day--highlighted",now:e+"day--today",infocus:e+"day--infocus",outfocus:e+"day--outfocus",footer:e+"footer",buttonClear:e+"button--clear",buttonToday:e+"button--today",buttonClose:e+"button--close"}}}(e.klasses().picker+"__"),e.extend("pickadate",n)}),function(e){function t(t){var s=t.find(".ms-DatePicker-monthComponents"),a=t.find(".ms-DatePicker-goToday"),o=(t.find(".ms-DatePicker-dayPicker"),t.find(".ms-DatePicker-monthPicker")),r=t.find(".ms-DatePicker-yearPicker"),l=t.find(".ms-DatePicker-wrap"),c=t.find(".ms-TextField-field").pickadate("picker");s.appendTo(l),a.appendTo(l),o.appendTo(l),r.appendTo(l),i(t),s.on("click",".js-prevMonth",function(e){e.preventDefault();var t=c.get("highlight").month-1;n(c,null,t,null)}),s.on("click",".js-nextMonth",function(e){e.preventDefault();var t=c.get("highlight").month+1;n(c,null,t,null)}),o.on("click",".js-prevYear",function(e){e.preventDefault();var t=c.get("highlight").year-1;n(c,t,null,null)}),o.on("click",".js-nextYear",function(e){e.preventDefault();var t=c.get("highlight").year+1;n(c,t,null,null)}),r.on("click",".js-prevDecade",function(e){e.preventDefault();var t=c.get("highlight").year-10;n(c,t,null,null)}),r.on("click",".js-nextDecade",function(e){e.preventDefault();var t=c.get("highlight").year+10;n(c,t,null,null)}),a.click(function(e){e.preventDefault();var n=new Date;c.set("select",[n.getFullYear(),n.getMonth(),n.getDate()]),t.removeClass("is-pickingMonths").removeClass("is-pickingYears")}),o.on("click",".js-changeDate",function(i){i.preventDefault();var s=e(this).attr("data-year"),a=e(this).attr("data-month"),o=e(this).attr("data-day");n(c,s,a,o),t.hasClass("is-pickingMonths")&&t.removeClass("is-pickingMonths")}),r.on("click",".js-changeDate",function(i){i.preventDefault(),console.log("about to change the year!");var s=e(this).attr("data-year"),a=e(this).attr("data-month"),o=e(this).attr("data-day");n(c,s,a,o),t.hasClass("is-pickingYears")&&t.removeClass("is-pickingYears")}),o.on("click",".js-showDayPicker",function(){t.removeClass("is-pickingMonths"),t.removeClass("is-pickingYears")}),s.on("click",".js-showMonthPicker",function(){t.toggleClass("is-pickingMonths")}),o.on("click",".js-showYearPicker",function(){t.toggleClass("is-pickingYears")})}function n(e,t,n,i){null==t&&(t=e.get("highlight").year),null==n&&(n=e.get("highlight").month),null==i&&(i=e.get("highlight").date),e.set("highlight",[t,n,i])}function i(e){var t=e.find(".ms-DatePicker-monthPicker"),n=e.find(".ms-DatePicker-yearPicker"),i=(e.find(".ms-DatePicker-wrap"),e.find(".ms-TextField-field").pickadate("picker"));t.find(".ms-DatePicker-currentYear").text(i.get("view").year),t.find(".ms-DatePicker-monthOption").removeClass("is-highlighted"),t.find('.ms-DatePicker-monthOption[data-month="'+i.get("highlight").month+'"]').addClass("is-highlighted"),n.find(".ms-DatePicker-currentDecade").remove(),n.find(".ms-DatePicker-optionGrid").remove();var s=i.get("highlight").year-11,a=s+" - "+(s+11),o='
    '+a+"
    ";for(o+='
    ',year=s;s+12>year;year++)o+=''+year+"";o+="
    ",n.append(o),n.find(".ms-DatePicker-yearOption").removeClass("is-highlighted"),n.find('.ms-DatePicker-yearOption[data-year="'+i.get("highlight").year+'"]').addClass("is-highlighted")}function s(t){e("html, body").animate({scrollTop:t.offset().top},367)}e.fn.DatePicker=function(){return this.each(function(){var n=e(this),a=n.find(".ms-TextField-field").pickadate({weekdaysShort:["S","M","T","W","T","F","S"],today:"",clear:"",close:"",onStart:function(){t(n)},klass:{input:"ms-DatePicker-input",active:"ms-DatePicker-input--active",picker:"ms-DatePicker-picker",opened:"ms-DatePicker-picker--opened",focused:"ms-DatePicker-picker--focused",holder:"ms-DatePicker-holder",frame:"ms-DatePicker-frame",wrap:"ms-DatePicker-wrap",box:"ms-DatePicker-dayPicker",header:"ms-DatePicker-header",month:"ms-DatePicker-month",year:"ms-DatePicker-year",table:"ms-DatePicker-table",weekdays:"ms-DatePicker-weekday",day:"ms-DatePicker-day",disabled:"ms-DatePicker-day--disabled",selected:"ms-DatePicker-day--selected",highlighted:"ms-DatePicker-day--highlighted",now:"ms-DatePicker-day--today",infocus:"ms-DatePicker-day--infocus",outfocus:"ms-DatePicker-day--outfocus"}}),o=a.pickadate("picker");o.on({render:function(){i(n)},open:function(){s(n)}})})}}(jQuery),function(e){e.fn.Dropdown=function(){return this.each(function(){function t(t){if(!n.hasClass("is-disabled")){n.find(".is-open").removeClass("is-open"),t.stopPropagation();var i=e(this).parents(".ms-Dropdown").width();e(this).next(".ms-Dropdown-items").css("width",i+"px"),n.toggleClass("is-open"),e(document).bind("click.dropdown",function(t){n.removeClass("is-open"),e(document).unbind("click.dropdown")})}}var n=e(this),i=n.children(".ms-Dropdown-select"),s=i.children("option"),a=(this.id,""),o="",r="";s.each(function(e,t){t.selected&&(a=t.text),o+='
  • "+t.text+"
  • "}),r=''+a+'
      '+o+"
    ",n.append(r),n.on("click",".ms-Dropdown-title",function(e){t(e)}),n.on("keyup",function(s){var a=s.keyCode||s.which;if(e(this).hasClass("is-open")){if(e(this).hasClass("is-open")&&(38===a&&e(this).find(".ms-Dropdown-item.is-selected").prev().siblings().size()>0&&e(this).find(".ms-Dropdown-item.is-selected").removeClass("is-selected").prev().addClass("is-selected"),40===a&&e(this).find(".ms-Dropdown-item.is-selected").next().siblings().size()>0&&e(this).find(".ms-Dropdown-item.is-selected").removeClass("is-selected").next().addClass("is-selected"),13===a&&!n.hasClass("is-disabled"))){var o=e(this).find(".ms-Dropdown-item.is-selected").text();e(this).find(".ms-Dropdown-title").html(o),i.find("option").each(function(t,n){n.text===o?e(this).prop("selected",!0):e(this).prop("selected",!1)}),i.change(),e(this).removeClass("is-open")}}else(13===a||38===a||40===a)&&(t(s),e(this).find(".ms-Dropdown-item").hasClass("is-selected")||e(this).find(".ms-Dropdown-item:first").addClass("is-selected"));27===a&&e(this).removeClass("is-open")}),n.on("click",".ms-Dropdown-item",function(){if(!n.hasClass("is-disabled")){e(this).siblings(".ms-Dropdown-item").removeClass("is-selected"),e(this).addClass("is-selected"),e(this).parents().siblings(".ms-Dropdown-title").html(e(this).text());var t=e(this).text();i.find("option").each(function(n,i){i.text===t?e(this).prop("selected",!0):e(this).prop("selected",!1)}),i.change()}})})}}(jQuery),function(e){e.fn.ListItem=function(){return this.each(function(){var t=e(this);t.on("click",".js-toggleSelection",function(t){e(this).parents(".ms-ListItem").toggleClass("is-selected")})})}}(jQuery),function(e){e.fn.NavBar=function(){return this.each(function(){var t=e(this);t.on("click",".js-openMenu",function(e){e.stopPropagation(),t.toggleClass("is-open")}),t.click(function(){t.hasClass("is-open")&&t.removeClass("is-open")}),t.on("click",".ms-NavBar-item:not(.is-disabled)",function(n){n.stopPropagation(),0===e(this).children(".ms-NavBar-link").length&&n.preventDefault(),e(this).siblings(".ms-NavBar-item").removeClass("is-selected"),0===t.find(".ms-NavBar-item.ms-NavBar-item--search .ms-TextField-field").val().length&&e(".ms-NavBar-item.ms-NavBar-item--search").removeClass("is-open").find(".ms-TextField-field").blur(),e(this).hasClass("ms-NavBar-item--hasMenu")?(e(this).children(".ms-ContextualMenu:first").toggleClass("is-open"),e(this).toggleClass("is-selected")):(e(this).addClass("is-selected"),t.removeClass("is-open").find(".ms-ContextualMenu").removeClass("is-open")),e(this).hasClass("ms-NavBar-item--search")&&(e(this).addClass("is-open"),e(this).find(".ms-TextField-field").focus(),t.find(".ms-ContextualMenu:first").removeClass("is-open"))}),t.on("click",".ms-NavBar-item .ms-ContextualMenu",function(n){n.stopPropagation(),e(this).removeClass("is-open"),t.removeClass("is-open").find(".ms-NavBar-item--hasMenu").removeClass("is-selected")}),e(document).on("click","html",function(e){t.find(".ms-NavBar-item").removeClass("is-selected").find(".ms-ContextualMenu").removeClass("is-open"),0===t.find(".ms-NavBar-item.ms-NavBar-item--search .ms-TextField-field").val().length&&t.find(".ms-NavBar-item.ms-NavBar-item--search").removeClass("is-open").find(".ms-TextField-field").blur()})})}}(jQuery),function(e){e.fn.Panel=function(){return this.each(function(){var t=e(this),n=t.find(".ms-Panel-main");e(".js-togglePanel").on("click",function(){n.css({display:"block"}),t.toggleClass("is-open")}),n.on("animationend webkitAnimationEnd MSAnimationEnd",function(t){"fadeOut"===t.originalEvent.animationName&&e(this).css({display:"none"})})})}}(jQuery),function(e){function t(e){var t=e.find(".ms-PeoplePicker-searchBox"),n=t.position().left,i=t.outerWidth(),s=n+i,a=t.find(".ms-PeoplePicker-persona:last"),o=a.offset().left,r=a.outerWidth(),l=o+r,c=s-l-7;100>c&&(c="100%"),e.find(".ms-PeoplePicker-searchField").outerWidth(c)}e.fn.PeoplePicker=function(){return this.each(function(){function n(t){e("html, body").animate({scrollTop:s.offset().top},367),e(".ms-PeoplePicker").hasClass("is-active")&&e(".ms-PeoplePicker").removeClass("is-active"),d=!0,t.stopPropagation(),o.width(s.width()-2),s.addClass("is-active"),e(document).bind("click.peoplepicker",function(t){s.removeClass("is-active"),e(document).unbind("click.peoplepicker"),d=!1})}var i,s=e(this),a=s.find(".ms-PeoplePicker-searchField"),o=s.find(".ms-PeoplePicker-results"),r=(s.find(".ms-PeoplePicker-searchMore"),s.find(".ms-PeoplePicker-selected")),l=s.find(".ms-PeoplePicker-selectedPeople"),c=s.find(".ms-PeoplePicker-selectedCount"),d=!1; 3 | s.on("focus",".ms-PeoplePicker-searchField",function(e){n(e)}),s.on("click",".ms-PeoplePicker-searchField",function(e){n(e)}),e(this).click(function(e){e.stopPropagation()}),o.on("click",".ms-PeoplePicker-result",function(n){var i=e(this).find(".ms-Persona-primaryText").html(),o=e(this).find(".ms-Persona-secondaryText").html(),d='
    '+i+'
    ',u='
  • '+i+'
    '+o+'
  • ';if(s.hasClass("ms-PeoplePicker--facePile")){r.hasClass("is-active")||r.addClass("is-active"),l.prepend(u),s.removeClass("is-active");var m=s.find(".ms-PeoplePicker-selectedPerson").length;c.html(m)}else a.before(d),s.removeClass("is-active"),t(s)}),s.on("click",".ms-PeoplePicker-personaRemove",function(n){e(this).parents(".ms-PeoplePicker-persona").remove(),0==e(".ms-PeoplePicker-persona").length?s.find(".ms-PeoplePicker-searchField").outerWidth("100%"):t(s)}),o.on("click",".js-searchMore",function(t){var n=e(this),s=n.find(".ms-PeoplePicker-searchMorePrimary"),a=s.html();n.addClass("is-searching"),s.html("Searching for “Sen”"),i?i.start():i=new fabric.Spinner(n.get(0)),setTimeout(function(){n.removeClass("is-searching"),s.html(a),i.stop()},3e3)}),o.on("click",".js-resultRemove",function(t){t.stopPropagation(),e(this).parent(".ms-PeoplePicker-result").remove()}),o.on("click",".js-resultExpand",function(t){t.stopPropagation(),e(this).parent(".ms-PeoplePicker-result").toggleClass("is-expanded")}),l.on("click",".js-selectedRemove",function(t){t.stopPropagation(),e(this).parent(".ms-PeoplePicker-selectedPerson").remove();var n=s.find(".ms-PeoplePicker-selectedPerson").length;c.html(n),0===s.find(".ms-PeoplePicker-selectedPerson").length&&r.removeClass("is-active")})})}}(jQuery),function(e){e.fn.PersonaCard=function(){return this.each(function(){var t=e(this);t.on("click",".ms-PersonaCard-action",function(){t.find(".ms-PersonaCard-action").removeClass("is-active"),e(this).addClass("is-active");var n=function(e){var t=document.getElementById("detailList"),n=t.className+"",i=e.charAt(0).toUpperCase()+e.slice(1),s="ms-PersonaCard-detail"+i;n!=s&&(t.classList.remove(n),t.classList.add(s))},i=e(this).attr("id");n(i);var s=e(this).attr("id");t.find(".ms-PersonaCard-actionDetails").removeClass("is-active"),t.find("#"+s+".ms-PersonaCard-actionDetails").addClass("is-active")}),t.on("click",".ms-PersonaCard-detailExpander",function(){e(this).parent(".ms-PersonaCard-actionDetails").toggleClass("is-collapsed")})})}}(jQuery),function(e){e.fn.Pivot=function(){return this.each(function(){var t=e(this);t.on("click",".ms-Pivot-link",function(t){t.preventDefault(),e(this).siblings(".ms-Pivot-link").removeClass("is-selected"),e(this).addClass("is-selected")})})}}(jQuery),function(e){e.fn.SearchBox=function(){return this.each(function(){var t=!1;e(this).find(".ms-SearchBox-field").on("focus",function(){e(this).siblings(".ms-SearchBox-label").hide(),e(this).parent(".ms-SearchBox").addClass("is-active")}),e(this).find(".ms-SearchBox-closeButton").on("mousedown",function(){t=!0}),e(this).find(".ms-SearchBox-field").on("blur",function(){1==t&&(e(this).val(""),e(this).siblings(".ms-SearchBox-label").show()),e(this).parent(".ms-SearchBox").removeClass("is-active"),0===e(this).val().length&&e(this).siblings(".ms-SearchBox-label").show(),t=!1})})}}(jQuery);var fabric=fabric||{};fabric.Spinner=function(e,t){function n(){u=setInterval(function(){for(var e=k.length;e--;)o(k[e])},P)}function i(){clearInterval(u)}function s(){"sixteen"===v?(f=y,h=16):(f=g,h=8),d(),a(),n()}function a(){for(var e,t=h;t--;)for(e=k.length;e--;)o(k[e])}function o(e){var t;e.j