HTMLEditorExtender width cannot fit %100 - width

Using ajaxcontroltoolkit.as my horror film.
HTMLEditorExtender stays its prerendered width as it is even if I resize the Web Browser
it doesnt detect width resizements:Stays as how it is.
and need a full refresh of browser (F5) makes HTMLEditorExtender to re calcluate its width.
so.
is there a standart way to fix this problem ? otherwise I will use jquery to slap it.or remove this horror control.
<asp:TextBox ID="tbEditor" runat="server"
TextMode="MultiLine" Rows="10" style="width:100%">
</asp:TextBox>
<asp:HtmlEditorExtender ID="tbEditor_HtmlEditorExtender" runat="server"
Enabled="True" TargetControlID="tbEditor">
</asp:HtmlEditorExtender>

a css rule
.containerClass .ajax__html_editor_extender_container
{
width: 100% !important;/*important is really important at here*/
}
and a surrounding div, fixed problem.
<div class="containerClass">
<asp:TextBox ID="tbEditor" runat="server"
TextMode="MultiLine" Rows="10" style="width:100%">
</asp:TextBox>
<asp:HtmlEditorExtender ID="tbEditor_HtmlEditorExtender" runat="server"
Enabled="True" TargetControlID="tbEditor">
</asp:HtmlEditorExtender>
</div>
fixed my problem.hope this helps someone too.

Related

How to expand ComponentOne web report in C#

I am using componentOne web report in my system. Currently,we need to increase the width of the report to fit the entire screen. I have written java script to increase div width size, but data inside the report is not expanding based on the width. Please suggest a better approach.
<cc1:C1WebReport ID="C1WebReport1" runat="server" ExportFolder="/report/" Scrollable="False"
Visible="False" CallbackWaitImageUrl="~/Images/load.gif" class="control_label" Width="100%">
<NavigationBar HasExportButton="True" Align="Center" HasGotoPageButton="True">
<Images ExportImageUrl="~/Images/ExportDetailsv2.png" GotoPageImageUrl="~/Images/gov6.png" />
<DisabledImages ExportImageUrl="~/Images/ExportDetailsv2.png"
GotoPageImageUrl="~/Images/gov6.png" />
<MouseOverImages ExportImageUrl="~/Images/ExportDetailsv2.png" GotoPageImageUrl="~/Images/gov6.png" />
</NavigationBar>
</cc1:C1WebReport>

jCrop not working in Sharepoint webpart or app page

Hello im having problems migrating my project i made in asp.net with jquery 1.4.3 and jcrop, into the sharepoint environment. It works perfectly even in IE.
This is my scriptcode:
<link href="Scripts/jquery.Jcrop.css" rel="stylesheet" />
<script type="text/javascript" src="Scripts/jquery-1.4.3.js"></script>
<script type="text/javascript" src="Scripts/jquery.Jcrop.js"></script>
<script type="text/javascript" defer='defer'>
jQuery(window).load(function () {
var jcrop_obj;
jQuery('#imgCrop').Jcrop({
onSelect: storeCoords,
aspectRatio: 1 / 1
}, function () { jcrop_obj = this; });
});
function storeCoords(c) {
jQuery('#X').val(c.x);
jQuery('#Y').val(c.y);
jQuery('#W').val(c.w);
jQuery('#H').val(c.h);
};
</script>
This is the elements i use exactly the same as i use in my solution outside sharepoint that works.
<body>
<form id="form1" runat="server">
<div>
<asp:Panel ID="pnlUpload" runat="server">
<asp:FileUpload ID="Upload" runat="server" />
<br />
<asp:Button ID="btnUpload" runat="server" OnClick="btnUpload_Click" Text="Upload" />
<asp:Label ID="lblError" runat="server" Visible="false" />
</asp:Panel>
<asp:Panel ID="pnlCrop" runat="server" Visible="false" Width="956px">
<asp:Image ID="imgCrop" runat="server" />
<br />
<asp:HiddenField ID="X" runat="server" />
<asp:HiddenField ID="Y" runat="server" />
<asp:HiddenField ID="W" runat="server" />
<asp:HiddenField ID="H" runat="server" />
<asp:Button ID="btnCrop" runat="server" Text="Crop" OnClick="btnCrop_Click" />
</asp:Panel>
<asp:Panel ID="pnlCropped" runat="server" Visible="false">
<asp:Label ID="Label1" runat="server" Text="Here is your cropped picture:"></asp:Label>
<br />
<asp:Image ID="imgCropped" runat="server" />
</asp:Panel>
</div>
</form>
</body>
Of course i also have the right elements for it and so on, since it works when running it without sharepoint.
When i debug my code, both the jquery and the jcrop is loaded properly, and when i run through the code and breakpoint where i call the .Jcrop method, it actually goes into the jcrop file and runs through it with no errors, however when it is done running there is no jcrop stuff on my picture. i tried in both firefox and internet explorer.
I don't see any reason to include any serverside code since thats not the problem whatsoever.
My question is really, is there something i have to take into concern when running it through an application page in sharepoint.
Thanks in advance!
Well I'm assuming this is on an ASPX webpart page or in a webpart solution.
SP 2007 has 7K lines of CSS code, SP 2010 has 13K lines of CSS code.
Your CSS may be conflicting with SharePoint's. Try using strong names and see if it behaves correctly.
Also, wrap your HTML code in a table. This helps from not inheriting most core CSS styles.
<table><tr><td>
ASPX html here
</td></tr></table>

