Alexander Bautz

Forum Replies Created

Viewing 15 posts - 4,021 through 4,035 (of 4,558 total)
  • Author
    Posts
  • in reply to: average total type on vLookup #9250
    Alexander Bautz
    Keymaster

    Hi,
    It seems there is a bug in the tooltip help text – use this format in the “Special configurations”:

    {"percentage":true,"suffix":"%","totalsType":"average"}

    Sorry for the inconvenience – I’ll update the tooltip in the next release.

    Alexander

    Alexander Bautz
    Keymaster

    Hi,
    No, I would not do this as an additional call to the insert image will then not have this “fix” applied.

    Of course it would be better to trigger this on click, but I don’t think the current approach will pose any problems as the “query” for the iframe will not be so heavy.

    Alexander

    in reply to: Set CSS value on DispForm based on list item ID #9231
    Alexander Bautz
    Keymaster

    I’m glad it worked out.

    A good beer in the local grocery store is about $5 – so Norway is not the place you go for cheap beer!

    Best regards,
    Alexander

    in reply to: Set CSS value on DispForm based on list item ID #9212
    Alexander Bautz
    Keymaster

    Hi,
    You can put this in the Custom JS section in DFFS backend. It adds a style tag to the page with the override CSS code.

    var cssBuffer = [];
    switch(spjs.dffs.data.thisItemID){
    	case "26":
    		cssBuffer.push(".ms-rteTableHeaderEvenCol-default, .ms-rteTableHeaderOddCol-default{")
    			cssBuffer.push("color:#fff!important;");
    		cssBuffer.push("}");
    	break;
    	case "30":
    		// add the style like the previous "case"
    	break;
    }
    $("body").append("<style type='text/css'>"+cssBuffer.join("")+"</style>");

    Let me know how this works out.

    Alexander

    in reply to: Display and click through to attachments on child list #9204
    Alexander Bautz
    Keymaster

    I’m glad you found a solution. I’ll make a note of your findings and see if I can recreate it and make a fix.

    Alexander

    in reply to: Restrict "Add new item" to specific User Groups #9187
    Alexander Bautz
    Keymaster

    This code should work in both SP2010 and SP2013. Add it to a CEWP in the view. You must change the fieldname “vLookupTasks” and add the name or id of your group in the code below. This code inserts a style tag to ensure all buttons are hidden correctly even if the vLookup is loaded after the script is loaded.

    <script type="text/javascript" src="/SPJS/DFFS/plugins/SPJS-utility.js"></script>
    <script type="text/javascript">
    var currentUserInfo = spjs.utility.userInfo(_spPageContextInfo.userId);
    var currentUserGroups = getGroupCollectionFromUser(currentUserInfo.Name);
    // check membership
    if(currentUserGroups["THE NAME OR ID OF YOUR GROUP"] === undefined){
    	var b = [];
    	b.push("<style type='text/css'>");
    	b.push(".vLookupViewBtn_vLookupTasks{display:none;}");
    	b.push(".vLookupEditBtn_vLookupTasks{display:none;}");
    	b.push("</style>");
    	jQuery("body").append(b.join(""));
    }
    
    function getGroupCollectionFromUser(userLoginName){
    	var result = {}, id, name;
    	spjs_wrapSoapRequest(L_Menu_BaseUrl + '/_vti_bin/usergroup.asmx',
    		'http://schemas.microsoft.com/sharepoint/soap/directory/GetGroupCollectionFromUser',
    		'<GetGroupCollectionFromUser xmlns="http://schemas.microsoft.com/sharepoint/soap/directory/"><userLoginName>' + userLoginName + '</userLoginName></GetGroupCollectionFromUser>',
    		function(data){
    			jQuery('Group', data).each(function(idx, itemData){
    				id = jQuery(itemData).attr('ID');
    				name = jQuery(itemData).attr('Name');
    				result[id] = true;
    				result[name] = true;
    			});
    		});
    	return result;
    }
    </script>

    Alexander

    in reply to: Issue with jquery-1.11.2.min.js:4 #9185
    Alexander Bautz
    Keymaster

    Should not pose any problems.

    Alexander

    in reply to: Display and click through to attachments on child list #9183
    Alexander Bautz
    Keymaster

    Hi,
    I’m not able to see why the display item should break – are you sure this code is to blame?

    Use this modified code to load the contents in a “normal” SharePoint dialog:
    Replace this line:

    spjs.dffs.dlgBox(b.join(""),true);

    with this:

    $("#temp_attPlaceholder").remove();
    			$("body").append("<div id='temp_attPlaceholder'>"+b.join("")+"</div>");			
    			SP.UI.ModalDialog.showModalDialog({
    				"title":"Attachments",
    				"html":$("#temp_attPlaceholder")[0],
    				"width":300,
    				"height":$("#temp_attPlaceholder").height() + 50,
    				"showClose":true			
    			});

    Alexander

    Alexander Bautz
    Keymaster

    Hi,
    Sorry for the delay. I must agree with Adam that adding images to rich text fields are messy when you look at how the images are stored in the location you save them (site assets by default).

    I do however have a solution to your requirement. It’s not that pretty as it uses a setInterval function to look for the upload dialog, but it should work.

    Put this in the custom js textarea in the DFFS form:

    setInterval(function(){
    	var uDlg = $(parent.document).find("iframe[src*='/Upload.aspx']");
    	if(uDlg.length > 0){
    		$(uDlg[0]).contents().find("input:checkbox").prop("checked",false).parent().hide();
    	}
    },1000);

    Alexander

    in reply to: Original form labels visible before DFFS page refresh #9179
    Alexander Bautz
    Keymaster

    Did you use the file “DFFS_frontend_overlay.html” from the latest release?

    Alexander

    in reply to: DispForm Label Column Width #9177
    Alexander Bautz
    Keymaster

    It’s hard to tell without looking at it “live”, but if you try using the dev tools – right click one of the labels and select “Inspect element”. Look at the style of the “

    ” – what styles are applied?

    Alexander

    in reply to: Rules based on Content Type not working (WSS 3.0) #9166
    Alexander Bautz
    Keymaster

    You should be able to use this variable and the trigger “custom javascript function”:

    spjs.dffs.beforeProperties.ContentTypeChoice

    Alexander

    in reply to: Resize textarea in IE #9164
    Alexander Bautz
    Keymaster

    Hi,
    The form is more or less redrawn when you select a new tab. Any side-by-side will be removed and recreated so you might have to apply your formatting on click on each tab (click function name in the tab).

    Alexander

    in reply to: Restore Chart from previous version. #9161
    Alexander Bautz
    Keymaster

    If you have a licensed version you can import from this list. If not you should be able to copy and paste the “blob” manually to the new list item you have created for your new chart.

    Alexander

    in reply to: URL parameter passed to child form – possible issue #9159
    Alexander Bautz
    Keymaster

    I have verified this bug and will fix it in the next release. It should not be a problem to use it as-is in the meantime.

    Alexander

Viewing 15 posts - 4,021 through 4,035 (of 4,558 total)