tag:blogger.com,1999:blog-34698667480596997752024-03-14T15:01:01.140+02:00I will Share my PointA blog that shows the SharePoint 2007 & 2010 & 2013 & 2016 & 2019 from the Development, Implementation and the System and more (Like angular. react, nativescript and Liferay)Roi kolbingerhttp://www.blogger.com/profile/10947614481622890502noreply@blogger.comBlogger114125tag:blogger.com,1999:blog-3469866748059699775.post-79204686057525321152024-03-14T15:00:00.000+02:002024-03-14T15:00:29.492+02:00React lazy component (import component)<p><span style="font-family: "Segoe UI", sans-serif; font-size: 10.5pt; text-indent: -0.25in;">Let's face it - there are some problems with <b>React &
Webpack</b>.</span></p>
<p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12.0pt; text-align: left; unicode-bidi: embed;"><span style="color: black; font-family: "Segoe UI",sans-serif; font-size: 10.5pt; mso-fareast-font-family: "Times New Roman";">When I create a Webpack bundle - All the files
(js and css) are merged. (remember f</span><span style="background-color: transparent; font-size: 14px;"><span style="font-family: Segoe UI, sans-serif;">iles Name Must Start with Capital letter- js , css,..</span></span><span style="font-family: "Segoe UI", sans-serif; font-size: 10.5pt;">)</span></p>
<p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12.0pt; text-align: left; unicode-bidi: embed;"><span style="color: black; font-family: "Segoe UI",sans-serif; font-size: 10.5pt; mso-fareast-font-family: "Times New Roman";">It means that if I have some styles with the
same name, the style will be applied on all the elements.<o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12.0pt; text-align: left; unicode-bidi: embed;"><span style="color: black; font-family: "Segoe UI",sans-serif; font-size: 10.5pt; mso-fareast-font-family: "Times New Roman";">Ex:<o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12.0pt; text-align: left; unicode-bidi: embed;"><span style="color: black; font-family: "Segoe UI",sans-serif; font-size: 10.5pt; mso-fareast-font-family: "Times New Roman";">In A component - there is an element like this:</span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12.0pt; text-align: left; unicode-bidi: embed;"><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman";"><Button
className="mybutton" label="close" /></span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12.0pt; text-align: left; unicode-bidi: embed;"><span style="color: black;"><span style="font-family: Segoe UI, sans-serif;"><span style="font-size: 10.5pt;">with style like this:</span></span></span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12.0pt; text-align: left; unicode-bidi: embed;"><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman";">.mybutton {color:red}</span><span style="color: black; font-family: "Segoe UI",sans-serif; font-size: 10.5pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12.0pt; text-align: left; unicode-bidi: embed;"><span style="color: black; font-family: "Segoe UI",sans-serif; font-size: 10.5pt; mso-fareast-font-family: "Times New Roman";">In B component - there is element with the same
class name</span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12.0pt; text-align: left; unicode-bidi: embed;"><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman";"><Button
className="mybutton" label="open" /></span><span style="color: black; font-family: "Segoe UI",sans-serif; font-size: 10.5pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12.0pt; text-align: left; unicode-bidi: embed;"><span style="color: black; font-family: "Segoe UI",sans-serif; font-size: 10.5pt; mso-fareast-font-family: "Times New Roman";">So because I used the same style css class name
- the Webpack bundle merged the css files of all the components, its means that
we got red color to all components that use the same name. In the example
component B got red color for the button.<o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12.0pt; text-align: left; unicode-bidi: embed;"><span style="color: black; font-family: "Segoe UI",sans-serif; font-size: 10.5pt; mso-fareast-font-family: "Times New Roman";">I call it a <b>bug</b> (not a feature </span><span style="color: black; font-size: 10.5pt;"><span style="font-family: Segoe UI Symbol, sans-serif;">😀</span></span><span style="color: black; font-family: "Segoe UI",sans-serif; font-size: 10.5pt; mso-fareast-font-family: "Times New Roman";">)<o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12.0pt; text-align: left; unicode-bidi: embed;"><span style="color: black; font-family: "Segoe UI",sans-serif; font-size: 10.5pt; mso-fareast-font-family: "Times New Roman";">In my project I created an app.js. In this file I import all the components. There, I
noticed that as I mentioned earlier, one component get styled by another
component.<br />
As I remember in Angular, it gives all class names a new name with GUID. It
means that in angular one component style does not affect another component.<o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12.0pt; text-align: left; unicode-bidi: embed;"><b><i><span style="color: black; font-family: "Segoe UI",sans-serif; font-size: 10.5pt; mso-fareast-font-family: "Times New Roman";">Before</span></i></b><span style="color: black; font-family: "Segoe UI",sans-serif; font-size: 10.5pt; mso-fareast-font-family: "Times New Roman";">:<br />
we write this code in app.js to import our components</span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12.0pt; text-align: left; unicode-bidi: embed;"><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman";">import
MyComponent from './MyComponent';</span><span style="color: black; font-family: "Segoe UI",sans-serif; font-size: 10.5pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12.0pt; text-align: left; unicode-bidi: embed;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUaNmohNfGe2UPkyVaquQjJhSQTrupl6H9Bfaul3AjmNw0_rDuDqRMF-2QhZBnY3FvjFg_NqKqn8jXMnq8erw__l6O8yytwMsBnanvlFKv_wiMqo1QazFS8fvg7KwqDcg67rCCdO1hFyPBy1vwFFVygZMBAik93v-KTjyxYzvz0hkzM380R-h1Odz4zZU/s710/import%20react.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="79" data-original-width="710" height="45" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUaNmohNfGe2UPkyVaquQjJhSQTrupl6H9Bfaul3AjmNw0_rDuDqRMF-2QhZBnY3FvjFg_NqKqn8jXMnq8erw__l6O8yytwMsBnanvlFKv_wiMqo1QazFS8fvg7KwqDcg67rCCdO1hFyPBy1vwFFVygZMBAik93v-KTjyxYzvz0hkzM380R-h1Odz4zZU/w400-h45/import%20react.png" width="400" /></a></div><br /><p></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;"><span style="font-family: "Segoe UI", sans-serif; font-size: 10.5pt;">The time and memory:<o:p></o:p></span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12.0pt; text-align: left; unicode-bidi: embed;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQ4RPruEbrXaebi5ujBeiufFdK7iJrbwcAZc7LMSXTvMt1y2Hh1HNJ907-cNMroRjqiskzQCYkN6AEXiCP_qJzywdH4zSLX_hK7Pkj3B1EqB5jNBUZ33irTR78QwpFUrKGRheYVddpNThLEjxuM_0aEEnSxvHcF3lHJ2_rq2P7iCFZ5kPASdGPMJBCHXI/s585/time%20react.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="48" data-original-width="585" height="32" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQ4RPruEbrXaebi5ujBeiufFdK7iJrbwcAZc7LMSXTvMt1y2Hh1HNJ907-cNMroRjqiskzQCYkN6AEXiCP_qJzywdH4zSLX_hK7Pkj3B1EqB5jNBUZ33irTR78QwpFUrKGRheYVddpNThLEjxuM_0aEEnSxvHcF3lHJ2_rq2P7iCFZ5kPASdGPMJBCHXI/w400-h32/time%20react.png" width="400" /></a></div><p></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;"><b><i><span style="font-family: "Segoe UI", sans-serif; font-size: 10.5pt;">After</span></i></b><span style="font-family: "Segoe UI", sans-serif; font-size: 10.5pt;">:<br />
Now my suggested solution:<br />
</span><span style="font-family: Consolas; font-size: 10pt;">const
MyComponent = React.lazy(() => import('./MyComponent'));</span><span style="font-family: "Segoe UI", sans-serif; font-size: 10.5pt;"><o:p></o:p></span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWBPpzMzzYKfqIATg6z5aZbpb9USrIQXJ702TxEFXYKmsEQ8vu_cb0MWoYkacWjae8oqOYHIvMmZQ2_LeBzdjKGT4ETYqdgitrr4nxs5pNnAJsJ0SbjRv-Am-NIDyCvpzw2ofIOcEJ0SJAql51K6_4-VEB75Y0nlOGs30sluyibSAaOt1rW1Su-fsXGzs/s847/import%20react%20new.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="71" data-original-width="847" height="34" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWBPpzMzzYKfqIATg6z5aZbpb9USrIQXJ702TxEFXYKmsEQ8vu_cb0MWoYkacWjae8oqOYHIvMmZQ2_LeBzdjKGT4ETYqdgitrr4nxs5pNnAJsJ0SbjRv-Am-NIDyCvpzw2ofIOcEJ0SJAql51K6_4-VEB75Y0nlOGs30sluyibSAaOt1rW1Su-fsXGzs/w400-h34/import%20react%20new.png" width="400" /></a></div><br /><p></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;"><span style="font-family: "Segoe UI", sans-serif; font-size: 10.5pt;">It's means that ContactUs component now no
longer has a style from ModSlider component, because we used <b>React.Lazy</b>.<o:p></o:p></span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;">
</p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;"><span style="font-family: "Segoe UI", sans-serif; font-size: 10.5pt;">To complete the job you need to wrap your code
with <b>Suspense</b><o:p></o:p></span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWxic7rY0bwrvghhw3Dzrk22omJsS6Ei725yVOw7KZHA1WJrKjWgum77JrIY8FdTsk4tyjjZzI1iwnEBSWb2kn16qHbIAYDwfiqWgvxrm3bKyyrMqJ_WGL0amoSvwi4dzLDSvRtldwdH2qHctcoSIT1KMMdz24Rt602THFjePr1qIbMwXySpY62CIrw_k/s825/import%20react%20new%202.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="34" data-original-width="825" height="16" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWxic7rY0bwrvghhw3Dzrk22omJsS6Ei725yVOw7KZHA1WJrKjWgum77JrIY8FdTsk4tyjjZzI1iwnEBSWb2kn16qHbIAYDwfiqWgvxrm3bKyyrMqJ_WGL0amoSvwi4dzLDSvRtldwdH2qHctcoSIT1KMMdz24Rt602THFjePr1qIbMwXySpY62CIrw_k/w400-h16/import%20react%20new%202.png" width="400" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKHQIAjWxt5VbbXamirCdlEcQaFOTMX-uAedL_aEEYkhq0BuXnjx31grcYGxuGmpZBLx4xx2Df9ymDnuuAQid_hZWF-86ccFp5lZPdVX1a7Cm5Y2DBf_jUGPwOXq9knWXAZEhW3J2T7w59MjDzoqxcaNW-xkRWlu5n66TAw_JwroLbfhW4vuOuB3e4qFQ/s747/import%20react%20new%203.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="169" data-original-width="747" height="90" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKHQIAjWxt5VbbXamirCdlEcQaFOTMX-uAedL_aEEYkhq0BuXnjx31grcYGxuGmpZBLx4xx2Df9ymDnuuAQid_hZWF-86ccFp5lZPdVX1a7Cm5Y2DBf_jUGPwOXq9knWXAZEhW3J2T7w59MjDzoqxcaNW-xkRWlu5n66TAw_JwroLbfhW4vuOuB3e4qFQ/w400-h90/import%20react%20new%203.png" width="400" /></a></div><br /><p></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;"><span style="font-family: "Segoe UI", sans-serif; font-size: 10.5pt;">Now you need create your own fallback code
(loading / spinner)<o:p></o:p></span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;">
</p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;"><span style="font-family: "Segoe UI", sans-serif; font-size: 10.5pt;">The time and memory:<o:p></o:p></span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgY-7ZngFeSQvzXaLVqEOq-4tpW2sSAPd-h7F5j310h8f3BqjtEnXaym1u_tb8eImXnRsWy8XUTh8-DDrKt0Mcn_0edu5TFN_7JwGWtE8dlou2_FRLlmhQiyZ8hvjUul3BiO3j2JQ8e1EYAlpxkOk5_MDz5TSiTOpRb08ucyTNBj08dBDXHto6YZyDXck8/s608/time%20react%20new.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="39" data-original-width="608" height="26" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgY-7ZngFeSQvzXaLVqEOq-4tpW2sSAPd-h7F5j310h8f3BqjtEnXaym1u_tb8eImXnRsWy8XUTh8-DDrKt0Mcn_0edu5TFN_7JwGWtE8dlou2_FRLlmhQiyZ8hvjUul3BiO3j2JQ8e1EYAlpxkOk5_MDz5TSiTOpRb08ucyTNBj08dBDXHto6YZyDXck8/w400-h26/time%20react%20new.png" width="400" /></a></div><br /><p></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;"><span style="font-family: "Segoe UI", sans-serif; font-size: 10.5pt;">On this example we <b>saved</b> almost
6 MB and 1 sec.... amusing </span><span style="font-family: "Segoe UI Symbol", sans-serif; font-size: 10.5pt;">😃</span><span style="font-family: "Segoe UI", sans-serif; font-size: 10.5pt;"><o:p></o:p></span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;"><span style="font-family: "Segoe UI", sans-serif; font-size: 10.5pt;">This will automatically load the bundle
containing the MyComponent when this component is first rendered.<br />
React.lazy takes a function that must call a dynamic import(). This must return
a Promise which resolves to a module with a default export containing a React
component.<br />
The lazy component should then be rendered inside a Suspense component, which
allows us to show some fallback content (such as a loading indicator) while
we’re waiting for the lazy component to load.<o:p></o:p></span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;"><span style="font-family: Consolas; font-size: 10pt;">**import React, { Suspense } from 'react';<o:p></o:p></span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;"><span style="font-family: Consolas; font-size: 10pt;"> </span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;"><span style="font-family: Consolas; font-size: 10pt;">const MyComponent = React.lazy(() =>
import('./MyComponent'));<o:p></o:p></span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;"><span style="font-family: Consolas; font-size: 10pt;"> </span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;"><span style="font-family: Consolas; font-size: 10pt;">function MyComponent() {<o:p></o:p></span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;"><span style="font-family: Consolas; font-size: 10pt;"> return (<o:p></o:p></span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;"><span style="font-family: Consolas; font-size: 10pt;">
<div><o:p></o:p></span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;"><span style="font-family: Consolas; font-size: 10pt;">
<Suspense fallback={<div>Loading...</div>}><o:p></o:p></span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;"><span style="font-family: Consolas; font-size: 10pt;">
<OtherComponent /><o:p></o:p></span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;"><span style="font-family: Consolas; font-size: 10pt;">
</Suspense><o:p></o:p></span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;"><span style="font-family: Consolas; font-size: 10pt;"> </div><o:p></o:p></span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;"><span style="font-family: Consolas; font-size: 10pt;"> );<o:p></o:p></span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;"><span style="font-family: Consolas; font-size: 10pt;">}<o:p></o:p></span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;"><span style="font-family: "Segoe UI", sans-serif; font-size: 10.5pt;">The <b>fallback prop</b> accepts any
React elements that you want to render while waiting for the component to load.
You can place the Suspense component anywhere above the lazy component. You can
even wrap <b>multiple lazy</b> components with a single Suspense
component.<o:p></o:p></span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;"><span style="font-family: Consolas; font-size: 10pt;">import React, { Suspense } from 'react';<o:p></o:p></span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;"><span style="font-family: Consolas; font-size: 10pt;">const OtherComponent = React.lazy(() =>
import('./OtherComponent'));</span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;"><span style="font-family: Consolas; font-size: 10pt;">const AnotherComponent = React.lazy(() =>
import('./AnotherComponent'));<o:p></o:p></span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;"><span style="font-family: Consolas; font-size: 10pt;">function MyComponent() {</span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;"><span style="font-family: Consolas; font-size: 10pt;"> return (<o:p></o:p></span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;"><span style="font-family: Consolas; font-size: 10pt;">
<div><o:p></o:p></span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;"><span style="font-family: Consolas; font-size: 10pt;"> <Suspense
fallback={<div>Loading...</div>}><o:p></o:p></span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;"><span style="font-family: Consolas; font-size: 10pt;">
<section><o:p></o:p></span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;"><span style="font-family: Consolas; font-size: 10pt;">
<OtherComponent /><o:p></o:p></span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;"><span style="font-family: Consolas; font-size: 10pt;">
<AnotherComponent /><o:p></o:p></span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;"><span style="font-family: Consolas; font-size: 10pt;">
</section><o:p></o:p></span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;"><span style="font-family: Consolas; font-size: 10pt;">
</Suspense><o:p></o:p></span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;"><span style="font-family: Consolas; font-size: 10pt;">
</div><o:p></o:p></span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;"><span style="font-family: Consolas; font-size: 10pt;"> );<o:p></o:p></span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;"><span style="font-family: Consolas; font-size: 10pt;">}<o:p></o:p></span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;"><b><span style="font-family: "Segoe UI", sans-serif; font-size: 10.5pt;">To support Webpack Chunk Name</span></b></p><p class="MsoNormal" dir="LTR" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;"><span style="font-family: Consolas; font-size: 10pt;">const News = React.lazy(() =>
import(/*webpackChunkName:"News"
*/"../components/News/News"));<o:p></o:p></span></p><p class="MsoNormal" dir="LTR" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;"><span style="font-family: "Segoe UI", sans-serif; font-size: 10.5pt;">to webpack.config.js:<o:p></o:p></span></p><p class="MsoNormal" dir="LTR" style="background: white; direction: ltr; line-height: normal; margin-bottom: 0.0001pt; unicode-bidi: embed;"><span style="font-family: Consolas; font-size: 10pt;">output: {<o:p></o:p></span></p><p class="MsoNormal" dir="LTR" style="background: white; direction: ltr; line-height: normal; margin-bottom: 0.0001pt; unicode-bidi: embed;"><span style="font-family: Consolas; font-size: 10pt;"> path:
path.resolve(__dirname,
'D:/Code/React/'),<o:p></o:p></span></p><p class="MsoNormal" dir="LTR" style="background: white; direction: ltr; line-height: normal; margin-bottom: 0.0001pt; unicode-bidi: embed;"><span style="font-family: Consolas; font-size: 10pt;">
filename: 'Roi_bundle.js',<o:p></o:p></span></p><p class="MsoNormal" dir="LTR" style="background: white; direction: ltr; line-height: normal; margin-bottom: 0.0001pt; unicode-bidi: embed;"><span style="font-family: Consolas; font-size: 10pt;">
chunkFilename:'[name].[chunkhash].js'<o:p></o:p></span></p><p class="MsoNormal" dir="LTR" style="background: white; direction: ltr; line-height: normal; margin-bottom: 0.0001pt; unicode-bidi: embed;"><span style="font-family: Consolas; font-size: 10pt;"> },</span><span style="font-family: "Courier New"; font-size: 10pt;"><o:p></o:p></span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;">
</p><p class="MsoNormal" dir="RTL"><span dir="LTR"><o:p> </o:p></span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;"><span style="font-family: "Segoe UI", sans-serif; font-size: 10.5pt;"><br /></span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12.0pt; text-align: left; unicode-bidi: embed;"><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman";"><br /></span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12.0pt; text-align: left; unicode-bidi: embed;"><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman";"><br /></span></p><p class="MsoNormal" style="background: white; direction: ltr; line-height: normal; margin-bottom: 12.0pt; text-align: left; unicode-bidi: embed;"><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman";"><br /></span></p>Roi kolbingerhttp://www.blogger.com/profile/10947614481622890502noreply@blogger.com0tag:blogger.com,1999:blog-3469866748059699775.post-6955744983140169832022-01-18T09:45:00.000+02:002022-01-18T09:45:09.705+02:00 How to get the following ID in a SharePoint list<p> hi...</p><p>More than a decade ago .. I wrote a <a href="https://kwizcom.blogspot.com/" rel="nofollow" target="_blank">kwizcom blog</a> article - how to get the following ID in a SharePoint list</p><p><a href="https://kwizcom.blogspot.com/2009/08/how-do-i-tell-what-next-list-item-id-is.html">https://kwizcom.blogspot.com/2009/08/how-do-i-tell-what-next-list-item-id-is.html</a></p><p>This was valid for SharePoint 2007 and 2010 for sure.</p><p>I do not know when Microsoft changed the table in the database ..</p><p>But now in SharePoint 2019 they have created another table AllListsAux and the code should look like this</p><p>
</p><div style="background-color: #141414; border-bottom: rgb(0,0,255) 2px solid; border-color: rgb(0, 0, 255); border-left: rgb(0,0,255) 2px solid; border-right: rgb(0,0,255) 2px solid; border-style: solid; border-top: rgb(0,0,255) 2px solid; border-width: 2px; color: white; font-size-adjust: none; font-stretch: normal; font: 16px / 1.4 "courier new", "Andale Mono", courier, monospace; padding-left: 6px;">
<p></p><p>/// Get the next available item id from a list</p><p>/// < name="site">site</p><p>/// < name="listId">listId</p><p>///</p><p>public static int SharePointListNextItemId(SPSite site, Guid listId)</p><p>{</p><p> int id = -1;</p><p> SPSecurity.RunWithElevatedPrivileges(delegate ()</p><p> {</p><p> if (site.WebApplication.ContentDatabases.Count > 0)</p><p> {</p><p> string DBConnString = site.WebApplication.ContentDatabases[0].DatabaseConnectionString;</p><p> using (SqlConnection con = new SqlConnection(DBConnString))</p><p> {</p><p> try</p><p> {</p><p> con.Open();</p><p> using (SqlCommand command = con.CreateCommand())</p><p> {</p><p> command.CommandText = String.Format("select NextAvailableId from [AllListsAux] where ListID = '{0}'", listId.ToString());</p><p> id = (int)command.ExecuteScalar();</p><p> }</p><p> }</p><p> finally</p><p> {</p><p> con.Close();</p><p> }</p><p> }</p><p> }</p><p> });</p><p> return id;</p><p>}</p></div><p>Hope this helps!</p>Roi kolbingerhttp://www.blogger.com/profile/10947614481622890502noreply@blogger.com0tag:blogger.com,1999:blog-3469866748059699775.post-88374895932441989032021-05-25T08:53:00.004+03:002021-05-25T08:53:57.850+03:00WSP not deployed in all SharePoint servers in the farm<p>If you want to deploy wsp file on the SharePoint farm ... and the installation failed on some of the farm servers - then the solution is the timejob</p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-wbg7uaL8a48/YKyNiVax5wI/AAAAAAABuec/NMFubyrJC5gn4tVnTzPGWhU2-TDytgi_gCLcBGAsYHQ/s995/sharepoint%2Bdeploy.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="468" data-original-width="995" height="189" src="https://1.bp.blogspot.com/-wbg7uaL8a48/YKyNiVax5wI/AAAAAAABuec/NMFubyrJC5gn4tVnTzPGWhU2-TDytgi_gCLcBGAsYHQ/w400-h189/sharepoint%2Bdeploy.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">SharePoint deploy</td></tr></tbody></table><br /><p>Run this code at SharePoint PowerShell</p><div style="background-color: #141414; border-bottom: rgb(0,0,255) 2px solid; border-color: rgb(0, 0, 255); border-left: rgb(0,0,255) 2px solid; border-right: rgb(0,0,255) 2px solid; border-style: solid; border-top: rgb(0,0,255) 2px solid; border-width: 2px; color: white; font-size-adjust: none; font-stretch: normal; font: 16px / 1.4 "courier new", "Andale Mono", courier, monospace; padding-left: 6px;"><p>$farm = Get-SPFarm</p><p>$disabledTimers = $farm.TimerService.Instances | where {$_.Status -ne "Online"}</p><p>if ($disabledTimers -ne $null)</p><p>{</p><p> foreach ($timer in $disabledTimers)</p><p> {</p><p> Write-Host "Timer service instance on server " $timer.Server.Name " is not Online. Current status:" $timer.Status</p><p> Write-Host "Attempting to set the status of the service instance to online"</p><p> $timer.Status = [Microsoft.SharePoint.Administration.SPObjectStatus]::Online</p><p> $timer.Update()</p><p> }</p><p>}</p><p>else</p><p>{</p><p> Write-Host "All Timer Service Instances in the farm are online! No problems found"</p><p>}</p></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-mfxy34ak_TI/YKyOisVR-wI/AAAAAAABues/cmqHPyBiC88ZsD3EBS8VDiGUHjFtu5WIQCLcBGAsYHQ/s673/powershell%2Btimer%2Bjob.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="510" data-original-width="673" height="303" src="https://1.bp.blogspot.com/-mfxy34ak_TI/YKyOisVR-wI/AAAAAAABues/cmqHPyBiC88ZsD3EBS8VDiGUHjFtu5WIQCLcBGAsYHQ/w400-h303/powershell%2Btimer%2Bjob.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">PowerShell timer job</td></tr></tbody></table><br /><div>Before reinstalling recycle time Job on each server</div><div><br /></div><div>More info - read this <a href="https://social.msdn.microsoft.com/Forums/sqlserver/en-US/1c8bda47-5be9-4412-a531-1706bf0df6e6/wsp-not-getting-deployed-in-all-servers-in-our-sharepoint-2013-farm?forum=sharepointadmin">forum</a><br /><p><br /></p><p>Yours,</p><p>Roi</p><p><br /></p><p><br /></p><p><br /></p><p><br /></p><p><br /></p></div>Roi kolbingerhttp://www.blogger.com/profile/10947614481622890502noreply@blogger.com0tag:blogger.com,1999:blog-3469866748059699775.post-25134086880637466402021-01-29T17:30:00.004+02:002021-01-29T17:30:49.108+02:00Create React, Angular or Vue widget at Liferay<p>In the last year I have made a small change in the professional aspect …</p><p>I switched from a Microsoft CMS (SharePoint) that works with .NET and windows IIS to a new CMS - Liferay</p><p>In Liferay, I work with Java, Linux servers with tomcat.(On AWS cloud)- I don't remember Microsoft 😖</p><p><br /></p><p>Enough talking about myself... Let's do Liferay</p><p><br /></p><p><b>Before </b></p><p>You need to install before node.js, <i>npm </i>and <i>yomoan</i>. Also you need<i> visual studio code</i>.</p><p><b>Install the Liferay bundle generator</b></p><p>Run the following command (Create before folder for your project)</p><div style="background-color: #141414; border-bottom: rgb(0,0,255) 2px solid; border-color: rgb(0, 0, 255); border-left: rgb(0,0,255) 2px solid; border-right: rgb(0,0,255) 2px solid; border-style: solid; border-top: rgb(0,0,255) 2px solid; border-width: 2px; color: white; font-size-adjust: none; font-stretch: normal; font: 16px / 1.4 "courier new", "Andale Mono", courier, monospace; padding-left: 6px;">npm install -g yo generator-liferay-js</div><p></p><p>And now, generate the React project</p><div style="background-color: #141414; border-bottom: rgb(0,0,255) 2px solid; border-color: rgb(0, 0, 255); border-left: rgb(0,0,255) 2px solid; border-right: rgb(0,0,255) 2px solid; border-style: solid; border-top: rgb(0,0,255) 2px solid; border-width: 2px; color: white; font-size-adjust: none; font-stretch: normal; font: 16px / 1.4 "courier new", "Andale Mono", courier, monospace; padding-left: 6px;">yo liferay-js</div><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-x4w3VifjfJ8/YAfpjVAZl8I/AAAAAAABr_U/_UCNP-mVujA-bVxnd2zB4u5MRH6C7OOFACLcBGAsYHQ/s602/yo%2Bliferay-js.png" style="margin-left: 1em; margin-right: 1em;"><img alt="nmp install" border="0" data-original-height="315" data-original-width="602" height="209" src="https://1.bp.blogspot.com/-x4w3VifjfJ8/YAfpjVAZl8I/AAAAAAABr_U/_UCNP-mVujA-bVxnd2zB4u5MRH6C7OOFACLcBGAsYHQ/w400-h209/yo%2Bliferay-js.png" title="angular" width="400" /></a></div><div><br /></div><div>Select React Widget (Or Angular / Vue)</div><div><br /></div><div>Now answer the questions about your project… (Name. category, localization etc… )</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-LFOsvaCoiwE/YBQkdYDH86I/AAAAAAABsNo/P3x18TjhAT4bJQ_U1pzxY9tx6bRE3qqDgCLcBGAsYHQ/s602/angular_liferay.png" style="margin-left: 1em; margin-right: 1em;"><img alt="Liferay Angular" border="0" data-original-height="315" data-original-width="602" height="209" src="https://1.bp.blogspot.com/-LFOsvaCoiwE/YBQkdYDH86I/AAAAAAABsNo/P3x18TjhAT4bJQ_U1pzxY9tx6bRE3qqDgCLcBGAsYHQ/w400-h209/angular_liferay.png" title="yo liferay js" width="400" /></a></div><br /><div><div>Chose with example code</div><div><br /></div><div>Now the npm service installing the project </div><div><br /></div><div><b>The Code </b></div><div><b><br /></b></div><div>Open your project with visual studio code</div></div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-DM7zA8-XpHg/YBQmLEJeEMI/AAAAAAABsOE/vQ2WggBMipYLe3mRal7Mc1NrhjpIlDfvwCLcBGAsYHQ/s602/visual%2Bstudio%2Bcode.png" style="margin-left: 1em; margin-right: 1em;"><img alt="Visual Studio Code" border="0" data-original-height="395" data-original-width="602" height="263" src="https://1.bp.blogspot.com/-DM7zA8-XpHg/YBQmLEJeEMI/AAAAAAABsOE/vQ2WggBMipYLe3mRal7Mc1NrhjpIlDfvwCLcBGAsYHQ/w400-h263/visual%2Bstudio%2Bcode.png" title="project - visual studio code" width="400" /></a></div><br /><div><div>The <i>package.json</i> file is responsible for the settings of the project (<i>name, version, category, etc. …</i>)</div><div><br /></div><div>The <i>assets\css\styles.css</i> file is responsible for the style (you can add more files) .</div><div><br /></div><div>The features\localization\Language.properties is the resource file. It can be a multiple languages, you need to and your local file like Language_iw.properties for Hebrew.</div><div><br /></div><div>The features\configuration.json is the property of the widget. </div><div><br /></div><div>The files src\AppComponent.js and src\index.js are the files of the component.</div><div><br /></div><div>You can add your new component like this.</div><div><br /></div><div><b>Deploy</b></div><div><p>Run this command</p><div style="background-color: #141414; border-bottom: rgb(0,0,255) 2px solid; border-color: rgb(0, 0, 255); border-left: rgb(0,0,255) 2px solid; border-right: rgb(0,0,255) 2px solid; border-style: solid; border-top: rgb(0,0,255) 2px solid; border-width: 2px; color: white; font-family: "courier new", "Andale Mono", courier, monospace; font-size-adjust: none; font-size: 16px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.4; padding-left: 6px;">npm run deploy</div><p></p><p><b>Liferay</b></p></div><div>On the page (at liferay) add your widget. You widget is under your category, and you can change the property that youadd on the json file.</div></div><p>Enjoy</p><p>Roi </p><p><br /></p>Roi kolbingerhttp://www.blogger.com/profile/10947614481622890502noreply@blogger.com0tag:blogger.com,1999:blog-3469866748059699775.post-51467898028384067652020-08-06T11:16:00.002+03:002020-08-06T11:17:33.248+03:00Text To Speech (TTS) and Audio file with NativeScriptIn my game - <a href="https://play.google.com/store/apps/details?id=org.nativescript.roifirstgame">My first game</a> (game for children), that created with NativeScript, I use audio and speak services.<div><br /></div><div class="separator" style="clear: both;"><a href="https://1.bp.blogspot.com/-mQ-d1zWCUMU/Xyu6yqGGclI/AAAAAAABUlM/0HxB5HmRj4MevitBp4dstGjSHQyiz-SCgCLcBGAsYHQ/s1920/Screenshot_1596701325.png" imageanchor="1" style="display: block; padding: 1em 0px;"><img border="0" data-original-height="1920" data-original-width="1080" height="410" src="https://1.bp.blogspot.com/-mQ-d1zWCUMU/Xyu6yqGGclI/AAAAAAABUlM/0HxB5HmRj4MevitBp4dstGjSHQyiz-SCgCLcBGAsYHQ/w230-h410/Screenshot_1596701325.png" width="230" /></a></div><div><br /></div><div>The NativeScript is platform that use to develop an android (or IOS) app with angular and TypeScript.</div><div><br /></div><div>Here is the class the use for Audio and Speak with NativeScript.</div><div><br /></div><div>The speak if Text To Speech (TTS) from google.</div><div><br /></div><div>The audio is mp3 file<br /><div><br /></div><div><div style="background-color: #1e1e1e; color: #d4d4d4; font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div><span style="color: #c586c0;">import</span> { <span style="color: #9cdcfe;">TNSTextToSpeech</span>, <span style="color: #9cdcfe;">SpeakOptions</span> } <span style="color: #c586c0;">from</span> <span style="color: #ce9178;">"nativescript-texttospeech"</span>;</div><div><span style="color: #c586c0;">import</span> { <span style="color: #9cdcfe;">TNSPlayer</span>, <span style="color: #9cdcfe;">AudioPlayerOptions</span> } <span style="color: #c586c0;">from</span> <span style="color: #ce9178;">"nativescript-audio-player"</span>;</div><div><span style="color: #c586c0;">import</span> <span style="color: #569cd6;">*</span> <span style="color: #c586c0;">as</span> <span style="color: #9cdcfe;">timer</span> <span style="color: #c586c0;">from</span> <span style="color: #ce9178;">"tns-core-modules/timer"</span>;</div><div><span style="color: #c586c0;">import</span> { <span style="color: #9cdcfe;">Injectable</span> } <span style="color: #c586c0;">from</span> <span style="color: #ce9178;">"@angular/core"</span>;</div><div><span style="color: #c586c0;">import</span> <span style="color: #569cd6;">*</span> <span style="color: #c586c0;">as</span> <span style="color: #9cdcfe;">firebase</span> <span style="color: #c586c0;">from</span> <span style="color: #ce9178;">"nativescript-plugin-firebase"</span>;</div><div>@<span style="color: #4ec9b0;">Injectable</span>({</div><div> <span style="color: #9cdcfe;">providedIn</span><span style="color: #9cdcfe;">:</span> <span style="color: #ce9178;">"root"</span>,</div><div>})</div><div><span style="color: #c586c0;">export</span> <span style="color: #569cd6;">class</span> <span style="color: #4ec9b0;">AudioAndSpeak</span> {</div><div> <span style="color: #569cd6;">public</span> <span style="color: #9cdcfe;">audioTrackDuration</span>: <span style="color: #4ec9b0;">any</span>;</div><div> <span style="color: #569cd6;">public</span> <span style="color: #9cdcfe;">remainingDuration</span>: <span style="color: #4ec9b0;">any</span>; <span style="color: #6a9955;">// used to show the remaining time of the audio track</span></div><div> <span style="color: #569cd6;">private</span> <span style="color: #9cdcfe;">TTS</span> = <span style="color: #569cd6;">new</span> <span style="color: #4ec9b0;">TNSTextToSpeech</span>();</div><div> <span style="color: #569cd6;">private</span> <span style="color: #9cdcfe;">_player</span>: <span style="color: #4ec9b0;">TNSPlayer</span>;</div><div> <span style="color: #569cd6;">public</span> <span style="color: #9cdcfe;">isSpeaking</span>: <span style="color: #4ec9b0;">boolean</span> = <span style="color: #569cd6;">false</span>;</div><div> <span style="color: #569cd6;">constructor</span>() {</div><div> <span style="color: #569cd6;">this</span>.<span style="color: #9cdcfe;">_player</span> = <span style="color: #569cd6;">new</span> <span style="color: #4ec9b0;">TNSPlayer</span>();</div><div> <span style="color: #569cd6;">this</span>.<span style="color: #9cdcfe;">_player</span>.<span style="color: #9cdcfe;">debug</span> = <span style="color: #569cd6;">false</span>;</div><div> }</div><div> <span style="color: #569cd6;">public</span> <span style="color: #569cd6;">async</span> <span style="color: #dcdcaa;">speak</span>(<span style="color: #9cdcfe;">text</span>: <span style="color: #4ec9b0;">string</span>, <span style="color: #9cdcfe;">local</span> : <span style="color: #4ec9b0;">string</span>) {</div><div> <span style="color: #569cd6;">let</span> <span style="color: #9cdcfe;">isSpeaking</span> = <span style="color: #569cd6;">true</span>;</div><div> <span style="color: #569cd6;">let</span> <span style="color: #9cdcfe;">speakRate</span> = <span style="color: #b5cea8;">0.8</span>;</div><div> <span style="color: #569cd6;">let</span> <span style="color: #9cdcfe;">speakOptions</span>: <span style="color: #4ec9b0;">SpeakOptions</span> = {</div><div> <span style="color: #9cdcfe;">text</span><span style="color: #9cdcfe;">:</span> <span style="color: #9cdcfe;">text</span>,</div><div> <span style="color: #9cdcfe;">speakRate</span><span style="color: #9cdcfe;">:</span> <span style="color: #9cdcfe;">speakRate</span>,</div><div> <span style="color: #9cdcfe;">queue</span><span style="color: #9cdcfe;">:</span> <span style="color: #569cd6;">true</span>,</div><div> <span style="color: #9cdcfe;">locale</span><span style="color: #9cdcfe;"> :</span> <span style="color: #9cdcfe;">local</span>,</div><div> <span style="color: #dcdcaa;">finishedCallback</span><span style="color: #9cdcfe;">:</span> <span style="color: #569cd6;">async</span> () <span style="color: #569cd6;">=></span> {</div><div> <span style="color: #9cdcfe;">isSpeaking</span> = <span style="color: #569cd6;">false</span>;</div><div> },</div><div> };</div><div> <span style="color: #569cd6;">this</span>.<span style="color: #9cdcfe;">TTS</span>.<span style="color: #dcdcaa;">speak</span>(<span style="color: #9cdcfe;">speakOptions</span>).<span style="color: #dcdcaa;">then</span>(() <span style="color: #569cd6;">=></span> <span style="color: #9cdcfe;">console</span>.<span style="color: #dcdcaa;">log</span>(<span style="color: #ce9178;">"End Speak"</span>));</div><div> <span style="color: #c586c0;">return</span> <span style="color: #9cdcfe;">isSpeaking</span>;</div><div> }</div><div> <span style="color: #569cd6;">public</span> <span style="color: #569cd6;">async</span> <span style="color: #dcdcaa;">playSound</span>(<span style="color: #9cdcfe;">filePath</span>: <span style="color: #4ec9b0;">string</span>, <span style="color: #9cdcfe;">filePath2</span>?: <span style="color: #4ec9b0;">string</span>, <span style="color: #9cdcfe;">volume</span>? :<span style="color: #4ec9b0;">number</span>) {</div><div> <span style="color: #c586c0;">try</span> {</div><div> <span style="color: #c586c0;">if</span>(!<span style="color: #9cdcfe;">volume</span>)</div><div> {</div><div> <span style="color: #9cdcfe;">volume</span> = <span style="color: #b5cea8;">1</span>;</div><div> }</div><div> <span style="color: #569cd6;">this</span>.<span style="color: #9cdcfe;">_player</span>.<span style="color: #9cdcfe;">volume</span> = <span style="color: #9cdcfe;">volume</span>;</div><div> <span style="color: #569cd6;">this</span>.<span style="color: #9cdcfe;">isSpeaking</span> = <span style="color: #569cd6;">true</span>;</div><div> <span style="color: #569cd6;">const</span> <span style="color: #4fc1ff;">playerOptions</span>: <span style="color: #4ec9b0;">AudioPlayerOptions</span> = {</div><div> <span style="color: #9cdcfe;">audioFile:</span> <span style="color: #9cdcfe;">filePath</span>,</div><div> <span style="color: #9cdcfe;">loop:</span> <span style="color: #569cd6;">false</span>, </div><div> <span style="color: #dcdcaa;">completeCallback</span><span style="color: #9cdcfe;">:</span> <span style="color: #569cd6;">async</span> () <span style="color: #569cd6;">=></span> {</div><div> </div><div> <span style="color: #c586c0;">await</span> <span style="color: #569cd6;">this</span>.<span style="color: #9cdcfe;">_player</span>.<span style="color: #dcdcaa;">dispose</span>();</div><div> <span style="color: #569cd6;">this</span>.<span style="color: #9cdcfe;">isSpeaking</span> = <span style="color: #569cd6;">false</span>; </div><div> <span style="color: #6a9955;">// player disposed</span></div><div> <span style="color: #c586c0;">if</span> (<span style="color: #9cdcfe;">filePath2</span>) {</div><div> <span style="color: #569cd6;">this</span>.<span style="color: #dcdcaa;">playSound</span>(<span style="color: #9cdcfe;">filePath2</span>);</div><div> }</div><div> },</div><div> <span style="color: #dcdcaa;">errorCallback</span><span style="color: #9cdcfe;">:</span> (<span style="color: #9cdcfe;">errorObject</span>) <span style="color: #569cd6;">=></span> {</div><div> <span style="color: #9cdcfe;">console</span>.<span style="color: #dcdcaa;">log</span>(<span style="color: #ce9178;">'errorCallback'</span>)</div><div> <span style="color: #9cdcfe;">console</span>.<span style="color: #dcdcaa;">log</span>(<span style="color: #9cdcfe;">JSON</span>.<span style="color: #dcdcaa;">stringify</span>(<span style="color: #9cdcfe;">errorObject</span>));</div><div> <span style="color: #569cd6;">this</span>.<span style="color: #9cdcfe;">isSpeaking</span> = <span style="color: #569cd6;">false</span>;</div><div> },</div><div> <span style="color: #dcdcaa;">infoCallback</span><span style="color: #9cdcfe;">:</span> (<span style="color: #9cdcfe;">args</span>) <span style="color: #569cd6;">=></span> {</div><div> <span style="color: #9cdcfe;">console</span>.<span style="color: #dcdcaa;">log</span>(<span style="color: #9cdcfe;">JSON</span>.<span style="color: #dcdcaa;">stringify</span>(<span style="color: #9cdcfe;">args</span>));</div><div> },</div><div> };</div><div> <span style="color: #c586c0;">await</span> <span style="color: #569cd6;">this</span>.<span style="color: #9cdcfe;">_player</span>.<span style="color: #dcdcaa;">playFromFile</span>(<span style="color: #4fc1ff;">playerOptions</span>).<span style="color: #dcdcaa;">catch</span>((<span style="color: #9cdcfe;">error</span>) <span style="color: #569cd6;">=></span> {</div><div> <span style="color: #9cdcfe;">firebase</span>.<span style="color: #4fc1ff;">crashlytics</span>.<span style="color: #dcdcaa;">sendCrashLog</span>(<span style="color: #ce9178;">'AudioAndSpeak -> playSound playFromFile :'</span> + <span style="color: #9cdcfe;">error</span>);</div><div> <span style="color: #9cdcfe;">console</span>.<span style="color: #dcdcaa;">log</span>(<span style="color: #9cdcfe;">error</span>);</div><div> <span style="color: #569cd6;">this</span>.<span style="color: #9cdcfe;">isSpeaking</span> = <span style="color: #569cd6;">false</span>;</div><div> });</div><div> </div><div> <span style="color: #569cd6;">this</span>.<span style="color: #9cdcfe;">audioTrackDuration</span> = <span style="color: #c586c0;">await</span> <span style="color: #569cd6;">this</span>.<span style="color: #9cdcfe;">_player</span>.<span style="color: #dcdcaa;">getAudioTrackDuration</span>();</div><div> <span style="color: #6a9955;">// start audio duration tracking</span></div><div> <span style="color: #569cd6;">this</span>.<span style="color: #dcdcaa;">_startDurationTracking</span>(<span style="color: #569cd6;">this</span>.<span style="color: #9cdcfe;">audioTrackDuration</span>, <span style="color: #9cdcfe;">volume</span>);</div><div> } <span style="color: #c586c0;">catch</span> (<span style="color: #9cdcfe;">e</span>) {</div><div> <span style="color: #9cdcfe;">console</span>.<span style="color: #dcdcaa;">error</span>(<span style="color: #ce9178;">"AudioAndSpeak -> playSound"</span>, <span style="color: #9cdcfe;">e</span>);</div><div> <span style="color: #9cdcfe;">firebase</span>.<span style="color: #4fc1ff;">crashlytics</span>.<span style="color: #dcdcaa;">sendCrashLog</span>(<span style="color: #ce9178;">'AudioAndSpeak -> playSound :'</span> + <span style="color: #9cdcfe;">e</span>);</div><div> }</div><div> }</div><div> <span style="color: #569cd6;">private</span> <span style="color: #569cd6;">async</span> <span style="color: #dcdcaa;">_startDurationTracking</span>(<span style="color: #9cdcfe;">duration</span>, <span style="color: #9cdcfe;">volume</span>) {</div><div> <span style="color: #c586c0;">if</span> (<span style="color: #569cd6;">this</span>.<span style="color: #9cdcfe;">_player</span> && <span style="color: #569cd6;">this</span>.<span style="color: #9cdcfe;">_player</span>.<span style="color: #dcdcaa;">isAudioPlaying</span>()) {</div><div> <span style="color: #569cd6;">this</span>.<span style="color: #9cdcfe;">_player</span>.<span style="color: #9cdcfe;">volume</span> = <span style="color: #9cdcfe;">volume</span>;</div><div> <span style="color: #569cd6;">const</span> <span style="color: #4fc1ff;">timerId</span> = <span style="color: #9cdcfe;">timer</span>.<span style="color: #dcdcaa;">setInterval</span>(() <span style="color: #569cd6;">=></span> {</div><div> <span style="color: #569cd6;">this</span>.<span style="color: #9cdcfe;">remainingDuration</span> = <span style="color: #9cdcfe;">duration</span> - <span style="color: #569cd6;">this</span>.<span style="color: #9cdcfe;">_player</span>.<span style="color: #4fc1ff;">currentTime</span>;</div><div> }, <span style="color: #b5cea8;">500</span>);</div><div> }</div><div> }</div><div>}</div><br /></div></div><div><br /></div><div>You need yo add the service on the contractor</div><div><br /></div><div><div style="background-color: #1e1e1e; color: #d4d4d4; font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><span style="color: #c586c0;">import</span> { <span style="color: #9cdcfe;">AudioAndSpeak</span> } <span style="color: #c586c0;">from</span> <span style="color: #ce9178;">"../../shared/AudioAndSpeak"</span>;</div></div><div><br /></div><div><div style="background-color: #1e1e1e; font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div style="color: #d4d4d4;"> <span style="color: #569cd6;">constructor</span>(</div><div><span style="color: #d4d4d4;"> </span><span style="color: #569cd6;">...</span></div><div style="color: #d4d4d4;"> <span style="color: #569cd6;">private</span> <span style="color: #9cdcfe;">audioAndSpeak</span>: <span style="color: #4ec9b0;">AudioAndSpeak</span>,</div><div><span style="color: #d4d4d4;"> </span><span style="color: #569cd6;">...</span></div><div style="color: #d4d4d4;"> ) {...}</div></div></div><div><br /></div></div><div>to call audio file</div><div><br /></div><div><div style="background-color: #1e1e1e; color: #d4d4d4; font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div> <span style="color: #569cd6;">this</span>.<span style="color: #9cdcfe;">audioAndSpeak</span>.<span style="color: #dcdcaa;">playSound</span>(<span style="color: #9cdcfe;">audioFilePath</span>);</div></div></div><div><br /></div><div>to call speak</div><div><br /></div><div><div style="background-color: #1e1e1e; font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div><span style="color: #569cd6;">this</span><span style="color: #d4d4d4;">.</span><span style="color: #9cdcfe;">audioAndSpeak</span><span style="color: #d4d4d4;">.</span><span style="color: #dcdcaa;">speak</span><span style="color: #d4d4d4;">( </span><span style="color: #4ec9b0;">'TEXT'</span><span style="color: #d4d4d4;"> , </span><span style="color: #ce9178;">"en-GB"</span><span style="color: #d4d4d4;"> );</span></div></div></div><div><br /></div><div>Thanks,</div><div>Roi Kolbinger</div>Roi kolbingerhttp://www.blogger.com/profile/10947614481622890502noreply@blogger.com0tag:blogger.com,1999:blog-3469866748059699775.post-73281944263798244442020-06-28T09:59:00.000+03:002020-06-28T09:59:12.350+03:00Game built in Angular and Typescript- for Android users with NativeScript<div dir="ltr" style="text-align: left;" trbidi="on">
During the corona virus vacation, I took the time to learn something new- NetiveScript.<br />
I took a course - at one of the best in the market - Maximilian Schwarzmüller.<br />
<br />
<a href="https://pro.academind.com/p/nativescript-angular-build-native-ios-android-web-apps">https://pro.academind.com/p/nativescript-angular-build-native-ios-android-web-apps</a><br />
<br />
I built a game for my girls.<br />
<br />
For Hebrew speakers<br />
Ages 2-4 they will learn Colors, Shapes and Animals.<br />
Ages 4-6 who will teach Numbers and Letters<br />
Ages 6-9 who will teach addition and multiplication .. and learning English in stages ... Letters Numbers, Colors, Shapes and Animals.<br />
For English speakers, the same thing only in English.<br />
<br />
Now because everything is object-based .. I tried another language - Spanish .. In the meantime, there are only Numbers and Animals.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-r5EHcHimI44/Xvg7N8XY1KI/AAAAAAABToM/cD6wkmCEPEMAPkdb9Hz6LLvILxjJoCM5ACPcBGAsYHg/s1600/Screenshot_2020-06-28-09-38-31-607_org.nativescript.roifirstgame.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="770" height="400" src="https://1.bp.blogspot.com/-r5EHcHimI44/Xvg7N8XY1KI/AAAAAAABToM/cD6wkmCEPEMAPkdb9Hz6LLvILxjJoCM5ACPcBGAsYHg/s400/Screenshot_2020-06-28-09-38-31-607_org.nativescript.roifirstgame.jpg" width="191" /></a></div>
<br />
The game itself is written in angular and typescript.<br />
It has 3 main components.<br />
Component for choosing a language, Component for chose a game and of course Component of the game itself..<br />
<br />
NativeScript gives me, as a web developer, the ability to build an app for both Android and iOS<br />
<br />
The game is now in Google play - and Called - My First Game<br />
<br />
<a href="https://play.google.com/store/apps/details?id=org.nativescript.roifirstgame">https://play.google.com/store/apps/details?id=org.nativescript.roifirstgame</a><br />
<br />
Over time, I'll post my insights from NativeScript<br />
<br />
Install ... Let the kids play and I'd love to get feedbacks ...<br />
Roi<br />
<br />
<br /></div>
Roi kolbingerhttp://www.blogger.com/profile/10947614481622890502noreply@blogger.com0tag:blogger.com,1999:blog-3469866748059699775.post-52749376054479823122020-06-26T10:26:00.000+03:002020-06-26T10:26:04.438+03:00SharePoint Service Provisioning - the service stuck on starting<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: left;">
When I tried to run SharePoint service - Manage Metadata Web Service on the Central Admin ... I wait and still Staring (Stuck)...</div>
<div style="text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-M05FNKUfGus/XuivigGf-qI/AAAAAAABTBk/nxKu0Z6r-6ggHCST3JubBCS9KTrPNPhOACLcBGAsYHQ/s1600/Manage%2BMetadata%2Bweb%2Bservice%2Bstaring.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="45" data-original-width="850" height="20" src="https://1.bp.blogspot.com/-M05FNKUfGus/XuivigGf-qI/AAAAAAABTBk/nxKu0Z6r-6ggHCST3JubBCS9KTrPNPhOACLcBGAsYHQ/s400/Manage%2BMetadata%2Bweb%2Bservice%2Bstaring.png" width="400" /></a></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
So again I ran the command (From SharePoint PowerShell)</div>
<div style="text-align: left;">
<br />
<br /></div>
<div style="background-color: #141414; border-bottom: rgb(0 , 0 , 255) 2px solid; border-left: rgb(0 , 0 , 255) 2px solid; border-right: rgb(0 , 0 , 255) 2px solid; border-top: rgb(0 , 0 , 255) 2px solid; color: white; font-stretch: normal; font: 16px / 1.4 "courier new" , "andale mono" , "courier" , monospace; padding-left: 6px;">
<div class="MsoNormal" style="text-align: left; unicode-bidi: embed;">
Get-SPServiceInstance
-Server SERVERNAME| where-object {$_.TypeName -eq "Managed
Metadata Web Service"} | Start-SPServiceInstance -confirm:$false >
$null<span dir="RTL" lang="HE" style="font-family: "times new roman" , serif;"><o:p></o:p></span></div>
</div>
<div style="text-align: left;">
<br />
And I got the Error</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-KZ5stTm-WtA/XuizUegGIzI/AAAAAAABTBw/PLVVEYmQBrIzzlX6Lt2BW6iTzaeRTmbbgCLcBGAsYHQ/s1600/Get-SPServiceInstance.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="407" data-original-width="674" height="241" src="https://1.bp.blogspot.com/-KZ5stTm-WtA/XuizUegGIzI/AAAAAAABTBw/PLVVEYmQBrIzzlX6Lt2BW6iTzaeRTmbbgCLcBGAsYHQ/s400/Get-SPServiceInstance.png" width="400" /></a></div>
<span id="goog_1685827769"></span><span id="goog_1685827770"></span><br /></div>
<div style="text-align: left;">
</div>
<div style="background-color: #141414; border-bottom: rgb(0 , 0 , 255) 2px solid; border-left: rgb(0 , 0 , 255) 2px solid; border-right: rgb(0 , 0 , 255) 2px solid; border-top: rgb(0 , 0 , 255) 2px solid; color: white; font-stretch: normal; font: 16px / 1.4 "courier new" , "andale mono" , "courier" , monospace; padding-left: 6px;">
Start-SPServiceInstance
: An object of the type Microsoft.SharePoint.Administration.SPServiceInstanceJobDefinition
named "job-service-instance-ba7339e3-fb42-49c4-ac66-ab08e84eae0f"
already exists under the parent Microsoft.SharePoint.Administration.SPTimerService
named "SPTimerV4". Rename your object or delete the existing
object. At line:1 char:111 + ... eb Service"} | Start-SPServiceInstance
-confirm:$false > $null +
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +
CategoryInfo :
InvalidData: (Microsoft.Share...ServiceInstance:
SPCmdletStartServiceInstance) [Start-SPServiceInstance],
SPDuplicateObject Exception +
FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletStartSer
viceInstance</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
I deleted the job</div>
<div style="text-align: left;">
<br /></div>
<div style="background-color: #141414; border-bottom: rgb(0 , 0 , 255) 2px solid; border-left: rgb(0 , 0 , 255) 2px solid; border-right: rgb(0 , 0 , 255) 2px solid; border-top: rgb(0 , 0 , 255) 2px solid; color: white; font-stretch: normal; font: 16px / 1.4 "courier new" , "andale mono" , "courier" , monospace; padding-left: 6px;">
$jobToDelete
= Get-SPTimerJob | ? { $_.name -eq
"job-service-instance-ba7339e3-fb42-49c4-ac66-ab08e84eae0f" }<span style="font-family: "times new roman" , serif;"><o:p></o:p></span></div>
<div style="background-color: #141414; border-bottom: rgb(0 , 0 , 255) 2px solid; border-left: rgb(0 , 0 , 255) 2px solid; border-right: rgb(0 , 0 , 255) 2px solid; border-top: rgb(0 , 0 , 255) 2px solid; color: white; font-stretch: normal; font: 16px / 1.4 "courier new" , "andale mono" , "courier" , monospace; padding-left: 6px;">
<span dir="RTL" lang="HE" style="font-family: "times new roman" , serif;"><o:p> </o:p></span>$jobToDelete.Delete()</div>
<div style="text-align: left;">
<br />
<br /></div>
<div style="text-align: left;">
You tried to stop again</div>
<div style="text-align: left;">
<br /></div>
<div style="background-color: #141414; border-bottom: rgb(0 , 0 , 255) 2px solid; border-left: rgb(0 , 0 , 255) 2px solid; border-right: rgb(0 , 0 , 255) 2px solid; border-top: rgb(0 , 0 , 255) 2px solid; color: white; font-stretch: normal; font: 16px / 1.4 "courier new" , "andale mono" , "courier" , monospace; padding-left: 6px;">
Stop-SPServiceInstance
-Identity ba7339e3-fb42-49c4-ac66-ab08e84eae0f</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
But I also got the job stuck - Deleting it again </div>
<div style="text-align: left;">
<br /></div>
<div style="background-color: #141414; border-color: rgb(0, 0, 255); border-style: solid; border-width: 2px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.4; padding-left: 6px;">
<div style="color: white; font-family: "courier new", "andale mono", courier, monospace; font-size: 16px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: normal;">
<span dir="RTL" lang="HE" style="font-family: "arial" , sans-serif;">$</span>jobToDelete
= Get-SPTimerJob | ? { $_.name -eq
"job-service-instance-ba7339e3-fb42-49c4-ac66-ab08e84eae0f<span dir="RTL"></span><span dir="RTL"></span><span dir="RTL" lang="HE" style="font-family: "arial" , sans-serif;"><span dir="RTL"></span><span dir="RTL"></span>" }</span><span style="font-family: "times new roman" , serif;"><o:p></o:p></span></div>
<span dir="RTL" lang="HE" style="color: white; font-family: arial, sans-serif;">$jobToDelete.Delete()</span></div>
<div style="text-align: left;">
</div>
<div class="MsoNormal" style="text-align: left; unicode-bidi: embed;">
<span dir="RTL" lang="HE" style="font-family: "arial" , sans-serif;"><br /></span></div>
<div class="MsoNormal" style="text-align: left; unicode-bidi: embed;">
<span dir="RTL" lang="HE"><span style="font-family: "arial" , sans-serif;">I stopped timerJob on the server </span></span></div>
<div class="MsoNormal" style="text-align: left; unicode-bidi: embed;">
<span dir="RTL" lang="HE"><span style="font-family: "arial" , sans-serif;"><br /></span></span></div>
<div class="MsoNormal" style="text-align: left; unicode-bidi: embed;">
<span dir="RTL" lang="HE"><span style="font-family: "arial" , sans-serif;">Then I tried a different way</span></span><br />
<span dir="RTL" lang="HE"><span style="font-family: "arial" , sans-serif;"><br /></span></span>
<br />
<div style="background-color: #141414; border-bottom: rgb(0 , 0 , 255) 2px solid; border-left: rgb(0 , 0 , 255) 2px solid; border-right: rgb(0 , 0 , 255) 2px solid; border-top: rgb(0 , 0 , 255) 2px solid; color: white; font-stretch: normal; font: 16px / 1.4 "courier new" , "andale mono" , "courier" , monospace; padding-left: 6px;">
<span dir="RTL" lang="HE" style="font-family: "arial" , sans-serif;">$</span>service =
Get-SPServiceInstance -Identity ba7339e3-fb42-49c4-ac66-ab08e84eae0f<span style="font-family: "times new roman" , serif;"><o:p></o:p></span></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<br />
<br /></div>
<div style="background-color: #141414; border-color: rgb(0, 0, 255); border-style: solid; border-width: 2px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.4; padding-left: 6px;">
<div style="color: white; font-family: "courier new", "andale mono", courier, monospace; font-size: 16px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: normal;">
<span dir="RTL" lang="HE" style="font-family: "arial" , sans-serif;">$</span>service.unprovision<span dir="RTL"></span><span dir="RTL"></span><span dir="RTL" lang="HE" style="font-family: "arial" , sans-serif;"><span dir="RTL"></span><span dir="RTL"></span>()</span><o:p></o:p></div>
<span style="color: white; font-family: arial, sans-serif;">$service.update()</span><br />
<span style="color: white; font-family: arial, sans-serif;">iisreset /noforce</span></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<span dir="RTL" lang="HE" style="font-family: "arial" , sans-serif;"><br /></span></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-zW1FFxOYado/Xui0_A9Bs9I/AAAAAAABTB8/kgmBBD6PIvQm9Dm7C6JHsgK6B518KaCBwCLcBGAsYHQ/s1600/provition.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="475" data-original-width="677" height="280" src="https://1.bp.blogspot.com/-zW1FFxOYado/Xui0_A9Bs9I/AAAAAAABTB8/kgmBBD6PIvQm9Dm7C6JHsgK6B518KaCBwCLcBGAsYHQ/s400/provition.png" width="400" /></a></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<br /></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<br /></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
I was waiting to see that he was really disabled</div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<br />
<br />
<div style="background-color: #141414; border-color: rgb(0, 0, 255); border-style: solid; border-width: 2px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.4; padding-left: 6px;">
<div style="color: white; font-family: "courier new", "andale mono", courier, monospace; font-size: 16px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: normal;">
<span dir="RTL" lang="HE" style="font-family: "arial" , sans-serif;">$</span>service.provision<span dir="RTL"></span><span dir="RTL"></span><span dir="RTL" lang="HE" style="font-family: "arial" , sans-serif;"><span dir="RTL"></span><span dir="RTL"></span>()</span></div>
<span style="color: white; font-family: arial, sans-serif;">$service.update()</span><br />
<span style="color: white; font-family: arial, sans-serif;">iisreset /noforce</span></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<o:p></o:p></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<span dir="RTL"></span><br /></div>
</div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<br /></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
I turned on the TimerJob</div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<br /></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
And It works :)</div>
</div>
</div>
Roi kolbingerhttp://www.blogger.com/profile/10947614481622890502noreply@blogger.com0tag:blogger.com,1999:blog-3469866748059699775.post-31603578094121201382019-03-21T11:12:00.000+02:002019-03-21T11:12:30.694+02:00Restore Problem "Restore-SPSite : The extension <div dir="ltr" style="text-align: left;" trbidi="on">
Next article - User's responsibility only!<br />
<br />
Years ago, I saw something in one of the blogs ... but I did not find any mention of it today (maybe Microsoft asked to delete the article because ...).<br />
<br />
<br />
I tried to migrate a DataBase between two environments, but I was told the versions did not match. Probably updates winsows<br />
<br />
Then I'll try through the power shell<br />
<br />
<div style="background-attachment: scroll; background-color: #eeeeee; background-image: none; background-repeat: repeat; border-bottom: rgb(136 , 136 , 136) 1pt solid; border-left: rgb(136 , 136 , 136) 1pt solid; border-right: rgb(136 , 136 , 136) 1pt solid; border-top: rgb(136 , 136 , 136) 1pt solid; padding-bottom: 2pt; padding-left: 2pt; padding-right: 2pt; padding-top: 2pt;">
restore-spacesite</div>
<br />
But I got the following error<br />
<br />
<div style="background-color: #141414; border-bottom: rgb(0 , 0 , 255) 2px solid; border-left: rgb(0 , 0 , 255) 2px solid; border-right: rgb(0 , 0 , 255) 2px solid; border-top: rgb(0 , 0 , 255) 2px solid; color: white; font-stretch: normal; font: 16px / 1.4 "courier new" , "andale mono" , "courier" , monospace; padding-left: 6px;">
Restore Problem "Restore-SPSite: The extension Microsoft.Office.Project.Server.Database.Extension.ProjectDatabaseExtension is version VVVV, and the backup was on version VVV These versions are incompatible.</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-33sddGwC3uQ/XJNRMZtr29I/AAAAAAAA6Xs/O-YZHnySgPEeiziPoW9Pb4Y-tBprJwyGQCLcBGAs/s1600/restore-spsite.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="343" data-original-width="677" height="202" src="https://1.bp.blogspot.com/-33sddGwC3uQ/XJNRMZtr29I/AAAAAAAA6Xs/O-YZHnySgPEeiziPoW9Pb4Y-tBprJwyGQCLcBGAs/s400/restore-spsite.png" width="400" /></a></div>
<br />
<br />
So what did I do?<br />
<br />
Do a backup before ... may be you will need it<br />
<br />
I opened the file in binary editor. In Visual Studio -> open file<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-dmk9aRYgUT8/XJNR5xqUy4I/AAAAAAAA6X0/Z9Au7sf1tuQprcUh8VGFuLsOlc1yiXiJgCLcBGAs/s1600/open_file.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="400" data-original-width="622" height="256" src="https://1.bp.blogspot.com/-dmk9aRYgUT8/XJNR5xqUy4I/AAAAAAAA6X0/Z9Au7sf1tuQprcUh8VGFuLsOlc1yiXiJgCLcBGAs/s400/open_file.png" width="400" /></a></div>
<br />
Open With<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-QKOZsP0RfFY/XJNSDptg00I/AAAAAAAA6X4/Foxaki91UUINYqhtQlWA3eCB8MiHF7vzgCLcBGAs/s1600/open_with.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="127" data-original-width="694" height="72" src="https://2.bp.blogspot.com/-QKOZsP0RfFY/XJNSDptg00I/AAAAAAAA6X4/Foxaki91UUINYqhtQlWA3eCB8MiHF7vzgCLcBGAs/s400/open_with.png" width="400" /></a></div>
<br />
Open as binary file editor<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-gx-SNiHRYlI/XJNSxVFqd_I/AAAAAAAA6YM/gFmom9qGaFUS86mZLu6QAd3LpI1b9cUFACLcBGAs/s1600/binary_editor.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="377" data-original-width="576" height="261" src="https://2.bp.blogspot.com/-gx-SNiHRYlI/XJNSxVFqd_I/AAAAAAAA6YM/gFmom9qGaFUS86mZLu6QAd3LpI1b9cUFACLcBGAs/s400/binary_editor.png" width="400" /></a></div>
<br />
<br />
And find the wrong virsion<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-vcSTvi0O694/XJNSmtQc6yI/AAAAAAAA6YI/1m5FAWKDyL08ZEM7gOTfEg-5KW_lt578gCLcBGAs/s1600/search%2Bbinary%2Bfile.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="368" data-original-width="982" height="148" src="https://4.bp.blogspot.com/-vcSTvi0O694/XJNSmtQc6yI/AAAAAAAA6YI/1m5FAWKDyL08ZEM7gOTfEg-5KW_lt578gCLcBGAs/s400/search%2Bbinary%2Bfile.png" width="400" /></a></div>
<br />
<br />
Now replace the number to your current virsion<br />
<br />
And try to run the command again (Restore-SPSite)<br />
<br />
For me it work ... hope for you too ... if you did not return the backup<br />
<br />
<br />
<br /></div>
Roi kolbingerhttp://www.blogger.com/profile/10947614481622890502noreply@blogger.com0tag:blogger.com,1999:blog-3469866748059699775.post-16196428058133424282017-02-27T09:00:00.000+02:002017-02-27T09:00:09.136+02:00Converting SharePoint site from Version 2013 to 2016<div dir="ltr" style="text-align: left;" trbidi="on">
In this time Microsoft did a good job with Migration SharePoint 2013 to SharePoint 2016, and within a few hours it is possible to upgrade the site from 2013 to 2016<br />
Even the code in Visual Studio was easy to upgrade fron VS 2013 to VS 2015 update 3 with Office package<br />
<br />
I did this steps<br />
<ol style="text-align: left;">
<li> Save wsp website (version 2013)</li>
<li>Copy (backup restore) the DataBase from SQL 2012 DB 2016, and to ensure that it has sp admin privileges DB_Owner to the new DB</li>
<li>In Central Adminstration -> Manage web applications<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-CKeyW4MJpcw/WLPJqxW51oI/AAAAAAAAf3E/BKdt9G0-GycwF0otkvmAcv5pNzNE0L0lACLcB/s1600/Central%2BAdminstration%2BSharePoint%2B2016.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="270" src="https://3.bp.blogspot.com/-CKeyW4MJpcw/WLPJqxW51oI/AAAAAAAAf3E/BKdt9G0-GycwF0otkvmAcv5pNzNE0L0lACLcB/s400/Central%2BAdminstration%2BSharePoint%2B2016.png" width="400" /></a></div>
<br />a. Creating a Web Application with DB temporary<br />b. Create a Site Collection<br />c. Setting up the site in the hosts found in the C:\Windows\System32\drivers\etc\ with a local IP</li>
<li> Add the wsp site (Old from 2013)<br />a. In powerShell -> Add-SPSolution -LiteralPath PATH<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-KyTvPOONQrU/WLPK-q5mbvI/AAAAAAAAf3Q/Q-69htiFtSMpnt9ksm9G7FgIZCe76A_3gCEw/s1600/PowerShell%2BSharePoint%2B2016.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="41" src="https://2.bp.blogspot.com/-KyTvPOONQrU/WLPK-q5mbvI/AAAAAAAAf3Q/Q-69htiFtSMpnt9ksm9G7FgIZCe76A_3gCEw/s400/PowerShell%2BSharePoint%2B2016.png" width="400" /></a></div>
b. Installing the solotion site (or in powerShell -> Install-SPSolution or in Central Adminstration -> System Settings -> Manage farm solutions)</li>
<li>Remove the temporary DB site (in Central Adminstration -> Application Management -> Databases -> Manage content databases DB click on the question and select the Remove content database and click OK)</li>
<li>Temporarily connect the DB from 2013 (Test-Mount-SPContentDatabase "DB_FROM_2013" -WebApplication "NEW_WEB_APP" in powershell)</li>
<li>If it is good then, connect the DB from 2013 (Mount-SPContentDatabase "DB_FROM_2013" -WebApplication "NEW_WEB_APP" in powershell)</li>
<li>Run Upgrade-SPSite -VersionUpgrade in powerShell</li>
<li>In your own time, Do a Conversion of the wsp from 2013 to 2016 (Big code works great, this is becuse Microsoft didn't change the mapping of layouts folder - it still 15)</li>
<li>Good Luck :)</li>
</ol>
</div>
Roi kolbingerhttp://www.blogger.com/profile/10947614481622890502noreply@blogger.com0tag:blogger.com,1999:blog-3469866748059699775.post-44228364075224035782016-01-20T08:08:00.000+02:002016-01-20T08:08:28.471+02:00The URL is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web at SharePoint<div dir="ltr" style="text-align: left;" trbidi="on">
I recently had the following error when I tried to add a document to a document library.<br />
<br />
<blockquote style="background-attachment: scroll; background-color: #eeeeee; background-image: none; background-repeat: repeat; border-bottom: rgb(136 , 136 , 136) 1pt solid; border-left: rgb(136 , 136 , 136) 1pt solid; border-right: rgb(136 , 136 , 136) 1pt solid; border-top: rgb(136 , 136 , 136) 1pt solid; padding-bottom: 2pt; padding-left: 2pt; padding-right: 2pt; padding-top: 2pt;">
The URL <file name> <file name=""> is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web. </file></blockquote>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-FTth8jlzV4w/Vp8fAoxdUOI/AAAAAAAAUOU/2vD5hYWKAZQ/s1600/The%2BURL%2B%2Bis%2Binvalid.%2B-%2Berror.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="173" src="http://4.bp.blogspot.com/-FTth8jlzV4w/Vp8fAoxdUOI/AAAAAAAAUOU/2vD5hYWKAZQ/s400/The%2BURL%2B%2Bis%2Binvalid.%2B-%2Berror.png" width="400" /></a></div>
<file name=""><br /></file>
<file name=""><br /></file>
<file name=""><br /></file>
<file name="">A quick search on google said that brought the resources of SQL Server.</file>I checked and indeed I increased the resources but to no avail.<br />
<file name="">Even my examination chrome and Internet Explorer.
I checked Word file, PDF, and even a small text file.
A. </file><br />
<file name="">Nothing helped.</file><br />
<file name="">I opened a new document library, and in fact it could add document :) </file><br />
<file name=""><br /></file>
<file name="">Ok ... what is the problem ??? </file><br />
<file name=""><br /></file>
<file name="">It should be noted in the document library came from List Definition and Content Type preset.</file><br />
<file name="">I started to check each field and field
Then I got a Date Field in the file probably was not his elemet.xml incubated right. </file><br />
<file name=""><br /></file>
<file name="">When I set it to Today date .... it worked </file><br />
<file name=""><br /></file>
<file name="">All it needed was simply to write the true definition of the field </file><br />
<file name=""><br /></file>
<file name="">Hope I helped,</file><br />
<file name="">Roi</file></div>
Roi kolbingerhttp://www.blogger.com/profile/10947614481622890502noreply@blogger.com0tag:blogger.com,1999:blog-3469866748059699775.post-51194414879358963632015-04-17T15:18:00.000+03:002015-04-17T15:21:29.650+03:00SharePoint 2013 - Get Item Url by REST API and Ajax<div dir="ltr" style="text-align: left;" trbidi="on">
Hey,<br />
<br />
This time I will present code to get client-side item<br />
<br />
<div style="background-attachment: scroll; background-color: #eeeeee; background-image: none; background-repeat: repeat; border-bottom: rgb(136,136,136) 1pt solid; border-left: rgb(136,136,136) 1pt solid; border-right: rgb(136,136,136) 1pt solid; border-top: rgb(136,136,136) 1pt solid; padding-bottom: 2pt; padding-left: 2pt; padding-right: 2pt; padding-top: 2pt;">
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<span style="color: blue; font-family: Consolas; font-size: 10pt;">var</span><span style="font-family: Consolas; font-size: 10pt;"> urlRequest = RoiGetItemUrl(item, listName, rootUrl);<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> urlRequest.done(<span style="color: blue;">function</span> (data, textStatus, jqXHR) {<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> <span style="color: blue;">var</span> path = <span style="color: #a31515;">""</span>;<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> jQuery.each(data.d.results, <span style="color: blue;">function</span> (i, result) {<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> path = result.EncodedAbsUrl;<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> });<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> console.log(<span style="color: #a31515;">"Item path is " </span>+ path);<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> });<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> urlRequest.fail(<span style="color: blue;">function</span> (jqXHR, textStatus, errorThrown) {<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> RoiFailHandler(jqXHR, textStatus, errorThrown, state, fileUploadFailMessage);<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> });<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<span style="color: green; font-family: Consolas; font-size: 10pt;">// Return the link item url</span><span style="font-family: Consolas; font-size: 10pt;"><u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<span style="color: blue; font-family: Consolas; font-size: 10pt;">function</span><span style="font-family: Consolas; font-size: 10pt;"> RoiGetItemUrl(item, listName, rootUrl)<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;">{<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> <span style="color: blue;">var</span> call = jQuery.ajax({<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> url: rootUrl + <span style="color: #a31515;">"/_api/Web/Lists/getByTitle('"</span> + listName + <span style="color: #a31515;">"')/Items?$select=<wbr></wbr>EncodedAbsUrl&$filter=Id eq "</span> + item.Id,<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> type: <span style="color: #a31515;">"GET"</span>,<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> dataType: <span style="color: #a31515;">"json"</span>,<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> headers: {<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> Accept: <span style="color: #a31515;">"application/json;odata=<wbr></wbr>verbose"</span><u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> }<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> });<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> <span style="color: blue;">return</span> call;<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;">}<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<span style="color: green; font-family: Consolas; font-size: 10pt;">// Handler with error event</span><span style="font-family: Consolas; font-size: 10pt;"><u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<span style="color: blue; font-family: Consolas; font-size: 10pt;">function</span><span style="font-family: Consolas; font-size: 10pt;"> RoiFailHandler(jqXHR, textStatus, errorThrown, state, fileUploadFailMessage) {<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> <span style="color: blue;">try</span> {<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> <span style="color: blue;">var</span> response = JSON.parse(jqXHR.responseText)<wbr></wbr>;<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> <span style="color: blue;">var</span> message = response ? response.error.message.value : textStatus;<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> console.log(<span style="color: #a31515;">"Call failed. Error "</span> + message);<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> }<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> <span style="color: blue;">catch</span> (e) {<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> console.log(<span style="color: #a31515;">"Error "</span> + e.message);<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> }<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> <u></u><u></u></span></div>
<code>
</code>
<br />
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;">}</span></div>
</div>
<br />
Yours,<br />
Roi<br />
<br /></div>
Roi kolbingerhttp://www.blogger.com/profile/10947614481622890502noreply@blogger.com0tag:blogger.com,1999:blog-3469866748059699775.post-58929402563508835202014-09-24T16:19:00.001+03:002014-09-24T16:20:56.338+03:00Delete SharePoint List by force with PowerShell<div dir="ltr" style="text-align: left;" trbidi="on">
if cannot delete your SharePoint list<br />
<br />
try this PowerShell code - it will delete your list<br />
<br />
<div style="background-attachment: scroll; background-color: #eeeeee; background-image: none; background-repeat: repeat; border-bottom: rgb(136,136,136) 1pt solid; border-left: rgb(136,136,136) 1pt solid; border-right: rgb(136,136,136) 1pt solid; border-top: rgb(136,136,136) 1pt solid; padding-bottom: 2pt; padding-left: 2pt; padding-right: 2pt; padding-top: 2pt;">
<code>
</code>
<br />
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<code><span style="color: purple; font-family: 'Courier New'; font-size: 10pt;">$web</span><span style="color: black; font-family: 'Courier New'; font-size: 10pt;"> </span><span style="color: red; font-family: 'Courier New'; font-size: 10pt;">=</span><span style="color: black; font-family: 'Courier New'; font-size: 10pt;"> </span><b><span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;">Get-SPWeb</span></b><span style="color: black; font-family: 'Courier New'; font-size: 10pt;"> <a href="http://www.mysite.com/" style="color: #1155cc;" target="_blank">http://www.mysite.com</a><u></u><u></u></span></code></div>
<code>
</code>
<br />
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<code><span style="color: purple; font-family: 'Courier New'; font-size: 10pt;">$guid</span><span style="color: black; font-family: 'Courier New'; font-size: 10pt;"> </span><span style="color: red; font-family: 'Courier New'; font-size: 10pt;">=</span><span style="color: black; font-family: 'Courier New'; font-size: 10pt;"> [</span><span style="color: teal; font-family: 'Courier New'; font-size: 10pt;">Guid</span><span style="color: black; font-family: 'Courier New'; font-size: 10pt;">]</span><span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;">"a07a5c37-0f7c-423d-<wbr></wbr>846a-e9e525f7a8b7"</span><span style="color: black; font-family: 'Courier New'; font-size: 10pt;"><u></u><u></u></span></code></div>
<code>
</code>
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<code><span style="color: purple; font-family: 'Courier New'; font-size: 10pt;">$list</span><span style="color: black; font-family: 'Courier New'; font-size: 10pt;"> </span><span style="color: red; font-family: 'Courier New'; font-size: 10pt;">=</span><span style="color: black; font-family: 'Courier New'; font-size: 10pt;"> </span><span style="color: purple; font-family: 'Courier New'; font-size: 10pt;">$web</span><span style="color: black; font-family: 'Courier New'; font-size: 10pt;">.</span><span style="color: saddlebrown; font-family: 'Courier New'; font-size: 10pt;">Lists</span><span style="color: black; font-family: 'Courier New'; font-size: 10pt;">[</span><span style="color: purple; font-family: 'Courier New'; font-size: 10pt;">$guid</span><span style="color: black; font-family: 'Courier New'; font-size: 10pt;">]<u></u><u></u></span></code></div>
<code>
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<span style="color: purple; font-family: 'Courier New'; font-size: 10pt;">$list</span><span style="color: black; font-family: 'Courier New'; font-size: 10pt;">.</span><span style="color: saddlebrown; font-family: 'Courier New'; font-size: 10pt;">AllowDeletion</span><span style="color: black; font-family: 'Courier New'; font-size: 10pt;"> </span><span style="color: red; font-family: 'Courier New'; font-size: 10pt;">=</span><span style="color: black; font-family: 'Courier New'; font-size: 10pt;"> </span><span style="color: purple; font-family: 'Courier New'; font-size: 10pt;">$true</span><span style="color: black; font-family: 'Courier New'; font-size: 10pt;"><u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<span style="color: purple; font-family: 'Courier New'; font-size: 10pt;">$list</span><span style="color: black; font-family: 'Courier New'; font-size: 10pt;">.</span><span style="color: saddlebrown; font-family: 'Courier New'; font-size: 10pt;">Update</span><span style="color: black; font-family: 'Courier New'; font-size: 10pt;">()<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<span style="color: purple; font-family: 'Courier New'; font-size: 10pt;">$list</span><span style="color: black; font-family: 'Courier New'; font-size: 10pt;">.</span><span style="color: saddlebrown; font-family: 'Courier New'; font-size: 10pt;">Delete</span><span style="color: black; font-family: 'Courier New'; font-size: 10pt;">()<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
<span style="color: purple; font-family: 'Courier New'; font-size: 10pt;">$web</span><span style="color: black; font-family: 'Courier New'; font-size: 10pt;">.</span><span style="color: saddlebrown; font-family: 'Courier New'; font-size: 10pt;">Dispose</span><span style="color: black; font-family: 'Courier New'; font-size: 10pt;">()</span></div>
</code>
</div>
<br />
Your,<br />
Roi</div>
Roi kolbingerhttp://www.blogger.com/profile/10947614481622890502noreply@blogger.com0tag:blogger.com,1999:blog-3469866748059699775.post-9549070868292828532013-12-21T16:15:00.000+02:002013-12-21T16:15:05.612+02:00An error occurred while processing this request<div dir="ltr" style="text-align: left;" trbidi="on">
I recently started to develop a web form with knockout JS. The system is running on SharePoint 2010. The data given / taken to the form with JSON through WCF services.<br />
<br />
I had a problem, I did not want that the service will be expose to web. To prevent exposure, created casing in the SharePoint an Application Page.<br />
<br />
The WCF data services and any entity framework written in framework 4.5, and as you know that SharePoint 2010 and with the Application Page written in 3.5.<br />
<br />
This means that every reference to in the form of entity framework like linq or lambda expressions written in framework 3.5 - which created (and still creates) a lot of problems.<br />
<br />
I will present you one example of the problem we encounter - but Google unfortunately did not help.<br />
<br />
The following code in FW3.5 not working in Client Data Service<br />
<br />
<div style="background-attachment: scroll; background-color: #eeeeee; background-image: none; background-repeat: repeat; border-bottom: rgb(136,136,136) 1pt solid; border-left: rgb(136,136,136) 1pt solid; border-right: rgb(136,136,136) 1pt solid; border-top: rgb(136,136,136) 1pt solid; padding-bottom: 2pt; padding-left: 2pt; padding-right: 2pt; padding-top: 2pt;">
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white; color: blue; font-family: Consolas; font-size: 12.0pt; mso-highlight: white;">if</span><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 12pt;"> (ctx != </span><span style="background: white; color: blue; font-family: Consolas; font-size: 12.0pt; mso-highlight: white;">null</span><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 12pt;"> && ctx.UsersContext != </span><span style="background: white; color: blue; font-family: Consolas; font-size: 12.0pt; mso-highlight: white;">null</span><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 12pt;">)</span><br />
<span style="background-color: white; font-family: Consolas; font-size: 12pt;">{</span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white; font-family: Consolas; font-size: 12.0pt; mso-highlight: white;"> </span><span style="background: white; color: blue; font-family: Consolas; font-size: 12.0pt; mso-highlight: white;">string</span><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 12pt;"> username = </span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 12.0pt; mso-highlight: white;">"username"</span><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 12pt;">;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 12pt;"> </span><span style="background: white; color: blue; font-family: Consolas; font-size: 12.0pt; mso-highlight: white;">var</span><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 12pt;"> userList = ctx.UsersContext.Where(z => z.Code == username).AsEnumerable().ToList();<o:p></o:p></span></div>
<span style="background-color: white; font-family: Consolas; font-size: 12pt; line-height: 115%;">}</span></div>
<br />
I even tried Windows Application purpose to see that the SP does not hurt me<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-MBaU9Sg96Yw/UrWeW3FH6xI/AAAAAAAAHV8/DJTpyZWPMA4/s1600/windows+applicaton.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="310" src="http://4.bp.blogspot.com/-MBaU9Sg96Yw/UrWeW3FH6xI/AAAAAAAAHV8/DJTpyZWPMA4/s400/windows+applicaton.png" width="400" /></a></div>
<br />
<br />
The Error Massage was:<br />
<br />
<div style="background-color: #141414; border-bottom: rgb(0,0,255) 2px solid; border-left: rgb(0,0,255) 2px solid; border-right: rgb(0,0,255) 2px solid; border-top: rgb(0,0,255) 2px solid; color: white; font-size-adjust: none; font-stretch: normal; font: 16px/1.4 'courier new', 'Andale Mono', courier, monospace; padding-left: 6px;">
An error occurred while processing this request<br />
<br />
"<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?><error xmlns=\"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata\"><code></code><message xml:lang=\"en-US\">The MaxDataServiceVersion '1.0' is too low for the response. The lowest supported version is '2.0'.</message></error>"<br />
<div>
</div>
<br /></div>
<div>
<br /></div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-_nt0P_vtIU4/UrWevVfkIJI/AAAAAAAAHWE/8XrFZtt0EOc/s1600/An+error+occurred+while+processing+this+request.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="70" src="http://1.bp.blogspot.com/-_nt0P_vtIU4/UrWevVfkIJI/AAAAAAAAHWE/8XrFZtt0EOc/s400/An+error+occurred+while+processing+this+request.png" width="400" /></a></div>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-mRAGJOP5I5M/UrWe8T352EI/AAAAAAAAHWM/FO8o1alnSoU/s1600/An+error+occurred+while+processing+this+reques+2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="355" src="http://2.bp.blogspot.com/-mRAGJOP5I5M/UrWe8T352EI/AAAAAAAAHWM/FO8o1alnSoU/s400/An+error+occurred+while+processing+this+reques+2.png" width="400" /></a></div>
<br />
<br />
I'll not go with you all the way I went through hardships<br />
<br />
The problem is development server and production server does not always match (which always advisable to have :)).<br />
One Development server was windows Server 2008 R2 which was the error. And another was a windows server 2008 R2 <b>SP1</b><br />
<br />
Of course I did not notice until the solution - I only need to install Windows 2008 r2 SP1<br />
<br />
Soon I will try to give you a few more problems cropped up this complex project,<br />
Roi</div>
<br /></div>
Roi kolbingerhttp://www.blogger.com/profile/10947614481622890502noreply@blogger.com0tag:blogger.com,1999:blog-3469866748059699775.post-23987284845181647962013-09-22T14:50:00.000+03:002015-04-17T15:20:26.153+03:00How to open a PDF file (or any file) in the sharepoint site<div dir="ltr" style="text-align: left;" trbidi="on">
Not long ago, I had to view a <b>PDF </b>file from <b>sharepoint</b>. But I got the following message:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-Bn5g5z4Pkhw/Uj7VgknqB_I/AAAAAAAAHTs/iLbf6gfqUh4/s1600/save.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-Bn5g5z4Pkhw/Uj7VgknqB_I/AAAAAAAAHTs/iLbf6gfqUh4/s400/save.png" height="23" width="400" /></a></div>
<br />
Do you want to save file-name from yours-site<br />
<br />
Who does not know this message? But I've target '<b>self</b>' in 'a' tag html????<br />
<br />
It turns out that SharePoint having your code to protect customers. They can only give you their familiar software like Office, but a pdf file - Microsoft unfamiliar terms.<br />
<br />
To resolve, you need to make a change in <b>Central-Admin</b><br />
<br />
Go to your Web Application manage - <b>General Setting</b><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-Dq_Gi3HNlpc/Uj7XM9kxC0I/AAAAAAAAHT4/iNsBtJQQ4EI/s1600/general+settings.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-Dq_Gi3HNlpc/Uj7XM9kxC0I/AAAAAAAAHT4/iNsBtJQQ4EI/s1600/general+settings.png" /></a></div>
<br />
Find<b> Browser File Handling</b> and Change the default to <b>Strict</b>.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-1TzPQfHXWS8/Uj7X1NhtWTI/AAAAAAAAHUA/D5mELgxgPPk/s1600/browser+file+handling.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-1TzPQfHXWS8/Uj7X1NhtWTI/AAAAAAAAHUA/D5mELgxgPPk/s400/browser+file+handling.png" height="400" width="291" /></a></div>
<br />
It all friends, now you can view any file on the portal (at your own risk).<br />
<br />
Your,<br />
Roi</div>
Roi kolbingerhttp://www.blogger.com/profile/10947614481622890502noreply@blogger.com0tag:blogger.com,1999:blog-3469866748059699775.post-8679277848948423822013-08-29T20:03:00.000+03:002013-08-29T20:03:55.603+03:00Service Pack 2 (SP2) for Microsoft SharePoint 2010 and Office 2010<div dir="ltr" style="text-align: left;" trbidi="on">
Last month came new version (Service Pack 2) for Office 2010, SharePoint 2010, Project server 2010 and the Fast 2010.<br />
<br />
Here are some links that will help you<br />
<br />
Service Pack 2 for Microsoft Office 2010 (KB2687455) 32-Bit Edition<br />
<a href="http://www.microsoft.com/en-us/download/details.aspx?id=39667">http://www.microsoft.com/en-us/download/details.aspx?id=39667</a><br />
<br />
Service Pack 2 for Microsoft Office 2010 (KB2687455) 64-Bit Edition<br />
<a href="http://www.microsoft.com/en-us/download/details.aspx?id=39647">http://www.microsoft.com/en-us/download/details.aspx?id=39647</a><br />
<br />
Note:<i> In addition to the products in the Office 2010 suite, service pack 2687455 also updates Microsoft Project 2010, Microsoft Visio 2010, and Microsoft SharePoint Designer 2010</i><br />
<br />
Service Pack 2 (SP2) for Microsoft SharePoint Server 2010 (KB2687453)<br />
<a href="http://www.microsoft.com/he-il/download/details.aspx?id=39672">http://www.microsoft.com/he-il/download/details.aspx?id=39672</a><br />
<br />
Service Pack 2 (SP2) for Microsoft SharePoint Foundation 2010 Language Pack (KB2687466)<br />
<a href="http://www.microsoft.com/he-il/download/details.aspx?id=39674">http://www.microsoft.com/he-il/download/details.aspx?id=39674</a><br />
<br />
Service Pack 2 (SP2) for Microsoft FAST Search Server 2010 for SharePoint (KB2687446)<br />
<a href="http://www.microsoft.com/he-il/download/details.aspx?id=39670">http://www.microsoft.com/he-il/download/details.aspx?id=39670</a><br />
<br />
Service Pack 2 for Microsoft Office Web Apps (KB2687470)<br />
<a href="http://www.microsoft.com/en-us/download/details.aspx?id=39659">http://www.microsoft.com/en-us/download/details.aspx?id=39659</a><br />
<br />
Service Pack 2 for Microsoft SharePoint and Project Server 2010 (KB2687452)<br />
<a href="http://www.microsoft.com/en-us/download/details.aspx?id=39657">http://www.microsoft.com/en-us/download/details.aspx?id=39657</a><br />
<br />
Service Pack 2 for Microsoft Search Server 2010 (KB2687461)<br />
<a href="http://www.microsoft.com/he-il/download/details.aspx?id=39656">http://www.microsoft.com/he-il/download/details.aspx?id=39656</a><br />
<br />
Yours,<br />
Roi<br />
<br /></div>
Roi kolbingerhttp://www.blogger.com/profile/10947614481622890502noreply@blogger.com0tag:blogger.com,1999:blog-3469866748059699775.post-74174277826151937792013-08-23T13:42:00.000+03:002013-08-23T13:42:08.418+03:00Which w3wp process belongs to which App Pool<div dir="ltr" style="text-align: left;" trbidi="on">
Often you wonder which process belongs to which site (in my case usually SharePoint site)? Or maybe you just want to debug only your website on the development server .<br />
<br />
For this we have the <b>appcmd.</b><br />
<br />
all you need is to run this command:<br />
<br />
<div style="background-color: #141414; border-bottom: rgb(0,0,255) 2px solid; border-left: rgb(0,0,255) 2px solid; border-right: rgb(0,0,255) 2px solid; border-top: rgb(0,0,255) 2px solid; color: white; font-size-adjust: none; font-stretch: normal; font: 16px/1.4 'courier new', 'Andale Mono', courier, monospace; padding-left: 6px;">
%windir%\system32\inetsrv\appcmd.exe list wp</div>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-TSsnJfFIyzQ/Uhc7TnEXrfI/AAAAAAAAHTM/8lXdnsoLFPM/s1600/w3wp+process+belongs+app+pool.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="158" src="http://4.bp.blogspot.com/-TSsnJfFIyzQ/Uhc7TnEXrfI/AAAAAAAAHTM/8lXdnsoLFPM/s320/w3wp+process+belongs+app+pool.png" width="320" /></a></div>
<br />
Now you can see who is gobbling sites memory from is id (pid)<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-OvU2eiMmBdM/Uhc7ruKFL5I/AAAAAAAAHTU/EajCVTExWGs/s1600/task+manager+pid+w3wp.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://2.bp.blogspot.com/-OvU2eiMmBdM/Uhc7ruKFL5I/AAAAAAAAHTU/EajCVTExWGs/s320/task+manager+pid+w3wp.png" width="232" /></a></div>
<br />
<br />
Yours,<br />
Roi</div>
Roi kolbingerhttp://www.blogger.com/profile/10947614481622890502noreply@blogger.com2tag:blogger.com,1999:blog-3469866748059699775.post-78436882273837582572013-08-04T05:00:00.000+03:002015-04-17T15:24:17.227+03:00Speedup Powershell at SharePoint 2013<div dir="ltr" style="text-align: left;" trbidi="on">
If you worked in stsadm in <b>MOSS 2007</b> and even if it worked in<b> SharePoint 2010</b>, you saw it slow.<br />
In 2010 we also added the powershell - who was sometimes slow.<br />
<br />
It turns out that in <b>sharepoint 2013</b> not made significant changes - is suggested<br />
<br />
The solutions are<br />
<ol>
<li><b>Add crl.microsoft.com to your hosts file and point it to your local machine</b><br />Go to Start -> Run<br />Click "Drivers" (It need to open "<i>C:\Windows\System32\drivers</i>" - in not go to it)<br />Go to folder "<i>etc</i>" and open "<i>hosts</i>" file with notepad<br />and add this line<br /><i>127.0.0.1 crl.microsoft.com</i><br />Disclosure: this solution find a lot on Google - but my no significant change</li>
<li><b>Disable the CRL check by modifying the registry for all user accounts that use STSADM and all service accounts used by SharePoint.</b><br />Go to Start -> <i>regedit </i>and fund this location <br /><br /><i>[HKEY_USERS\<userid>\Software\Microsoft\Windows\CurrentVersion\WinTrust\Trust Providers\Software Publishing]</i><br /><br />Yon need to change all yours users to <i>“State”=dword:00023e00 </i><br />Click <i>Modify </i>and change it.</li>
</ol>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-j9FrPELgCxE/Ufy822ilN5I/AAAAAAAAHS8/-FPor6nw-xw/s1600/regedit+sharepoint+2013.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-j9FrPELgCxE/Ufy822ilN5I/AAAAAAAAHS8/-FPor6nw-xw/s400/regedit+sharepoint+2013.png" height="400" width="391" /></a></div>
<div>
<br /></div>
<div>
Yours.</div>
<div>
Roi</div>
<div>
<br /></div>
</div>
Roi kolbingerhttp://www.blogger.com/profile/10947614481622890502noreply@blogger.com2tag:blogger.com,1999:blog-3469866748059699775.post-43097016809085492432013-07-04T15:30:00.000+03:002013-07-04T15:30:00.432+03:00Message presented you leave your site<div dir="ltr" style="text-align: left;" trbidi="on">
This time,I present in JavaScript (Jquery) code that checks whether you leave your domain. If so - popup alert to informing you that you are leaving the domain<br />
<br />
<div style="background-attachment: scroll; background-color: #eeeeee; background-image: none; background-repeat: repeat; border-bottom: rgb(136,136,136) 1pt solid; border-left: rgb(136,136,136) 1pt solid; border-right: rgb(136,136,136) 1pt solid; border-top: rgb(136,136,136) 1pt solid; padding-bottom: 2pt; padding-left: 2pt; padding-right: 2pt; padding-top: 2pt;">
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<span style="font-family: Consolas; font-size: 10.0pt;">$(document).ready(<span style="color: blue;">function</span> () {<o:p></o:p></span></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<span style="font-family: Consolas; font-size: 10.0pt;">
$(<span style="color: #a31515;">"a"</span>).click(<span style="color: blue;">function</span>(<span style="color: blue;">event</span>) {<o:p></o:p></span></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<span style="font-family: Consolas; font-size: 10.0pt;">
<span style="color: green;">// check if the target link is your.domain.com</span><o:p></o:p></span></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<span style="font-family: Consolas; font-size: 10.0pt;">
<span style="color: green;">// if not will show alert message</span><o:p></o:p></span></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<span style="font-family: Consolas; font-size: 10.0pt;">
<span style="color: blue;">if</span> (<span style="color: blue;">this</span>.href.indexOf(<span style="color: #a31515;">"your.domian.com"</span>) == -1) {<o:p></o:p></span></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<span style="font-family: Consolas; font-size: 10.0pt;">
<span style="color: blue;">if</span> (<span style="color: blue;">this</span>.href.startsWith(<span style="color: #a31515;">"http"</span>)) {<o:p></o:p></span></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<span style="font-family: Consolas; font-size: 10.0pt;">
<span style="color: blue;">event</span>.preventDefault();<o:p></o:p></span></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<span style="font-family: Consolas; font-size: 10.0pt;">
<span style="color: blue;">var</span> linkLocation = <span style="color: blue;">this</span>.href;<o:p></o:p></span></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<span style="font-family: Consolas; font-size: 10.0pt;">
alert(<span style="color: #a31515;">'</span></span><span dir="RTL" lang="HE" style="color: #a31515; font-family: "Times New Roman","serif"; font-size: 10.0pt;">Note that you are directed to an external site does not belong to this site</span><span dir="LTR"></span><span dir="LTR"></span><span style="color: #a31515; font-family: Consolas; font-size: 10.0pt;"><span dir="LTR"></span><span dir="LTR"></span>'</span><span style="font-family: Consolas; font-size: 10.0pt;">);<o:p></o:p></span></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<span style="font-family: Consolas; font-size: 10.0pt;">
window.open(linkLocation, <span style="color: #a31515;">''</span>);<o:p></o:p></span></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<span style="font-family: Consolas; font-size: 10.0pt;">
<span style="color: blue;">return</span> <span style="color: blue;">false</span>;<o:p></o:p></span></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<span style="font-family: Consolas; font-size: 10.0pt;">
}<o:p></o:p></span></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<span style="font-family: Consolas; font-size: 10.0pt;">
}<o:p></o:p></span></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<span style="font-family: Consolas; font-size: 10.0pt;">
});<o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<span style="font-family: Consolas; font-size: 10.0pt;">});<o:p></o:p></span></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<span style="font-family: Consolas; font-size: 10.0pt;"><br /></span></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-oW9vfMtQXIU/UdPKGN07DnI/AAAAAAAAHSg/j58uf3oycQE/s194/javascipt-alert.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-oW9vfMtQXIU/UdPKGN07DnI/AAAAAAAAHSg/j58uf3oycQE/s194/javascipt-alert.png" /></a></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<span style="font-family: Consolas; font-size: 10.0pt;"><br /></span></div>
<div>
Of course, change the code from "your.domian.com" to your site.</div>
<div>
<br /></div>
<div>
thanks,</div>
<div>
Roi</div>
</div>
Roi kolbingerhttp://www.blogger.com/profile/10947614481622890502noreply@blogger.com0tag:blogger.com,1999:blog-3469866748059699775.post-43959280278896717732013-06-17T20:43:00.002+03:002013-07-03T09:32:14.414+03:00How to set as Secure Store Service in SharePoint 2010<div dir="ltr" style="text-align: left;" trbidi="on">
This time I'll introduce how to install <b>SSS </b>(Secure Store Service) in SharePoint 2010 in 9 Easy Steps (tutorial)<br />
<br />
1. Go to <b>Central Admin</b> -> <b>Application Management</b><br />
On <b>Service Applications</b> link <b>Manage services on server</b><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-EXdA0_IRMZM/Ub9F4k1WGkI/AAAAAAAAHRQ/tKVuAWSMVGw/s1600/1_Menage_Service_On_Server.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="182" src="http://4.bp.blogspot.com/-EXdA0_IRMZM/Ub9F4k1WGkI/AAAAAAAAHRQ/tKVuAWSMVGw/s400/1_Menage_Service_On_Server.PNG" width="400" /></a></div>
2. Start <b>Secure Store Service</b><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-r1eQn-Y9rsg/Ub9F4nNY7FI/AAAAAAAAHRU/rJQNQRsYg4w/s1600/2_Secure_Store_Service.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="125" src="http://2.bp.blogspot.com/-r1eQn-Y9rsg/Ub9F4nNY7FI/AAAAAAAAHRU/rJQNQRsYg4w/s400/2_Secure_Store_Service.PNG" width="400" /></a></div>
<br />
<br />
3. Now, Click <b>Applications Management</b> then <b>Manage Service Applications</b><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-jlUwGTDDAQw/Ub9F4mrjIKI/AAAAAAAAHRY/3HiSH4FGro0/s1600/3_Manage_Service_Application.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="215" src="http://1.bp.blogspot.com/-jlUwGTDDAQw/Ub9F4mrjIKI/AAAAAAAAHRY/3HiSH4FGro0/s400/3_Manage_Service_Application.PNG" width="400" /></a></div>
<br />
<br />
4. Click <b>New </b>and then <b>Secure Store Service</b><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-mdaf7GAf7EU/Ub9F5rJU-fI/AAAAAAAAHRo/Pt3BHFvuut0/s1600/4_New_SSS.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://1.bp.blogspot.com/-mdaf7GAf7EU/Ub9F5rJU-fI/AAAAAAAAHRo/Pt3BHFvuut0/s400/4_New_SSS.PNG" width="297" /></a></div>
<br />
<br />
5. Write Your Data<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-PLXAG9CGrmA/Ub9F53htJ8I/AAAAAAAAHR0/oUM6aMeESwI/s1600/5_New_SSS_Form.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="313" src="http://3.bp.blogspot.com/-PLXAG9CGrmA/Ub9F53htJ8I/AAAAAAAAHR0/oUM6aMeESwI/s400/5_New_SSS_Form.PNG" width="400" /></a></div>
<br />
6. Click <b>OK</b> and you get this screen<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-wQvl-B7p-6I/Ub9F5xjbi1I/AAAAAAAAHRw/iI2-GDy9vAA/s1600/6_SSS_Successfully.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="161" src="http://1.bp.blogspot.com/-wQvl-B7p-6I/Ub9F5xjbi1I/AAAAAAAAHRw/iI2-GDy9vAA/s640/6_SSS_Successfully.PNG" width="640" /></a></div>
<br />
7. On <b>Manage Service Applications</b> you can see your service<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-Kt2DOsiJnlc/Ub9F6R2c6WI/AAAAAAAAHR4/vaAr4ldBrrU/s1600/7_SSS.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="98" src="http://1.bp.blogspot.com/-Kt2DOsiJnlc/Ub9F6R2c6WI/AAAAAAAAHR4/vaAr4ldBrrU/s400/7_SSS.PNG" width="400" /></a></div>
<br />
8. Now you can create a new key - click <b>Generate New Key</b><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-Du7LJUtS1E8/Ub9F7TauhZI/AAAAAAAAHSE/HuuHhgsYh1s/s1600/8_Generate_New_Key.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="150" src="http://1.bp.blogspot.com/-Du7LJUtS1E8/Ub9F7TauhZI/AAAAAAAAHSE/HuuHhgsYh1s/s400/8_Generate_New_Key.PNG" width="400" /></a></div>
<br />
9. Write your key<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-CtUFgqvU0u4/Ub9F7eYh_vI/AAAAAAAAHSI/53Qm5p4QNmQ/s1600/9_Generate_New_Key_Form.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="121" src="http://2.bp.blogspot.com/-CtUFgqvU0u4/Ub9F7eYh_vI/AAAAAAAAHSI/53Qm5p4QNmQ/s400/9_Generate_New_Key_Form.PNG" width="400" /></a></div>
<br />
It all my friends,<br />
Roi</div>
Roi kolbingerhttp://www.blogger.com/profile/10947614481622890502noreply@blogger.com0tag:blogger.com,1999:blog-3469866748059699775.post-87538329303242109382013-05-11T11:06:00.000+03:002015-04-17T15:21:05.808+03:00Value does not fall within the expected range<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
Time introduced some strange problem.<br />
<br />
I needed to build a list with a lookup field.<br />
So build fields.. Then create content type.. and than a list detention....<br />
Just.. Piece of cake.<br />
As you know, Lookup field problem must be linked to an existing list.<br />
<br />
So checking founder of the source list and then create the field.<br />
<br />
Something that looks like the following code plus or minus<br />
<br />
<div style="background-attachment: scroll; background-color: #eeeeee; background-image: none; background-repeat: repeat; border-bottom: rgb(136,136,136) 1pt solid; border-left: rgb(136,136,136) 1pt solid; border-right: rgb(136,136,136) 1pt solid; border-top: rgb(136,136,136) 1pt solid; padding-bottom: 2pt; padding-left: 2pt; padding-right: 2pt; padding-top: 2pt;">
<blockquote>
<code><span style="color: black; font-family: Courier New; font-size: x-small;"><span style="color: blue;"><</span><span style="color: maroon;">Field</span> <span style="color: red;">Type</span><span style="color: blue;">="LookupMulti"</span> <span style="color: red;">DisplayName</span><span style="color: blue;">="Your List"</span> <span style="color: red;">Required</span><span style="color: blue;">="FALSE"</span> <span style="color: red;">EnforceUniqueValues</span><span style="color: blue;">="FALSE"</span> <span style="color: red;">Direction</span><span style="color: blue;">="None"</span> <b><span style="color: red;">List</span><span style="color: blue;">="Lists/YourList"</span></b>
<span style="color: red;">ShowField</span><span style="color: blue;">="Title"</span> <span style="color: red;">Mult</span><span style="color: blue;">="TRUE"</span> <span style="color: red;">Sortable</span><span style="color: blue;">="FALSE"</span> <span style="color: red;">UnlimitedLengthInDocumentLibrary</span><span style="color: blue;">="FALSE"</span> <span style="color: red;">Group</span><span style="color: blue;">="YourGroup"</span> <span style="color: red;">ID</span><span style="color: blue;">="{448f00a7-6cb5-4340-985f-990dd354f135}"</span> <span style="color: red;">SourceID</span><span style="color: blue;">="{1ce2cabb-bea1-4137-aee8-b4f12b17abcc}"</span>
<span style="color: red;">StaticName</span><span style="color: blue;">="YourName"</span> <span style="color: red;">Name</span><span style="color: blue;">="YourName"</span> <span style="color: red;">Version</span><span style="color: blue;">="3"</span> <span style="color: blue;">/></span></span>
</code></blockquote>
</div>
<br />
<br />
<br />
The code worked fine until .... I had to create a new site with the list above ..<br />
<br />
I got the following error<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-PfFzuJQ1dCk/UY35SVwUShI/AAAAAAAAHOo/mPJ2gR5LIP8/s1600/Value+does+not+fall+within+the+expected+range.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-PfFzuJQ1dCk/UY35SVwUShI/AAAAAAAAHOo/mPJ2gR5LIP8/s400/Value+does+not+fall+within+the+expected+range.png" height="156" width="400" /></a></div>
<br />
<br />
<div style="background-color: #141414; border-bottom: rgb(0,0,255) 2px solid; border-left: rgb(0,0,255) 2px solid; border-right: rgb(0,0,255) 2px solid; border-top: rgb(0,0,255) 2px solid; color: white; font-size-adjust: none; font-stretch: normal; font: 16px/1.4 'courier new', 'Andale Mono', courier, monospace; padding-left: 6px;">
System.ArgumentException: Value does not fall within the expected range.
at Microsoft.SharePoint.Library.SPRequestInternalClass.AddField(String bstrUrl, String bstrListName, String bstrSchemaXml, Int32 grfAdd)
at Microsoft.SharePoint.Library.SPRequest.AddField(String bstrUrl, String bstrListName, String bstrSchemaXml, Int32 grfAdd)
at Microsoft.SharePoint.SPFieldCollection.AddFieldAsXmlInternal(String schemaXml, Boolean addToDefaultView, SPAddFieldOptions op, Boolean isMigration, Boolean fResetCTCol)
at Microsoft.SharePoint.SPContentType.ProvisionFieldOnList(SPField field, Boolean bRecurAllowed)
at Microsoft.SharePoint.SPContentType.ProvisionFieldsOnList()
at Microsoft.SharePoint.SPContentType.DeriveContentType(SPContentTypeCollection cts, SPContentType& ctNew)
at Microsoft.SharePoint.SPContentTypeCollection.AddContentTypeToList(SPContentType contentType)
at Microsoft.SharePoint.SPContentTypeCollection.AddContentType(SPContentType contentType, Boolean updateResourceFileProperty, Boolean checkName, Boolean setNextChildByte)
at Microsoft.SharePoint.SPContentTypeCollection.Add(SPContentType contentType)
at Microsoft.SharePoint.ApplicationPages.AddContentTypeToListPage.Update(Object o, EventArgs e)
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
</div>
<br />
<br />
When I tried to build manually the column with the field ... I got something similar<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/--nzaMo0tzmo/UY35adJD-hI/AAAAAAAAHOw/4hwIlIIRR8M/s1600/Value+does+not+fall+within+the+expected+range+2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/--nzaMo0tzmo/UY35adJD-hI/AAAAAAAAHOw/4hwIlIIRR8M/s400/Value+does+not+fall+within+the+expected+range+2.png" height="113" width="400" /></a></div>
<br />
<br />
<div style="background-color: #141414; border-bottom: rgb(0,0,255) 2px solid; border-left: rgb(0,0,255) 2px solid; border-right: rgb(0,0,255) 2px solid; border-top: rgb(0,0,255) 2px solid; color: white; font-size-adjust: none; font-stretch: normal; font: 16px/1.4 'courier new', 'Andale Mono', courier, monospace; padding-left: 6px;">
System.ArgumentException: Value does not fall within the expected range.
at Microsoft.SharePoint.Library.SPRequestInternalClass.AddField(String bstrUrl, String bstrListName, String bstrSchemaXml, Int32 grfAdd)
at Microsoft.SharePoint.Library.SPRequest.AddField(String bstrUrl, String bstrListName, String bstrSchemaXml, Int32 grfAdd)
at Microsoft.SharePoint.SPFieldCollection.AddFieldAsXmlInternal(String schemaXml, Boolean addToDefaultView, SPAddFieldOptions op, Boolean isMigration, Boolean fResetCTCol)
at Microsoft.SharePoint.SPList.ProvisionField(SPField fld, SPAddFieldOptions op, Boolean bRecurAllowed, Boolean bAddToDefaultView, Dictionary`2 dictAdd)
at Microsoft.SharePoint.ApplicationPages.AddFieldFromTemplatePage.ProvisionFieldOnListCore(SPField fld, Boolean bRecurAllowed, Boolean bAddToDefaultView, Dictionary`2 dictAdd)
at Microsoft.SharePoint.ApplicationPages.AddFieldFromTemplatePage.Update(Object o, EventArgs e)
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
</div>
<pre style="white-space: pre-wrap; word-wrap: break-word;"></pre>
<pre style="white-space: pre-wrap; word-wrap: break-word;"></pre>
<br />
<br />
I tried Google's solutions, build console accesses picks up and changes the field from<br />
<span style="color: red; font-family: 'Courier New'; font-size: x-small;">List</span><span style="color: blue; font-family: 'Courier New'; font-size: x-small;">="Lists/YourList"</span><br />
To<br />
<span style="color: red; font-family: 'Courier New'; font-size: x-small;">List</span><span style="color: blue; font-family: 'Courier New'; font-size: x-small;">="35ae7ed3-b23f-4f71-a2a3-8ad482ad9ab6"</span><br />
<br />
The list has been changed from <b>path </b>to <b>guid</b><br />
<br />
But interested permissions list kept me fix it<br />
<br />
The solution was simpler - I changed the feature in packge and installed again. I've iisreset (that's xml update feature to reset IIS binding)<br />
<br />
Now the field looks like this<br />
<br />
<div style="background-attachment: scroll; background-color: #eeeeee; background-image: none; background-repeat: repeat; border-bottom: rgb(136,136,136) 1pt solid; border-left: rgb(136,136,136) 1pt solid; border-right: rgb(136,136,136) 1pt solid; border-top: rgb(136,136,136) 1pt solid; padding-bottom: 2pt; padding-left: 2pt; padding-right: 2pt; padding-top: 2pt;">
<blockquote>
<code><span style="color: black; font-family: Courier New; font-size: x-small;"><span style="color: blue;"><</span><span style="color: maroon;">Field</span> <span style="color: red;">Type</span><span style="color: blue;">="LookupMulti"</span> <span style="color: red;">DisplayName</span><span style="color: blue;">="Your List"</span> <span style="color: red;">Required</span><span style="color: blue;">="FALSE"</span> <span style="color: red;">EnforceUniqueValues</span><span style="color: blue;">="FALSE"</span> <span style="color: red;">Direction</span><span style="color: blue;">="None"</span> <b><span style="color: red;">List</span><span style="color: blue;">="35ae7ed3-b23f-4f71-a2a3-8ad482ad9ab6"</span></b>
<span style="color: red;">ShowField</span><span style="color: blue;">="Title"</span> <span style="color: red;">Mult</span><span style="color: blue;">="TRUE"</span> <span style="color: red;">Sortable</span><span style="color: blue;">="FALSE"</span> <span style="color: red;">UnlimitedLengthInDocumentLibrary</span><span style="color: blue;">="FALSE"</span> <span style="color: red;">Group</span><span style="color: blue;">="YourGroup"</span> <span style="color: red;">ID</span><span style="color: blue;">="{448f00a7-6cb5-4340-985f-990dd354f135}"</span> <span style="color: red;">SourceID</span><span style="color: blue;">="{1ce2cabb-bea1-4137-aee8-b4f12b17abcc}"</span>
<span style="color: red;">StaticName</span><span style="color: blue;">="YourName"</span> <span style="color: red;">Name</span><span style="color: blue;">="YourName"</span> <span style="color: red;">Version</span><span style="color: blue;">="3"</span> <span style="color: blue;">/></span></span></code></blockquote>
</div>
<br />
Good day,<br />
Roi<br />
<br />
<br />
<div>
<br /></div>
</div>
Roi kolbingerhttp://www.blogger.com/profile/10947614481622890502noreply@blogger.com0tag:blogger.com,1999:blog-3469866748059699775.post-45153431356733076342013-04-16T11:50:00.000+03:002013-04-16T11:50:09.264+03:00side by side div with dynamic width<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
Often we need to build two divs standing side by side, with their width variable (dynamic)<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-PLc7nkckf3o/UW0ObJBeLQI/AAAAAAAAHNc/E-t0SFZF7W4/s1600/html+div+side+by+side.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="138" src="http://4.bp.blogspot.com/-PLc7nkckf3o/UW0ObJBeLQI/AAAAAAAAHNc/E-t0SFZF7W4/s400/html+div+side+by+side.png" width="400" /></a></div>
<br />
<br />
The following code - will help you do it<br />
<br />
<div style="background-attachment: scroll; background-color: #eeeeee; background-image: none; background-repeat: repeat; border-bottom: rgb(136,136,136) 1pt solid; border-left: rgb(136,136,136) 1pt solid; border-right: rgb(136,136,136) 1pt solid; border-top: rgb(136,136,136) 1pt solid; padding-bottom: 2pt; padding-left: 2pt; padding-right: 2pt; padding-top: 2pt;">
<blockquote>
<code><span style="color: black; font-family: Courier New; font-size: x-small;"><span style="color: blue;"><</span><span style="color: maroon;">div</span> <span style="color: red;">id</span><span style="color: blue;">="container"</span><span style="color: blue;">></span></span></code> </blockquote>
<blockquote>
<code><span style="color: black; font-family: Courier New; font-size: x-small;"><span style="color: blue;"> <</span><span style="color: maroon;">div</span> <span style="color: red;">id</span><span style="color: blue;">="left"</span><span style="color: blue;">></span> Div 1 - What is my size<span style="color: blue;"></</span><span style="color: maroon;">div</span><span style="color: blue;">></span></span></code> </blockquote>
<blockquote>
<code><span style="color: black; font-family: Courier New; font-size: x-small;"><span style="color: blue;"> <</span><span style="color: maroon;">div</span> <span style="color: red;">id</span><span style="color: blue;">="right"</span><span style="color: blue;">></span> Div 2 -I am the <span style="color: blue;"><</span><span style="color: maroon;">br</span> <span style="color: blue;">/></span>Right DIV<span style="color: blue;"></</span><span style="color: maroon;">div</span><span style="color: blue;">></span></span></code> </blockquote>
<blockquote>
<code><span style="color: black; font-family: Courier New; font-size: x-small;"><span style="color: blue;"></</span><span style="color: maroon;">div</span><span style="color: blue;">></span></span></code></blockquote>
<blockquote>
<code><span style="color: black; font-family: Courier New; font-size: x-small;">
<span style="color: blue;"><</span><span style="color: maroon;">style</span> <span style="color: red;">type</span><span style="color: blue;">="text/css"</span><span style="color: blue;">></span></span></code> </blockquote>
<blockquote>
<code><span style="color: black; font-family: Courier New; font-size: x-small;">#left {
background: #aaa;
float: left
}</span></code></blockquote>
<blockquote>
<code><span style="color: black; font-family: Courier New; font-size: x-small;">#right {
background: cyan;
overflow: hidden
}</span></code> </blockquote>
<blockquote>
<code><span style="color: black; font-family: Courier New; font-size: x-small;">#container {
width :400px;
}</span></code> </blockquote>
<blockquote>
<code><span style="color: black; font-family: Courier New; font-size: x-small;"><span style="color: blue;"></</span><span style="color: maroon;">style</span><span style="color: blue;">></span></span>
</code></blockquote>
</div>
<br />
Yours,<br />
Roi</div>
Roi kolbingerhttp://www.blogger.com/profile/10947614481622890502noreply@blogger.com0tag:blogger.com,1999:blog-3469866748059699775.post-6868909105881056642013-03-06T20:45:00.003+02:002013-03-06T20:45:46.135+02:00Support the HTML5 placeholder Attribute in Browsers that do not support it<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
HTML5 language gives us the possibility of a Placeholder.<br />
The placeholder Attribute gives us information on the textbox where we are supposed to use.<br />
<br />
All you need is to add the same type of input tag.<br />
<br />
<code>
</code>
<br />
<div style="background-attachment: scroll; background-color: #eeeeee; background-image: none; background-repeat: repeat; border-bottom: rgb(136,136,136) 1pt solid; border-left: rgb(136,136,136) 1pt solid; border-right: rgb(136,136,136) 1pt solid; border-top: rgb(136,136,136) 1pt solid; padding-bottom: 2pt; padding-left: 2pt; padding-right: 2pt; padding-top: 2pt;">
<code><input type="text" name="first_name" placeholder="First name"></code></div>
<code>
</code>
<br />
<br />
Browsers that do not support it will show like:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-1XmEl5PTICA/UTeKPDQ9TUI/AAAAAAAAHM4/aFfRUuNcbUE/s1600/without+placeholder+input+html.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-1XmEl5PTICA/UTeKPDQ9TUI/AAAAAAAAHM4/aFfRUuNcbUE/s1600/without+placeholder+input+html.png" /></a></div>
<br />
<br />
Browsers that support it will show like:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-_pM2cenDo4Y/UTeKYfUQSYI/AAAAAAAAHNA/xjWMoo_Kqcc/s1600/placeholder+input+html.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-_pM2cenDo4Y/UTeKYfUQSYI/AAAAAAAAHNA/xjWMoo_Kqcc/s1600/placeholder+input+html.PNG" /></a></div>
<br />
<br />
If you want the older browsers will support it, all you have to do is add the following JQuery code:<br />
<br />
<br />
<code>
</code>
<br />
<div style="background-attachment: scroll; background-color: #eeeeee; background-image: none; background-repeat: repeat; border-bottom: rgb(136,136,136) 1pt solid; border-left: rgb(136,136,136) 1pt solid; border-right: rgb(136,136,136) 1pt solid; border-top: rgb(136,136,136) 1pt solid; padding-bottom: 2pt; padding-left: 2pt; padding-right: 2pt; padding-top: 2pt;">
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<code><span style="color: green; font-family: Consolas; font-size: 10.0pt;">/* Input Tag Placeholder Support*/</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></code></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<code><span style="color: blue; font-family: Consolas; font-size: 10.0pt;">function</span><span style="font-family: Consolas; font-size: 10.0pt;">
IsInputPlaceholderSupport() {<o:p></o:p></span></code></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<code><span style="font-family: Consolas; font-size: 10.0pt;">
<span style="color: blue;">var</span> i = document.createElement(<span style="color: #a31515;">'input'</span>);<o:p></o:p></span></code></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<code><span style="font-family: Consolas; font-size: 10.0pt;">
<span style="color: blue;">return</span> <span style="color: #a31515;">'placeholder'</span>
<span style="color: blue;">in</span> i;<o:p></o:p></span></code></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<code><span style="font-family: Consolas; font-size: 10.0pt;">}<o:p></o:p></span></code></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<code><span style="font-family: Consolas; font-size: 10.0pt;">$(document).ready(<span style="color: blue;">function</span> () {<o:p></o:p></span></code></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<code><span style="font-family: Consolas; font-size: 10.0pt;">
<span style="color: blue;">if</span> (!IsInputPlaceholderSupport()) {<o:p></o:p></span></code></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<code><span style="font-family: Consolas; font-size: 10.0pt;">
<span style="color: blue;">var</span> fields = $(<span style="color: #a31515;">'input'</span>);<o:p></o:p></span></code></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<code><span style="font-family: Consolas; font-size: 10.0pt;">
<span style="color: blue;">for</span> (<span style="color: blue;">var</span> i = 0;
i < fields.length; i++) {<o:p></o:p></span></code></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<code><span style="font-family: Consolas; font-size: 10.0pt;">
<span style="color: blue;">if</span> (fields[i].attributes[<span style="color: #a31515;">'placeholder'</span>] != undefined) {<o:p></o:p></span></code></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<code><span style="font-family: Consolas; font-size: 10.0pt;">
fields[i].defaultValue = fields[i].attributes[<span style="color: #a31515;">'placeholder'</span>].value;<o:p></o:p></span></code></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<code><span style="font-family: Consolas; font-size: 10.0pt;">
fields[i].value = fields[i].attributes[<span style="color: #a31515;">'placeholder'</span>].value;<o:p></o:p></span></code></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<code><span style="font-family: Consolas; font-size: 10.0pt;">
fields[i].onfocus = <span style="color: blue;">function</span> () { <span style="color: blue;">if</span> (<span style="color: blue;">this</span>.value == <span style="color: blue;">this</span>.defaultValue) <span style="color: blue;">this</span>.value
= <span style="color: #a31515;">''</span>; };<o:p></o:p></span></code></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<code><span style="font-family: Consolas; font-size: 10.0pt;">
fields[i].onblur = <span style="color: blue;">function</span> () { <span style="color: blue;">if</span> (<span style="color: blue;">this</span>.value == <span style="color: #a31515;">''</span>) <span style="color: blue;">this</span>.value = <span style="color: blue;">this</span>.defaultValue; };<o:p></o:p></span></code></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<code><span style="font-family: Consolas; font-size: 10.0pt;">
}<o:p></o:p></span></code></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<code><span style="font-family: Consolas; font-size: 10.0pt;">
}<o:p></o:p></span></code></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<code><span style="font-family: Consolas; font-size: 10.0pt;">
}<o:p></o:p></span></code></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<code><span style="font-family: Consolas; font-size: 10.0pt;">});<o:p></o:p></span></code></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<code><span style="color: green; font-family: Consolas; font-size: 10.0pt;">/* End Input Tag Placeholder Support*/</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></code></div>
</div>
<code>
</code>
<br />
<br />
Yours,<br />
Roi</div>
Roi kolbingerhttp://www.blogger.com/profile/10947614481622890502noreply@blogger.com0tag:blogger.com,1999:blog-3469866748059699775.post-26770900360891760112013-02-15T10:25:00.000+02:002013-03-06T20:46:35.532+02:00Preventing copy-paste all the rich text editor in SharePoint<div dir="ltr" style="text-align: left;" trbidi="on">
As part of an <a href="http://iwillsharemypoint.blogspot.co.il/2013/02/website-accessibility-in-sharepoint.html">accessible </a>Web sites in SharePoint, this time I will present the code prevents the copy-paste.<br />
<br />
The following code prevents copy-paste content editor rich text field<br />
<br />
<br />
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<span style="color: darkgreen; font-family: Consolas; mso-bidi-font-family: "Times New Roman";">/* ECM */</span><span dir="RTL" lang="HE" style="font-family: "Times New Roman","serif"; mso-ascii-font-family: Consolas; mso-hansi-font-family: Consolas;"><o:p></o:p></span></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<span style="color: blue; font-family: Consolas; mso-bidi-font-family: "Times New Roman";">function</span><span style="font-family: Consolas; mso-bidi-font-family: "Times New Roman";"> disablePasteForRTE() {</span><span dir="RTL" lang="HE" style="font-family: "Times New Roman","serif"; mso-ascii-font-family: Consolas; mso-hansi-font-family: Consolas;"><o:p></o:p></span></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<span dir="LTR"></span><span dir="LTR"></span><span style="font-family: Consolas; mso-bidi-font-family: "Times New Roman";"><span dir="LTR"></span><span dir="LTR"></span> Type.registerNamespace(<span style="color: maroon;">"RTE"</span>);<o:p></o:p></span></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<span style="font-family: Consolas; mso-bidi-font-family: "Times New Roman";"> <span style="color: blue;">if</span> (RTE)
{<o:p></o:p></span></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<span style="font-family: Consolas; mso-bidi-font-family: "Times New Roman";"> <span style="color: blue;">if</span> (RTE.RichTextEditor != <span style="color: blue;">null</span>)
{<o:p></o:p></span></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<span style="font-family: Consolas; mso-bidi-font-family: "Times New Roman";">
RTE.RichTextEditor.paste = <span style="color: blue;">function</span> () {<o:p></o:p></span></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<span style="font-family: Consolas; mso-bidi-font-family: "Times New Roman";">
RTE.Cursor.paste(<span style="color: blue;">true</span>);<o:p></o:p></span></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<span style="font-family: Consolas; mso-bidi-font-family: "Times New Roman";">
}<o:p></o:p></span></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<span style="font-family: Consolas; mso-bidi-font-family: "Times New Roman";">
RTE.Cursor.$3C_0 = <span style="color: blue;">true</span>;<o:p></o:p></span></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<span style="font-family: Consolas; mso-bidi-font-family: "Times New Roman";"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<span style="font-family: Consolas; mso-bidi-font-family: "Times New Roman";"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<span style="font-family: Consolas; mso-bidi-font-family: "Times New Roman";">}<o:p></o:p></span></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<span style="color: blue; font-family: Consolas; mso-bidi-font-family: "Times New Roman";">if</span><span style="font-family: Consolas; mso-bidi-font-family: "Times New Roman";"> (_spBodyOnLoadFunctionNames != <span style="color: blue;">null</span>) {<o:p></o:p></span></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<span style="font-family: Consolas; mso-bidi-font-family: "Times New Roman";"> _spBodyOnLoadFunctionNames.push(<span style="color: maroon;">'disablePasteForRTE'</span>);<o:p></o:p></span></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<span style="font-family: Consolas; mso-bidi-font-family: "Times New Roman";">}<o:p></o:p></span></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<span style="color: darkgreen; font-family: Consolas; mso-bidi-font-family: "Times New Roman";">/* End ECM *<o:p></o:p></span></div>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-gpviZRFtJnQ/UR3wyZSvtOI/AAAAAAAAHMk/m870Bf8ORPQ/s1600/copy+paste.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-gpviZRFtJnQ/UR3wyZSvtOI/AAAAAAAAHMk/m870Bf8ORPQ/s1600/copy+paste.png" /></a></div>
<br />
<br />
Your... Roi</div>
Roi kolbingerhttp://www.blogger.com/profile/10947614481622890502noreply@blogger.com0tag:blogger.com,1999:blog-3469866748059699775.post-78355508304919645652013-02-08T13:51:00.001+02:002013-02-08T13:51:30.408+02:00Construction of correct design patterns in SharePoint<div dir="ltr" style="text-align: left;" trbidi="on">
As in the previous post, to avoid content editor put the wrong color and not merit.<br />
<br />
You need to built styles for content editor<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-hgKzQoakSK8/URTls2L7EJI/AAAAAAAAHMQ/UMlRZ8k8ncw/s1600/style.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-hgKzQoakSK8/URTls2L7EJI/AAAAAAAAHMQ/UMlRZ8k8ncw/s1600/style.png" /></a></div>
<br />
<br />
How do I add style?<br />
<br />
Add the following CSS code to the Master-Page<br />
<br />
<code>
</code>
<div style="background-attachment: scroll; background-color: #eeeeee; background-image: none; background-repeat: repeat; border-bottom: rgb(136,136,136) 1pt solid; border-left: rgb(136,136,136) 1pt solid; border-right: rgb(136,136,136) 1pt solid; border-top: rgb(136,136,136) 1pt solid; padding-bottom: 2pt; padding-left: 2pt; padding-right: 2pt; padding-top: 2pt;">
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<code><span style="color: maroon; font-family: Consolas; mso-bidi-font-family: "Times New Roman";">h1.ms-rteElement-YourTitle</span><span dir="RTL" lang="HE" style="font-family: "Times New Roman","serif"; mso-ascii-font-family: Consolas; mso-hansi-font-family: Consolas;"><o:p></o:p></span></code></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<code><span dir="LTR"></span><span dir="LTR"></span><span style="font-family: Consolas; mso-bidi-font-family: "Times New Roman";"><span dir="LTR"></span><span dir="LTR"></span>{<o:p></o:p></span></code></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<code><span style="font-family: Consolas;"> </span><span style="color: red; font-family: Consolas;">-ms-name</span><span style="font-family: Consolas;">: </span><span style="color: blue;"><span style="font-family: Consolas;">"</span><span style="font-family: Times New Roman, serif;">Your Title</span></span><span style="color: blue; font-family: Consolas; mso-bidi-font-family: "Times New Roman";">"</span><span style="font-family: Consolas; mso-bidi-font-family: "Times New Roman";">;<o:p></o:p></span></code></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<code><span style="font-family: Consolas; mso-bidi-font-family: "Times New Roman";"> <span style="color: red;">font-family</span>:
<span style="color: blue;">arial</span>;<o:p></o:p></span></code></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<code><span style="font-family: Consolas; mso-bidi-font-family: "Times New Roman";"> <span style="color: red;">font-weight</span>:
<span style="color: blue;">bold</span>;<o:p></o:p></span></code></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<code><span style="font-family: Consolas; mso-bidi-font-family: "Times New Roman";"> <span style="color: red;">font-size</span>:
<span style="color: blue;">14.5pt</span>;<o:p></o:p></span></code></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<code><span style="font-family: Consolas; mso-bidi-font-family: "Times New Roman";"> <span style="color: red;">color</span>: <span style="color: blue;">#9bbe08</span>;<o:p></o:p></span></code></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<code><span style="font-family: Consolas; mso-bidi-font-family: "Times New Roman";"> <span style="color: red;">height</span>: <span style="color: blue;">33px</span>;<o:p></o:p></span></code></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<code><span style="font-family: Consolas; mso-bidi-font-family: "Times New Roman";"> <span style="color: red;">line-height</span>:
<span style="color: blue;">33px</span>;<o:p></o:p></span></code></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<code><span style="font-family: Consolas; mso-bidi-font-family: "Times New Roman";">}<o:p></o:p></span></code></div>
</div>
<br />
<br />
Thanks,<br />
Roi</div>
Roi kolbingerhttp://www.blogger.com/profile/10947614481622890502noreply@blogger.com0tag:blogger.com,1999:blog-3469866748059699775.post-65708673544391898812013-02-08T13:38:00.002+02:002013-02-08T13:38:34.371+02:00Prevention design is not good for Accessibility in SharePoint<div dir="ltr" style="text-align: left;" trbidi="on">
Often, the editors of the content of Web sites write the content and design they give does not match the colors of the site and do not match the colors of accessibility.<br />
<br />
To prevent them from putting bright pink, or to establish rules, remove the redundant design.<br />
<br />
Before<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-ELUPdkEvvzE/URTihxYye2I/AAAAAAAAHLs/P6cXVOklmag/s1600/css+before.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="110" src="http://3.bp.blogspot.com/-ELUPdkEvvzE/URTihxYye2I/AAAAAAAAHLs/P6cXVOklmag/s400/css+before.png" width="400" /></a></div>
<span id="goog_180710622"></span><span id="goog_180710623"></span><br />
After<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-4E1RiTR3DqY/URTimnb_25I/AAAAAAAAHL0/AppzliKc-m4/s1600/css+after.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="135" src="http://4.bp.blogspot.com/-4E1RiTR3DqY/URTimnb_25I/AAAAAAAAHL0/AppzliKc-m4/s400/css+after.png" width="400" /></a></div>
<br />
<br />
Put the following CSS code in your Master Page (preferably course file)<br />
<br />
<code>
</code><br />
<div style="background-attachment: scroll; background-color: #eeeeee; background-image: none; background-repeat: repeat; border-bottom: rgb(136,136,136) 1pt solid; border-left: rgb(136,136,136) 1pt solid; border-right: rgb(136,136,136) 1pt solid; border-top: rgb(136,136,136) 1pt solid; padding-bottom: 2pt; padding-left: 2pt; padding-right: 2pt; padding-top: 2pt;">
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<code><code><span style="color: maroon; font-family: Consolas; mso-bidi-font-family: "Times New Roman";">#Ribbon\.EditingTools\.CPEditTab\.Font</span><span dir="RTL" lang="HE" style="font-family: "Times New Roman","serif"; mso-ascii-font-family: Consolas; mso-hansi-font-family: Consolas;"><o:p></o:p></span></code></code></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<code><code><span dir="LTR"></span><span dir="LTR"></span><span style="font-family: Consolas; mso-bidi-font-family: "Times New Roman";"><span dir="LTR"></span><span dir="LTR"></span>{</span><span dir="RTL" lang="HE" style="font-family: "Times New Roman","serif"; mso-ascii-font-family: Consolas; mso-hansi-font-family: Consolas;"><o:p></o:p></span></code></code></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<code><code><span dir="LTR"></span><span dir="LTR"></span><span style="font-family: Consolas; mso-bidi-font-family: "Times New Roman";"><span dir="LTR"></span><span dir="LTR"></span> <span style="color: red;">display</span>:
<span style="color: blue;">none</span>;<o:p></o:p></span></code></code></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<code><code><span style="font-family: Consolas; mso-bidi-font-family: "Times New Roman";">}<o:p></o:p></span></code></code></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<code><code><span style="color: maroon; font-family: Consolas; mso-bidi-font-family: "Times New Roman";">#Ribbon\.EditingTools\.CPEditTab\.Paragraph-Large-0-0-0</span><span style="font-family: Consolas; mso-bidi-font-family: "Times New Roman";">,<o:p></o:p></span></code></code></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<code><code><span style="color: maroon; font-family: Consolas; mso-bidi-font-family: "Times New Roman";">#Ribbon\.EditingTools\.CPEditTab\.Paragraph-Large-0-0-1</span><span style="font-family: Consolas; mso-bidi-font-family: "Times New Roman";"><o:p></o:p></span></code></code></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<code><code><span style="font-family: Consolas; mso-bidi-font-family: "Times New Roman";">{<o:p></o:p></span></code></code></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<code><code><span style="font-family: Consolas; mso-bidi-font-family: "Times New Roman";"> <span style="color: red;">display</span>: <span style="color: blue;">none</span>;<o:p></o:p></span></code></code></div>
<div class="MsoNormal" style="direction: ltr; unicode-bidi: embed;">
<code><code><span style="font-family: Consolas; mso-bidi-font-family: "Times New Roman";">}<o:p></o:p></span></code></code></div>
</div>
<code>
<code>
</code>
<br />
<br />
Yours,<br />
Roi</code></div>
Roi kolbingerhttp://www.blogger.com/profile/10947614481622890502noreply@blogger.com0