Custom Links/Buttons in SharePoint Online 2010 Ribbon

I'm new to SharePoint and am looking to add some custom links or buttons to the ribbon (only want these to show on the ribbon when the advanced ribbon menu controls are not showing, if that makes sense). I'm on SharePoint Online (2010 edition, but will convert to 2013 shortly).
Here's a screenshot of where I'm looking to add links or buttons.
I think the code section in the v4.master that controls this area is this section but I'm having problems getting my links to show up in the correct area.
<div class="s4-trc-container-menu">
<div>
<wssuc:Welcome id="IdWelcome" runat="server" EnableViewState="false">
</wssuc:Welcome>
<wssuc:MUISelector ID="IdMuiSelector" runat="server"/>
</div>
</div>
Any suggestions? Much appreciated!
Assuming that you are using v4.master as your master page (default), there is a control with an ID of "RibbonTabRowRight" that surrounds the code snippet you have posted.
Any links and buttons that you want to add should go within this control, and before the Welcome Menu (the snippet you have posted). Whether you use a simple anchor tag or a more complex control depends on your requirements.
Example:
<SharePoint:SPRibbonPeripheralContent
runat="server"
Location="TabRowRight"
ID="RibbonTabRowRight"
CssClass="s4-trc-container s4-notdlg">
<SharePoint:DelegateControl runat="server" ID="GlobalDelegate0" ControlId="GlobalSiteLink0" />
<div class="s4-trc-container-menu">
<a href="EXAMPLE.ASPX" />MY EXAMPLE</a>
<div>
<wssuc:Welcome id="IdWelcome" runat="server" EnableViewState="false">
</wssuc:Welcome>
<wssuc:MUISelector ID="IdMuiSelector" runat="server"/>
</div>
</div>
<SharePoint:DelegateControl ControlId="GlobalSiteLink2" ID="GlobalDelegate2" Scope="Farm" runat="server" />
<span>
<span class="s4-devdashboard">
<Sharepoint:DeveloperDashboardLauncher
ID="DeveloperDashboardLauncher"
NavigateUrl="javascript:ToggleDeveloperDashboard()"
runat="server"
ImageUrl="/_layouts/images/fgimg.png"
Text="<%$Resources:wss,multipages_launchdevdashalt_text%>"
OffsetX=0
OffsetY=222
Height=16
Width=16 />
</span>
</span>
</SharePoint:SPRibbonPeripheralContent>

Update Wiki pages to display SharePoint Fields and not break Site Definition

I have a requirement to display SharePoint fields as a footer on only certain pages, so this rules out a master page change, and I haven't had any success with plain-old HTML.
What I'm trying to display is the following code:
<SharePoint:DeveloperDashboard runat="server"/>
<div class="s4-notdlg" style="clear:both; background-color:orange; padding:10px">
<SharePoint:CreatedModifiedInfo ControlMode="Display" runat="server">
<CustomTemplate>
<br>Page Contact: <SharePoint:FormField FieldName="Page Contact" runat="server" ControlMode="Display" DisableInputFieldLabel="True" />
<br>Last modified on <SharePoint:FieldValue FieldName="Modified" runat="server" ControlMode="Display" DisableInputFieldLabel="True" />
by <SharePoint:FormField FieldName="Author" runat="server" ControlMode="Display" DisableInputFieldLabel="True" />
<br>Comments: <SharePoint:FormField FieldName="Check In Comment" runat="server" ControlMode="Display" DisableInputFieldLabel="True" />
</CustomTemplate>
</SharePoint:CreatedModifiedInfo>
</div>
When editing the page in Advanced Mode, no matter where I place the code, I break site definition. Is there a good place to insert this code in the page? Or does the Site Definition need to be changed.
Breaking the Site Definition may not be what you are thinking. It is just saying to you that the page is not one of the 'defaults' anymore, as a way to identify what have been customized on the site.
Every edit you make on those pages are like that, so it is OK to get that message. You may also "reset to site definition" when you want to, but this is not usually very stable on my experience.

User control incorrectly displaying in modalpopup extender

I'm placing a user control inside a modal popup. The problem is that it is getting displayed even before the popup is being invoked. If I replace the user control with anything else, it is hidden correctly. The moment I put back in the user control, I get the same issue.
Here is my code:
<asp:Panel ID="plSearch" runat="server" CssClass="modalPopup" Width="365">
<uc1:Search ID="searchSponsor" runat="server" Mode="ReturnID" />
<asp:Button ID="SearchCancel" runat="server" Text="Cancel" CausesValidation="False" />
<asp:UpdatePanel ID="upSearch" runat="server">
<ContentTemplate>
<asp:Label ID="lblSponsor" runat="server" />
</ContentTemplate>
</asp:UpdatePanel>
</asp:Panel>
<asp:ModalPopupExtender ID="mpeSearch" runat="server" TargetControlID="lbSearch"
PopupControlID="plSearch" BackgroundCssClass="modalBackground" DropShadow="False"
Enabled="True" CancelControlID="SearchCancel" />
When I moved the linkbutton that was named as the modalpopup's TargetControlID to immediately above the mpe, it displayed correctly.

Resources